Documentation ¶
Index ¶
- Variables
- type FieldOptions
- func (*FieldOptions) Descriptor() ([]byte, []int)deprecated
- func (m *FieldOptions) GetKind() isFieldOptions_Kind
- func (x *FieldOptions) GetMap() *MapOptions
- func (x *FieldOptions) GetPlain() *PlainOptions
- func (x *FieldOptions) GetRepeated() *RepeatedOptions
- func (*FieldOptions) ProtoMessage()
- func (x *FieldOptions) ProtoReflect() protoreflect.Message
- func (x *FieldOptions) Reset()
- func (x *FieldOptions) String() string
- type FieldOptions_Map
- type FieldOptions_Plain
- type FieldOptions_Repeated
- type FieldType
- func (*FieldType) Descriptor() ([]byte, []int)deprecated
- func (x *FieldType) GetAny() *TypeAny
- func (x *FieldType) GetBool() bool
- func (x *FieldType) GetBytes() []byte
- func (x *FieldType) GetDouble() float64
- func (x *FieldType) GetDuration() *durationpb.Duration
- func (x *FieldType) GetEnum() int32
- func (x *FieldType) GetFixed32() uint32
- func (x *FieldType) GetFixed64() uint64
- func (x *FieldType) GetFloat() float32
- func (x *FieldType) GetInt32() int32
- func (x *FieldType) GetInt64() int64
- func (m *FieldType) GetKind() isFieldType_Kind
- func (x *FieldType) GetMessage() *TypeMessage
- func (x *FieldType) GetSfixed32() int32
- func (x *FieldType) GetSfixed64() int64
- func (x *FieldType) GetSint32() int32
- func (x *FieldType) GetSint64() int64
- func (x *FieldType) GetString_() string
- func (x *FieldType) GetTimestamp() *timestamppb.Timestamp
- func (x *FieldType) GetUint32() uint32
- func (x *FieldType) GetUint64() uint64
- func (*FieldType) ProtoMessage()
- func (x *FieldType) ProtoReflect() protoreflect.Message
- func (x *FieldType) Reset()
- func (x *FieldType) String() string
- type FieldType_Any
- type FieldType_Bool
- type FieldType_Bytes
- type FieldType_Double
- type FieldType_Duration
- type FieldType_Enum
- type FieldType_Fixed32
- type FieldType_Fixed64
- type FieldType_Float
- type FieldType_Int32
- type FieldType_Int64
- type FieldType_Message
- type FieldType_Sfixed32
- type FieldType_Sfixed64
- type FieldType_Sint32
- type FieldType_Sint64
- type FieldType_String_
- type FieldType_Timestamp
- type FieldType_Uint32
- type FieldType_Uint64
- type MapOptions
- func (*MapOptions) Descriptor() ([]byte, []int)deprecated
- func (x *MapOptions) GetIgnoreEmpty() bool
- func (x *MapOptions) GetKvs() []*MapOptions_KV
- func (x *MapOptions) GetSkipEval() bool
- func (*MapOptions) ProtoMessage()
- func (x *MapOptions) ProtoReflect() protoreflect.Message
- func (x *MapOptions) Reset()
- func (x *MapOptions) String() string
- type MapOptions_KV
- func (*MapOptions_KV) Descriptor() ([]byte, []int)deprecated
- func (x *MapOptions_KV) GetKey() *FieldType
- func (x *MapOptions_KV) GetValue() *FieldType
- func (*MapOptions_KV) ProtoMessage()
- func (x *MapOptions_KV) ProtoReflect() protoreflect.Message
- func (x *MapOptions_KV) Reset()
- func (x *MapOptions_KV) String() string
- type OneOfOptions
- type PlainOptions
- func (*PlainOptions) Descriptor() ([]byte, []int)deprecated
- func (x *PlainOptions) GetIgnoreEmpty() bool
- func (x *PlainOptions) GetSkipEval() bool
- func (x *PlainOptions) GetValue() *FieldType
- func (*PlainOptions) ProtoMessage()
- func (x *PlainOptions) ProtoReflect() protoreflect.Message
- func (x *PlainOptions) Reset()
- func (x *PlainOptions) String() string
- type RepeatedOptions
- func (*RepeatedOptions) Descriptor() ([]byte, []int)deprecated
- func (x *RepeatedOptions) GetIgnoreEmpty() bool
- func (x *RepeatedOptions) GetItems() []*FieldType
- func (x *RepeatedOptions) GetSkipEval() bool
- func (*RepeatedOptions) ProtoMessage()
- func (x *RepeatedOptions) ProtoReflect() protoreflect.Message
- func (x *RepeatedOptions) Reset()
- func (x *RepeatedOptions) String() string
- type TypeAny
- type TypeMessage
Constants ¶
This section is empty.
Variables ¶
var (
// optional default.FieldOptions field = 63023;
E_Field = &file_default_proto_extTypes[0]
)
Extension fields to descriptorpb.FieldOptions.
var (
// optional default.OneOfOptions oneof = 63024;
E_Oneof = &file_default_proto_extTypes[1]
)
Extension fields to descriptorpb.OneofOptions.
var File_default_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type FieldOptions ¶
type FieldOptions struct { // Types that are assignable to Kind: // *FieldOptions_Plain // *FieldOptions_Repeated // *FieldOptions_Map Kind isFieldOptions_Kind `protobuf_oneof:"Kind"` // contains filtered or unexported fields }
FieldOptions is the options for the `field` level.
func (*FieldOptions) Descriptor
deprecated
func (*FieldOptions) Descriptor() ([]byte, []int)
Deprecated: Use FieldOptions.ProtoReflect.Descriptor instead.
func (*FieldOptions) GetKind ¶
func (m *FieldOptions) GetKind() isFieldOptions_Kind
func (*FieldOptions) GetMap ¶
func (x *FieldOptions) GetMap() *MapOptions
func (*FieldOptions) GetPlain ¶
func (x *FieldOptions) GetPlain() *PlainOptions
func (*FieldOptions) GetRepeated ¶
func (x *FieldOptions) GetRepeated() *RepeatedOptions
func (*FieldOptions) ProtoMessage ¶
func (*FieldOptions) ProtoMessage()
func (*FieldOptions) ProtoReflect ¶
func (x *FieldOptions) ProtoReflect() protoreflect.Message
func (*FieldOptions) Reset ¶
func (x *FieldOptions) Reset()
func (*FieldOptions) String ¶
func (x *FieldOptions) String() string
type FieldOptions_Map ¶
type FieldOptions_Map struct { // MapTags declares the tags applied to the map filed. Map *MapOptions `protobuf:"bytes,3,opt,name=map,proto3,oneof"` }
type FieldOptions_Plain ¶
type FieldOptions_Plain struct { // PlainOptions declares the tags applied to the plain field. Plain *PlainOptions `protobuf:"bytes,1,opt,name=plain,proto3,oneof"` }
type FieldOptions_Repeated ¶
type FieldOptions_Repeated struct { // RepeatedOptions declares the tags applied to the repeated filed. Repeated *RepeatedOptions `protobuf:"bytes,2,opt,name=repeated,proto3,oneof"` }
type FieldType ¶
type FieldType struct { // Types that are assignable to Kind: // *FieldType_Int32 // *FieldType_Int64 // *FieldType_Sint32 // *FieldType_Sint64 // *FieldType_Sfixed32 // *FieldType_Sfixed64 // *FieldType_Uint32 // *FieldType_Uint64 // *FieldType_Fixed32 // *FieldType_Fixed64 // *FieldType_Float // *FieldType_Double // *FieldType_Bool // *FieldType_Enum // *FieldType_String_ // *FieldType_Bytes // *FieldType_Message // *FieldType_Any // *FieldType_Duration // *FieldType_Timestamp Kind isFieldType_Kind `protobuf_oneof:"Kind"` // contains filtered or unexported fields }
func (*FieldType) Descriptor
deprecated
func (*FieldType) GetDuration ¶
func (x *FieldType) GetDuration() *durationpb.Duration
func (*FieldType) GetFixed32 ¶
func (*FieldType) GetFixed64 ¶
func (*FieldType) GetMessage ¶
func (x *FieldType) GetMessage() *TypeMessage
func (*FieldType) GetSfixed32 ¶
func (*FieldType) GetSfixed64 ¶
func (*FieldType) GetString_ ¶
func (*FieldType) GetTimestamp ¶
func (x *FieldType) GetTimestamp() *timestamppb.Timestamp
func (*FieldType) ProtoMessage ¶
func (*FieldType) ProtoMessage()
func (*FieldType) ProtoReflect ¶
func (x *FieldType) ProtoReflect() protoreflect.Message
type FieldType_Any ¶
type FieldType_Any struct { // any declares the default value for field type of `google.protobuf.Any`. Any *TypeAny `protobuf:"bytes,21,opt,name=any,proto3,oneof"` }
type FieldType_Bool ¶
type FieldType_Bool struct { // bool declares the default value for field type of `bool`. Bool bool `protobuf:"varint,13,opt,name=bool,proto3,oneof"` }
type FieldType_Bytes ¶
type FieldType_Bytes struct { // bytes declares the default value for field type of `bytes`. Bytes []byte `protobuf:"bytes,16,opt,name=bytes,proto3,oneof"` }
type FieldType_Double ¶
type FieldType_Double struct { // double declares the default value for field type of `dobule`. Double float64 `protobuf:"fixed64,12,opt,name=double,proto3,oneof"` }
type FieldType_Duration ¶
type FieldType_Duration struct { // duration declares the default value for field type of `google.protobuf.Duration`. Duration *durationpb.Duration `protobuf:"bytes,22,opt,name=duration,proto3,oneof"` }
type FieldType_Enum ¶
type FieldType_Enum struct { // enum declares the default value for field type of `enum`. Enum int32 `protobuf:"varint,14,opt,name=enum,proto3,oneof"` }
type FieldType_Fixed32 ¶
type FieldType_Fixed32 struct { // fixed32 declares the default value for field type of `fixed32`. Fixed32 uint32 `protobuf:"fixed32,9,opt,name=fixed32,proto3,oneof"` }
type FieldType_Fixed64 ¶
type FieldType_Fixed64 struct { // fixed64 declares the default value for field type of `fixed64`. Fixed64 uint64 `protobuf:"fixed64,10,opt,name=fixed64,proto3,oneof"` }
type FieldType_Float ¶
type FieldType_Float struct { // float declares the default value for field type of `float`. Float float32 `protobuf:"fixed32,11,opt,name=float,proto3,oneof"` }
type FieldType_Int32 ¶
type FieldType_Int32 struct { // int32 declares the default value for field type of `int32`. Int32 int32 `protobuf:"varint,1,opt,name=int32,proto3,oneof"` }
type FieldType_Int64 ¶
type FieldType_Int64 struct { // int64 declares the default value for field type of `int64`. Int64 int64 `protobuf:"varint,2,opt,name=int64,proto3,oneof"` }
type FieldType_Message ¶
type FieldType_Message struct { // message declares the default value for field type of `message`. Message *TypeMessage `protobuf:"bytes,17,opt,name=message,proto3,oneof"` }
type FieldType_Sfixed32 ¶
type FieldType_Sfixed32 struct { // sfixed32 declares the default value for field type of `sfixed32`. Sfixed32 int32 `protobuf:"fixed32,5,opt,name=sfixed32,proto3,oneof"` }
type FieldType_Sfixed64 ¶
type FieldType_Sfixed64 struct { // sfixed64 declares the default value for field type of `sfixed64`. Sfixed64 int64 `protobuf:"fixed64,6,opt,name=sfixed64,proto3,oneof"` }
type FieldType_Sint32 ¶
type FieldType_Sint32 struct { // sint32 declares the default value for field type of `sint32`. Sint32 int32 `protobuf:"zigzag32,3,opt,name=sint32,proto3,oneof"` }
type FieldType_Sint64 ¶
type FieldType_Sint64 struct { // sint64 declares the default value for field type of `sint64`. Sint64 int64 `protobuf:"zigzag64,4,opt,name=sint64,proto3,oneof"` }
type FieldType_String_ ¶
type FieldType_String_ struct { // string declares the default value for field type of `string`. String_ string `protobuf:"bytes,15,opt,name=string,proto3,oneof"` }
type FieldType_Timestamp ¶
type FieldType_Timestamp struct { // timestamp declares the default value for field type of `google.protobuf.Timestamp`. Timestamp *timestamppb.Timestamp `protobuf:"bytes,23,opt,name=timestamp,proto3,oneof"` }
type FieldType_Uint32 ¶
type FieldType_Uint32 struct { // uint32 declares the default value for field type of `uint32`. Uint32 uint32 `protobuf:"varint,7,opt,name=uint32,proto3,oneof"` }
type FieldType_Uint64 ¶
type FieldType_Uint64 struct { // uint64 declares the default value for field type of `uint64`. Uint64 uint64 `protobuf:"varint,8,opt,name=uint64,proto3,oneof"` }
type MapOptions ¶
type MapOptions struct { // kvs declares the the default value for field. Kvs []*MapOptions_KV `protobuf:"bytes,1,rep,name=kvs,proto3" json:"kvs,omitempty"` // By default, The default value will be applied if the length of field is zero. // If `ignore_empty` is true, Only apply the default value if the field is a nil pointer. // Only effective for language Go. IgnoreEmpty *bool `protobuf:"varint,2,opt,name=ignore_empty,json=ignoreEmpty,proto3,oneof" json:"ignore_empty,omitempty"` // By default, We will try to eval call the method of default for type of map value are message and any. // If `skip_eval` is true, the method of default will not be called. // Only effective for language Go. SkipEval *bool `protobuf:"varint,11,opt,name=skip_eval,json=skipEval,proto3,oneof" json:"skip_eval,omitempty"` // contains filtered or unexported fields }
MapOptions declares the options applied to the map filed.
func (*MapOptions) Descriptor
deprecated
func (*MapOptions) Descriptor() ([]byte, []int)
Deprecated: Use MapOptions.ProtoReflect.Descriptor instead.
func (*MapOptions) GetIgnoreEmpty ¶
func (x *MapOptions) GetIgnoreEmpty() bool
func (*MapOptions) GetKvs ¶
func (x *MapOptions) GetKvs() []*MapOptions_KV
func (*MapOptions) GetSkipEval ¶
func (x *MapOptions) GetSkipEval() bool
func (*MapOptions) ProtoMessage ¶
func (*MapOptions) ProtoMessage()
func (*MapOptions) ProtoReflect ¶
func (x *MapOptions) ProtoReflect() protoreflect.Message
func (*MapOptions) Reset ¶
func (x *MapOptions) Reset()
func (*MapOptions) String ¶
func (x *MapOptions) String() string
type MapOptions_KV ¶
type MapOptions_KV struct { Key *FieldType `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value *FieldType `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*MapOptions_KV) Descriptor
deprecated
func (*MapOptions_KV) Descriptor() ([]byte, []int)
Deprecated: Use MapOptions_KV.ProtoReflect.Descriptor instead.
func (*MapOptions_KV) GetKey ¶
func (x *MapOptions_KV) GetKey() *FieldType
func (*MapOptions_KV) GetValue ¶
func (x *MapOptions_KV) GetValue() *FieldType
func (*MapOptions_KV) ProtoMessage ¶
func (*MapOptions_KV) ProtoMessage()
func (*MapOptions_KV) ProtoReflect ¶
func (x *MapOptions_KV) ProtoReflect() protoreflect.Message
func (*MapOptions_KV) Reset ¶
func (x *MapOptions_KV) Reset()
func (*MapOptions_KV) String ¶
func (x *MapOptions_KV) String() string
type OneOfOptions ¶
type OneOfOptions struct { // The name of filed in `oneof` part. Field *string `protobuf:"bytes,1,opt,name=field,proto3,oneof" json:"field,omitempty"` // contains filtered or unexported fields }
OneOfOptions is the options for the oneof field.
func (*OneOfOptions) Descriptor
deprecated
func (*OneOfOptions) Descriptor() ([]byte, []int)
Deprecated: Use OneOfOptions.ProtoReflect.Descriptor instead.
func (*OneOfOptions) GetField ¶
func (x *OneOfOptions) GetField() string
func (*OneOfOptions) ProtoMessage ¶
func (*OneOfOptions) ProtoMessage()
func (*OneOfOptions) ProtoReflect ¶
func (x *OneOfOptions) ProtoReflect() protoreflect.Message
func (*OneOfOptions) Reset ¶
func (x *OneOfOptions) Reset()
func (*OneOfOptions) String ¶
func (x *OneOfOptions) String() string
type PlainOptions ¶
type PlainOptions struct { // value declares the default value for field. Value *FieldType `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // By default, For optional field and field type are bytes, the default value will be applied if field value are nil or empty. // If the `apply_emtpy` is true, Only apply the default value if the field is a nil pointer. IgnoreEmpty *bool `protobuf:"varint,2,opt,name=ignore_empty,json=ignoreEmpty,proto3,oneof" json:"ignore_empty,omitempty"` // By default, We will try to eval call the method of default for type of field are message and any. // If `skip_eval` is true, the method of default will not be called. // Only effective for language Go. SkipEval *bool `protobuf:"varint,11,opt,name=skip_eval,json=skipEval,proto3,oneof" json:"skip_eval,omitempty"` // contains filtered or unexported fields }
PlainOptions declares the options applied to the plain filed.
func (*PlainOptions) Descriptor
deprecated
func (*PlainOptions) Descriptor() ([]byte, []int)
Deprecated: Use PlainOptions.ProtoReflect.Descriptor instead.
func (*PlainOptions) GetIgnoreEmpty ¶
func (x *PlainOptions) GetIgnoreEmpty() bool
func (*PlainOptions) GetSkipEval ¶
func (x *PlainOptions) GetSkipEval() bool
func (*PlainOptions) GetValue ¶
func (x *PlainOptions) GetValue() *FieldType
func (*PlainOptions) ProtoMessage ¶
func (*PlainOptions) ProtoMessage()
func (*PlainOptions) ProtoReflect ¶
func (x *PlainOptions) ProtoReflect() protoreflect.Message
func (*PlainOptions) Reset ¶
func (x *PlainOptions) Reset()
func (*PlainOptions) String ¶
func (x *PlainOptions) String() string
type RepeatedOptions ¶
type RepeatedOptions struct { // items declares the default value for field. Items []*FieldType `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` // By default, The default value will be applied if the length of field is zero. // If `ignore_empty` is true, Only apply the default value if the field is a nil pointer. // Only effective for language Go. IgnoreEmpty *bool `protobuf:"varint,2,opt,name=ignore_empty,json=ignoreEmpty,proto3,oneof" json:"ignore_empty,omitempty"` // By default, We will try to eval call the method of default for type of repeated items are message and any. // If `skip_eval` is true, the method of default will not be called. // Only effective for language Go. SkipEval *bool `protobuf:"varint,11,opt,name=skip_eval,json=skipEval,proto3,oneof" json:"skip_eval,omitempty"` // contains filtered or unexported fields }
RepeatedOptions declares the options applied to the repeated filed.
func (*RepeatedOptions) Descriptor
deprecated
func (*RepeatedOptions) Descriptor() ([]byte, []int)
Deprecated: Use RepeatedOptions.ProtoReflect.Descriptor instead.
func (*RepeatedOptions) GetIgnoreEmpty ¶
func (x *RepeatedOptions) GetIgnoreEmpty() bool
func (*RepeatedOptions) GetItems ¶
func (x *RepeatedOptions) GetItems() []*FieldType
func (*RepeatedOptions) GetSkipEval ¶
func (x *RepeatedOptions) GetSkipEval() bool
func (*RepeatedOptions) ProtoMessage ¶
func (*RepeatedOptions) ProtoMessage()
func (*RepeatedOptions) ProtoReflect ¶
func (x *RepeatedOptions) ProtoReflect() protoreflect.Message
func (*RepeatedOptions) Reset ¶
func (x *RepeatedOptions) Reset()
func (*RepeatedOptions) String ¶
func (x *RepeatedOptions) String() string
type TypeAny ¶
type TypeAny struct { // The type_url are combines with the import path(excludes suffix .proto) of proto file and the message name. // And the entry format like `github.com/yu31/protoc-plugin-default/proto/default.MapOptions`. // // You should use the point number connection to the parent message for embedded message. // And the entry format like `github.com/yu31/protoc-plugin-default/proto/default.MapOptions.KV`. // // You can use `.` represents the import path if the message is location in the current proto file. // And the entry format like `.MapOptions.KV`. TypeUrl *string `protobuf:"bytes,11,opt,name=type_url,json=typeUrl,proto3,oneof" json:"type_url,omitempty"` // contains filtered or unexported fields }
func (*TypeAny) Descriptor
deprecated
func (*TypeAny) GetTypeUrl ¶
func (*TypeAny) ProtoMessage ¶
func (*TypeAny) ProtoMessage()
func (*TypeAny) ProtoReflect ¶
func (x *TypeAny) ProtoReflect() protoreflect.Message
type TypeMessage ¶
type TypeMessage struct { // Init indicates the `message` to empty value if it is nil pointer. // Only effective for language Go. Init *bool `protobuf:"varint,1,opt,name=init,proto3,oneof" json:"init,omitempty"` // contains filtered or unexported fields }
func (*TypeMessage) Descriptor
deprecated
func (*TypeMessage) Descriptor() ([]byte, []int)
Deprecated: Use TypeMessage.ProtoReflect.Descriptor instead.
func (*TypeMessage) GetInit ¶
func (x *TypeMessage) GetInit() bool
func (*TypeMessage) ProtoMessage ¶
func (*TypeMessage) ProtoMessage()
func (*TypeMessage) ProtoReflect ¶
func (x *TypeMessage) ProtoReflect() protoreflect.Message
func (*TypeMessage) Reset ¶
func (x *TypeMessage) Reset()
func (*TypeMessage) String ¶
func (x *TypeMessage) String() string