followerlist.go 1013 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package v2jsonpb
  2. import "google.golang.org/protobuf/reflect/protoreflect"
  3. type V2JsonProtobufListFollower struct {
  4. protoreflect.List
  5. }
  6. func (v V2JsonProtobufListFollower) Len() int {
  7. return v.List.Len()
  8. }
  9. func (v V2JsonProtobufListFollower) Get(i int) protoreflect.Value {
  10. return protoreflect.ValueOfMessage(&V2JsonProtobufFollower{v.List.Get(i).Message()})
  11. }
  12. func (v V2JsonProtobufListFollower) Set(i int, value protoreflect.Value) {
  13. panic("implement me")
  14. }
  15. func (v V2JsonProtobufListFollower) Append(value protoreflect.Value) {
  16. v.List.Append(value)
  17. }
  18. func (v V2JsonProtobufListFollower) AppendMutable() protoreflect.Value {
  19. panic("implement me")
  20. }
  21. func (v V2JsonProtobufListFollower) Truncate(i int) {
  22. panic("implement me")
  23. }
  24. func (v V2JsonProtobufListFollower) NewElement() protoreflect.Value {
  25. newelement := v.List.NewElement()
  26. return protoreflect.ValueOfMessage(&V2JsonProtobufFollower{newelement.Message()})
  27. }
  28. func (v V2JsonProtobufListFollower) IsValid() bool {
  29. panic("implement me")
  30. }