Versions in this module Expand all Collapse all v1 v1.9.2 Jul 15, 2021 v1.9.1 Jul 15, 2021 Changes in this version + var ErrFieldIsNotMap = errors.New("field is not a map type") + var ErrFieldIsNotRepeated = errors.New("field is not repeated") + var ErrIndexOutOfRange = errors.New("index is out of range") + var ErrNumericOverflow = errors.New("numeric value is out of range") + var ErrUnknownFieldName = errors.New("unknown field name") + var ErrUnknownTagNumber = errors.New("unknown tag number") + var FieldIsNotMapError = ErrFieldIsNotMap + var FieldIsNotRepeatedError = ErrFieldIsNotRepeated + var IndexOutOfRangeError = ErrIndexOutOfRange + var NumericOverflowError = ErrNumericOverflow + var UnknownFieldNameError = ErrUnknownFieldName + var UnknownTagNumberError = ErrUnknownTagNumber + func AnyResolver(mf *MessageFactory, files ...*desc.FileDescriptor) jsonpb.AnyResolver + func Equal(a, b *Message) bool + func Merge(dst, src proto.Message) + func MessagesEqual(a, b proto.Message) bool + func SetExtension(msg proto.Message, extd *desc.FieldDescriptor, val interface{}) error + func TryMerge(dst, src proto.Message) error + type ExtensionRegistry struct + func NewExtensionRegistryWithDefaults() *ExtensionRegistry + func (r *ExtensionRegistry) AddExtension(exts ...*desc.FieldDescriptor) error + func (r *ExtensionRegistry) AddExtensionDesc(exts ...*proto.ExtensionDesc) error + func (r *ExtensionRegistry) AddExtensionsFromFile(fd *desc.FileDescriptor) + func (r *ExtensionRegistry) AddExtensionsFromFileRecursively(fd *desc.FileDescriptor) + func (r *ExtensionRegistry) AllExtensionsForType(messageName string) []*desc.FieldDescriptor + func (r *ExtensionRegistry) FindExtension(messageName string, tagNumber int32) *desc.FieldDescriptor + func (r *ExtensionRegistry) FindExtensionByJSONName(messageName string, fieldName string) *desc.FieldDescriptor + func (r *ExtensionRegistry) FindExtensionByName(messageName string, fieldName string) *desc.FieldDescriptor + type KnownTypeRegistry struct + func NewKnownTypeRegistryWithDefaults() *KnownTypeRegistry + func NewKnownTypeRegistryWithoutWellKnownTypes() *KnownTypeRegistry + func (r *KnownTypeRegistry) AddKnownType(kts ...proto.Message) + func (r *KnownTypeRegistry) CreateIfKnown(messageName string) proto.Message + func (r *KnownTypeRegistry) GetKnownType(messageName string) reflect.Type + type Message struct + func AsDynamicMessage(msg proto.Message) (*Message, error) + func AsDynamicMessageWithExtensionRegistry(msg proto.Message, er *ExtensionRegistry) (*Message, error) + func AsDynamicMessageWithMessageFactory(msg proto.Message, mf *MessageFactory) (*Message, error) + func NewMessage(md *desc.MessageDescriptor) *Message + func NewMessageWithExtensionRegistry(md *desc.MessageDescriptor, er *ExtensionRegistry) *Message + func NewMessageWithMessageFactory(md *desc.MessageDescriptor, mf *MessageFactory) *Message + func (m *Message) AddRepeatedField(fd *desc.FieldDescriptor, val interface{}) + func (m *Message) AddRepeatedFieldByName(name string, val interface{}) + func (m *Message) AddRepeatedFieldByNumber(tagNumber int, val interface{}) + func (m *Message) ClearField(fd *desc.FieldDescriptor) + func (m *Message) ClearFieldByName(name string) + func (m *Message) ClearFieldByNumber(tagNumber int) + func (m *Message) ClearOneOfField(od *desc.OneOfDescriptor) + func (m *Message) ConvertFrom(target proto.Message) error + func (m *Message) ConvertTo(target proto.Message) error + func (m *Message) ConvertToDeterministic(target proto.Message) error + func (m *Message) Descriptor() ([]byte, []int) + func (m *Message) FieldLength(fd *desc.FieldDescriptor) int + func (m *Message) FieldLengthByName(name string) int + func (m *Message) FieldLengthByNumber(tagNumber int32) int + func (m *Message) FindFieldDescriptor(tagNumber int32) *desc.FieldDescriptor + func (m *Message) FindFieldDescriptorByJSONName(name string) *desc.FieldDescriptor + func (m *Message) FindFieldDescriptorByName(name string) *desc.FieldDescriptor + func (m *Message) ForEachMapFieldEntry(fd *desc.FieldDescriptor, fn func(key, val interface{}) bool) + func (m *Message) ForEachMapFieldEntryByName(name string, fn func(key, val interface{}) bool) + func (m *Message) ForEachMapFieldEntryByNumber(tagNumber int, fn func(key, val interface{}) bool) + func (m *Message) GetField(fd *desc.FieldDescriptor) interface{} + func (m *Message) GetFieldByName(name string) interface{} + func (m *Message) GetFieldByNumber(tagNumber int) interface{} + func (m *Message) GetKnownExtensions() []*desc.FieldDescriptor + func (m *Message) GetKnownFields() []*desc.FieldDescriptor + func (m *Message) GetMapField(fd *desc.FieldDescriptor, key interface{}) interface{} + func (m *Message) GetMapFieldByName(name string, key interface{}) interface{} + func (m *Message) GetMapFieldByNumber(tagNumber int, key interface{}) interface{} + func (m *Message) GetMessageDescriptor() *desc.MessageDescriptor + func (m *Message) GetOneOfField(od *desc.OneOfDescriptor) (*desc.FieldDescriptor, interface{}) + func (m *Message) GetRepeatedField(fd *desc.FieldDescriptor, index int) interface{} + func (m *Message) GetRepeatedFieldByName(name string, index int) interface{} + func (m *Message) GetRepeatedFieldByNumber(tagNumber int, index int) interface{} + func (m *Message) GetUnknownField(tagNumber int32) []UnknownField + func (m *Message) GetUnknownFields() []int32 + func (m *Message) HasField(fd *desc.FieldDescriptor) bool + func (m *Message) HasFieldName(name string) bool + func (m *Message) HasFieldNumber(tagNumber int) bool + func (m *Message) Marshal() ([]byte, error) + func (m *Message) MarshalAppend(b []byte) ([]byte, error) + func (m *Message) MarshalAppendDeterministic(b []byte) ([]byte, error) + func (m *Message) MarshalDeterministic() ([]byte, error) + func (m *Message) MarshalJSON() ([]byte, error) + func (m *Message) MarshalJSONIndent() ([]byte, error) + func (m *Message) MarshalJSONPB(opts *jsonpb.Marshaler) ([]byte, error) + func (m *Message) MarshalText() ([]byte, error) + func (m *Message) MarshalTextIndent() ([]byte, error) + func (m *Message) Merge(source proto.Message) + func (m *Message) MergeFrom(source proto.Message) error + func (m *Message) MergeInto(target proto.Message) error + func (m *Message) MergeIntoDeterministic(target proto.Message) error + func (m *Message) ProtoMessage() + func (m *Message) PutMapField(fd *desc.FieldDescriptor, key interface{}, val interface{}) + func (m *Message) PutMapFieldByName(name string, key interface{}, val interface{}) + func (m *Message) PutMapFieldByNumber(tagNumber int, key interface{}, val interface{}) + func (m *Message) RemoveMapField(fd *desc.FieldDescriptor, key interface{}) + func (m *Message) RemoveMapFieldByName(name string, key interface{}) + func (m *Message) RemoveMapFieldByNumber(tagNumber int, key interface{}) + func (m *Message) Reset() + func (m *Message) SetField(fd *desc.FieldDescriptor, val interface{}) + func (m *Message) SetFieldByName(name string, val interface{}) + func (m *Message) SetFieldByNumber(tagNumber int, val interface{}) + func (m *Message) SetRepeatedField(fd *desc.FieldDescriptor, index int, val interface{}) + func (m *Message) SetRepeatedFieldByName(name string, index int, val interface{}) + func (m *Message) SetRepeatedFieldByNumber(tagNumber int, index int, val interface{}) + func (m *Message) String() string + func (m *Message) TryAddRepeatedField(fd *desc.FieldDescriptor, val interface{}) error + func (m *Message) TryAddRepeatedFieldByName(name string, val interface{}) error + func (m *Message) TryAddRepeatedFieldByNumber(tagNumber int, val interface{}) error + func (m *Message) TryClearField(fd *desc.FieldDescriptor) error + func (m *Message) TryClearFieldByName(name string) error + func (m *Message) TryClearFieldByNumber(tagNumber int) error + func (m *Message) TryClearOneOfField(od *desc.OneOfDescriptor) error + func (m *Message) TryFieldLength(fd *desc.FieldDescriptor) (int, error) + func (m *Message) TryFieldLengthByName(name string) (int, error) + func (m *Message) TryFieldLengthByNumber(tagNumber int32) (int, error) + func (m *Message) TryForEachMapFieldEntry(fd *desc.FieldDescriptor, fn func(key, val interface{}) bool) error + func (m *Message) TryForEachMapFieldEntryByName(name string, fn func(key, val interface{}) bool) error + func (m *Message) TryForEachMapFieldEntryByNumber(tagNumber int, fn func(key, val interface{}) bool) error + func (m *Message) TryGetField(fd *desc.FieldDescriptor) (interface{}, error) + func (m *Message) TryGetFieldByName(name string) (interface{}, error) + func (m *Message) TryGetFieldByNumber(tagNumber int) (interface{}, error) + func (m *Message) TryGetMapField(fd *desc.FieldDescriptor, key interface{}) (interface{}, error) + func (m *Message) TryGetMapFieldByName(name string, key interface{}) (interface{}, error) + func (m *Message) TryGetMapFieldByNumber(tagNumber int, key interface{}) (interface{}, error) + func (m *Message) TryGetOneOfField(od *desc.OneOfDescriptor) (*desc.FieldDescriptor, interface{}, error) + func (m *Message) TryGetRepeatedField(fd *desc.FieldDescriptor, index int) (interface{}, error) + func (m *Message) TryGetRepeatedFieldByName(name string, index int) (interface{}, error) + func (m *Message) TryGetRepeatedFieldByNumber(tagNumber int, index int) (interface{}, error) + func (m *Message) TryPutMapField(fd *desc.FieldDescriptor, key interface{}, val interface{}) error + func (m *Message) TryPutMapFieldByName(name string, key interface{}, val interface{}) error + func (m *Message) TryPutMapFieldByNumber(tagNumber int, key interface{}, val interface{}) error + func (m *Message) TryRemoveMapField(fd *desc.FieldDescriptor, key interface{}) error + func (m *Message) TryRemoveMapFieldByName(name string, key interface{}) error + func (m *Message) TryRemoveMapFieldByNumber(tagNumber int, key interface{}) error + func (m *Message) TrySetField(fd *desc.FieldDescriptor, val interface{}) error + func (m *Message) TrySetFieldByName(name string, val interface{}) error + func (m *Message) TrySetFieldByNumber(tagNumber int, val interface{}) error + func (m *Message) TrySetRepeatedField(fd *desc.FieldDescriptor, index int, val interface{}) error + func (m *Message) TrySetRepeatedFieldByName(name string, index int, val interface{}) error + func (m *Message) TrySetRepeatedFieldByNumber(tagNumber int, index int, val interface{}) error + func (m *Message) Unmarshal(b []byte) error + func (m *Message) UnmarshalJSON(js []byte) error + func (m *Message) UnmarshalJSONPB(opts *jsonpb.Unmarshaler, js []byte) error + func (m *Message) UnmarshalMerge(b []byte) error + func (m *Message) UnmarshalMergeJSON(js []byte) error + func (m *Message) UnmarshalMergeJSONPB(opts *jsonpb.Unmarshaler, js []byte) error + func (m *Message) UnmarshalMergeText(text []byte) error + func (m *Message) UnmarshalText(text []byte) error + func (m *Message) Validate() error + func (m *Message) ValidateRecursive() error + func (m *Message) XXX_MessageName() string + type MessageFactory struct + func NewMessageFactoryWithDefaults() *MessageFactory + func NewMessageFactoryWithExtensionRegistry(er *ExtensionRegistry) *MessageFactory + func NewMessageFactoryWithKnownTypeRegistry(ktr *KnownTypeRegistry) *MessageFactory + func NewMessageFactoryWithRegistries(er *ExtensionRegistry, ktr *KnownTypeRegistry) *MessageFactory + func (f *MessageFactory) GetExtensionRegistry() *ExtensionRegistry + func (f *MessageFactory) GetKnownTypeRegistry() *KnownTypeRegistry + func (f *MessageFactory) NewDynamicMessage(md *desc.MessageDescriptor) *Message + func (f *MessageFactory) NewMessage(md *desc.MessageDescriptor) proto.Message + type UnknownField struct + Contents []byte + Encoding int8 + Value uint64