Documentation ¶
Index ¶
- Variables
- type Converter
- type Delegate
- type EnumAnnotation
- type EnumValueAnnotation
- func (*EnumValueAnnotation) Descriptor() ([]byte, []int)deprecated
- func (x *EnumValueAnnotation) GetDelegate() *Delegate
- func (x *EnumValueAnnotation) GetReceive() *Receive
- func (*EnumValueAnnotation) ProtoMessage()
- func (x *EnumValueAnnotation) ProtoReflect() protoreflect.Message
- func (x *EnumValueAnnotation) Reset()
- func (x *EnumValueAnnotation) String() string
- type FieldAnnotation
- func (*FieldAnnotation) Descriptor() ([]byte, []int)deprecated
- func (x *FieldAnnotation) GetDelegate() *Delegate
- func (x *FieldAnnotation) GetDeprecated() bool
- func (x *FieldAnnotation) GetReceive() *FieldReceive
- func (x *FieldAnnotation) GetValidate() *Validate
- func (*FieldAnnotation) ProtoMessage()
- func (x *FieldAnnotation) ProtoReflect() protoreflect.Message
- func (x *FieldAnnotation) Reset()
- func (x *FieldAnnotation) String() string
- type FieldReceive
- type MessageAnnotation
- func (*MessageAnnotation) Descriptor() ([]byte, []int)deprecated
- func (x *MessageAnnotation) GetConverter() *Converter
- func (x *MessageAnnotation) GetDelegate() *Delegate
- func (x *MessageAnnotation) GetDeprecated() bool
- func (*MessageAnnotation) ProtoMessage()
- func (x *MessageAnnotation) ProtoReflect() protoreflect.Message
- func (x *MessageAnnotation) Reset()
- func (x *MessageAnnotation) String() string
- type MethodAnnotation
- func (*MethodAnnotation) Descriptor() ([]byte, []int)deprecated
- func (x *MethodAnnotation) GetConverter() *Converter
- func (x *MethodAnnotation) GetDelegate() *Delegate
- func (x *MethodAnnotation) GetDeprecated() bool
- func (*MethodAnnotation) ProtoMessage()
- func (x *MethodAnnotation) ProtoReflect() protoreflect.Message
- func (x *MethodAnnotation) Reset()
- func (x *MethodAnnotation) String() string
- type Number
- func (*Number) Descriptor() ([]byte, []int)deprecated
- func (x *Number) GetDouble() float64
- func (x *Number) GetInt64() int64
- func (x *Number) GetUint64() uint64
- func (m *Number) GetValue() isNumber_Value
- func (*Number) ProtoMessage()
- func (x *Number) ProtoReflect() protoreflect.Message
- func (x *Number) Reset()
- func (x *Number) String() string
- type Number_Double
- type Number_Int64
- type Number_Uint64
- type OneofAnnotation
- func (*OneofAnnotation) Descriptor() ([]byte, []int)deprecated
- func (x *OneofAnnotation) GetDelegate() *Delegate
- func (x *OneofAnnotation) GetDeprecated() bool
- func (x *OneofAnnotation) GetReceive() *FieldReceive
- func (x *OneofAnnotation) GetValidate() *OneofValidate
- func (*OneofAnnotation) ProtoMessage()
- func (x *OneofAnnotation) ProtoReflect() protoreflect.Message
- func (x *OneofAnnotation) Reset()
- func (x *OneofAnnotation) String() string
- type OneofValidate
- type Receive
- type Validate
- func (*Validate) Descriptor() ([]byte, []int)deprecated
- func (x *Validate) GetIn() []string
- func (x *Validate) GetIs() Validate_IsType
- func (x *Validate) GetMax() *Number
- func (x *Validate) GetMin() *Number
- func (x *Validate) GetRequired() bool
- func (*Validate) ProtoMessage()
- func (x *Validate) ProtoReflect() protoreflect.Message
- func (x *Validate) Reset()
- func (x *Validate) String() string
- type Validate_IsType
- func (Validate_IsType) Descriptor() protoreflect.EnumDescriptor
- func (x Validate_IsType) Enum() *Validate_IsType
- func (Validate_IsType) EnumDescriptor() ([]byte, []int)deprecated
- func (x Validate_IsType) Number() protoreflect.EnumNumber
- func (x Validate_IsType) String() string
- func (Validate_IsType) Type() protoreflect.EnumType
Constants ¶
This section is empty.
Variables ¶
var ( Validate_IsType_name = map[int32]string{ 0: "UNSPECIFIED", 1: "UUID", 2: "EMAIL", 3: "URL", } Validate_IsType_value = map[string]int32{ "UNSPECIFIED": 0, "UUID": 1, "EMAIL": 2, "URL": 3, } )
Enum value maps for Validate_IsType.
var ( // enum see documentation of `EnumAnnotation`. // // optional gen.svc.EnumAnnotation enum = 1140; E_Enum = &file_annotations_proto_extTypes[4] )
Extension fields to descriptorpb.EnumOptions.
var ( // enum_value see documentation of `EnumValueAnnotation`. // // optional gen.svc.EnumValueAnnotation enum_value = 1140; E_EnumValue = &file_annotations_proto_extTypes[6] )
Extension fields to descriptorpb.EnumValueOptions.
var ( // field see documentation of `FieldAnnotation`. // // optional gen.svc.FieldAnnotation field = 1140; E_Field = &file_annotations_proto_extTypes[3] )
Extension fields to descriptorpb.FieldOptions.
var ( // go_package is the location where all service versions will be generated. // Each service package name will be a sub-package. // // optional string go_package = 1140; E_GoPackage = &file_annotations_proto_extTypes[0] )
Extension fields to descriptorpb.FileOptions.
var ( // message see documentation of `MessageAnnotation`. // // optional gen.svc.MessageAnnotation message = 1140; E_Message = &file_annotations_proto_extTypes[2] )
Extension fields to descriptorpb.MessageOptions.
var ( // method see documentation of `MethodAnnotation`. // // optional gen.svc.MethodAnnotation method = 1140; E_Method = &file_annotations_proto_extTypes[1] )
Extension fields to descriptorpb.MethodOptions.
var ( // oneof see documentation of `OneofAnnotation`. // // optional gen.svc.OneofAnnotation oneof = 1140; E_Oneof = &file_annotations_proto_extTypes[5] )
Extension fields to descriptorpb.OneofOptions.
var File_annotations_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Converter ¶
type Converter struct { // empty indicates the `Converter` method should be generated, but with no // converting attempted and with nil return values. Empty bool `protobuf:"varint,1,opt,name=empty,proto3" json:"empty,omitempty"` // contains filtered or unexported fields }
func (*Converter) Descriptor
deprecated
func (*Converter) ProtoMessage ¶
func (*Converter) ProtoMessage()
func (*Converter) ProtoReflect ¶
func (x *Converter) ProtoReflect() protoreflect.Message
type Delegate ¶
type Delegate struct { // name is the target found in the next service. This should only be set when // the target name differs between service versions. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*Delegate) Descriptor
deprecated
func (*Delegate) ProtoMessage ¶
func (*Delegate) ProtoMessage()
func (*Delegate) ProtoReflect ¶
func (x *Delegate) ProtoReflect() protoreflect.Message
type EnumAnnotation ¶
type EnumAnnotation struct { // delegate is a map with a string field `name`. The `name` field allows // overriding which enum is targated when reading and writing between // messages of service versions. Delegate *Delegate `protobuf:"bytes,1,opt,name=delegate,proto3" json:"delegate,omitempty"` // contains filtered or unexported fields }
func (*EnumAnnotation) Descriptor
deprecated
func (*EnumAnnotation) Descriptor() ([]byte, []int)
Deprecated: Use EnumAnnotation.ProtoReflect.Descriptor instead.
func (*EnumAnnotation) GetDelegate ¶
func (x *EnumAnnotation) GetDelegate() *Delegate
func (*EnumAnnotation) ProtoMessage ¶
func (*EnumAnnotation) ProtoMessage()
func (*EnumAnnotation) ProtoReflect ¶
func (x *EnumAnnotation) ProtoReflect() protoreflect.Message
func (*EnumAnnotation) Reset ¶
func (x *EnumAnnotation) Reset()
func (*EnumAnnotation) String ¶
func (x *EnumAnnotation) String() string
type EnumValueAnnotation ¶
type EnumValueAnnotation struct { // delegate is a map with a string field `name`. The `name` field allows // overriding which enum value is targated when reading and writing between // enums of service versions. Delegate *Delegate `protobuf:"bytes,1,opt,name=delegate,proto3" json:"delegate,omitempty"` // receive is a map with a string field `name` and repeated string field // `names`. These fields allow overriding which enum values are targeted when // reading from the next service version. Receive *Receive `protobuf:"bytes,2,opt,name=receive,proto3" json:"receive,omitempty"` // contains filtered or unexported fields }
func (*EnumValueAnnotation) Descriptor
deprecated
func (*EnumValueAnnotation) Descriptor() ([]byte, []int)
Deprecated: Use EnumValueAnnotation.ProtoReflect.Descriptor instead.
func (*EnumValueAnnotation) GetDelegate ¶
func (x *EnumValueAnnotation) GetDelegate() *Delegate
func (*EnumValueAnnotation) GetReceive ¶
func (x *EnumValueAnnotation) GetReceive() *Receive
func (*EnumValueAnnotation) ProtoMessage ¶
func (*EnumValueAnnotation) ProtoMessage()
func (*EnumValueAnnotation) ProtoReflect ¶
func (x *EnumValueAnnotation) ProtoReflect() protoreflect.Message
func (*EnumValueAnnotation) Reset ¶
func (x *EnumValueAnnotation) Reset()
func (*EnumValueAnnotation) String ¶
func (x *EnumValueAnnotation) String() string
type FieldAnnotation ¶
type FieldAnnotation struct { // delegate is a map with a string field `name`. The `name` field allows // overriding which field is targated when reading and writing between // messages of service versions. Delegate *Delegate `protobuf:"bytes,1,opt,name=delegate,proto3" json:"delegate,omitempty"` // receive is a map with a boolean field of `required`. The `required` value // states that the field must be populated for the message to be compatible // with the service version. Receive *FieldReceive `protobuf:"bytes,2,opt,name=receive,proto3" json:"receive,omitempty"` // validate is a map of validation criteria for the field. See documentation // of `Validate`. Validate *Validate `protobuf:"bytes,3,opt,name=validate,proto3" json:"validate,omitempty"` // deprecated indicates a field is not present in the message of the next // service version. Deprecated fields must be present on the message of the // private service. Deprecated bool `protobuf:"varint,5,opt,name=deprecated,proto3" json:"deprecated,omitempty"` // contains filtered or unexported fields }
func (*FieldAnnotation) Descriptor
deprecated
func (*FieldAnnotation) Descriptor() ([]byte, []int)
Deprecated: Use FieldAnnotation.ProtoReflect.Descriptor instead.
func (*FieldAnnotation) GetDelegate ¶
func (x *FieldAnnotation) GetDelegate() *Delegate
func (*FieldAnnotation) GetDeprecated ¶
func (x *FieldAnnotation) GetDeprecated() bool
func (*FieldAnnotation) GetReceive ¶
func (x *FieldAnnotation) GetReceive() *FieldReceive
func (*FieldAnnotation) GetValidate ¶
func (x *FieldAnnotation) GetValidate() *Validate
func (*FieldAnnotation) ProtoMessage ¶
func (*FieldAnnotation) ProtoMessage()
func (*FieldAnnotation) ProtoReflect ¶
func (x *FieldAnnotation) ProtoReflect() protoreflect.Message
func (*FieldAnnotation) Reset ¶
func (x *FieldAnnotation) Reset()
func (*FieldAnnotation) String ¶
func (x *FieldAnnotation) String() string
type FieldReceive ¶
type FieldReceive struct { // required indicates the field value must be populated in order for the // message to be compatible with the service version. Required bool `protobuf:"varint,1,opt,name=required,proto3" json:"required,omitempty"` // contains filtered or unexported fields }
func (*FieldReceive) Descriptor
deprecated
func (*FieldReceive) Descriptor() ([]byte, []int)
Deprecated: Use FieldReceive.ProtoReflect.Descriptor instead.
func (*FieldReceive) GetRequired ¶
func (x *FieldReceive) GetRequired() bool
func (*FieldReceive) ProtoMessage ¶
func (*FieldReceive) ProtoMessage()
func (*FieldReceive) ProtoReflect ¶
func (x *FieldReceive) ProtoReflect() protoreflect.Message
func (*FieldReceive) Reset ¶
func (x *FieldReceive) Reset()
func (*FieldReceive) String ¶
func (x *FieldReceive) String() string
type MessageAnnotation ¶
type MessageAnnotation struct { // delegate is a map with a string field `name`. The `name` field allows // overriding which message is targated when converted messages between // service versions. Delegate *Delegate `protobuf:"bytes,1,opt,name=delegate,proto3" json:"delegate,omitempty"` // deprecated indicates a message is not present in the next service version. // Deprecated messages must be present in the private service. Deprecated bool `protobuf:"varint,2,opt,name=deprecated,proto3" json:"deprecated,omitempty"` // converter is a map with a boolean field `empty`. Setting `empty` to true // generates the `Converter` method, but with nil return values only. This is // intended for cases where the conversion cannot be automated. Converter *Converter `protobuf:"bytes,3,opt,name=converter,proto3" json:"converter,omitempty"` // contains filtered or unexported fields }
func (*MessageAnnotation) Descriptor
deprecated
func (*MessageAnnotation) Descriptor() ([]byte, []int)
Deprecated: Use MessageAnnotation.ProtoReflect.Descriptor instead.
func (*MessageAnnotation) GetConverter ¶
func (x *MessageAnnotation) GetConverter() *Converter
func (*MessageAnnotation) GetDelegate ¶
func (x *MessageAnnotation) GetDelegate() *Delegate
func (*MessageAnnotation) GetDeprecated ¶
func (x *MessageAnnotation) GetDeprecated() bool
func (*MessageAnnotation) ProtoMessage ¶
func (*MessageAnnotation) ProtoMessage()
func (*MessageAnnotation) ProtoReflect ¶
func (x *MessageAnnotation) ProtoReflect() protoreflect.Message
func (*MessageAnnotation) Reset ¶
func (x *MessageAnnotation) Reset()
func (*MessageAnnotation) String ¶
func (x *MessageAnnotation) String() string
type MethodAnnotation ¶
type MethodAnnotation struct { // delegate is a map with a string field `name`. The `name` field allows // overriding which method is called next in the chain of service versions. Delegate *Delegate `protobuf:"bytes,1,opt,name=delegate,proto3" json:"delegate,omitempty"` // deprecated indicates a method is not present in the next service // version. Deprecated methods will call directly to the private service. Deprecated bool `protobuf:"varint,2,opt,name=deprecated,proto3" json:"deprecated,omitempty"` // converter is a map with a boolean field `empty`. Setting `empty` to true // generates the `Converter` methods for the RPC input and output messages, // but with nil return values only. This is intended for cases where either // message is external. Converter *Converter `protobuf:"bytes,3,opt,name=converter,proto3" json:"converter,omitempty"` // contains filtered or unexported fields }
func (*MethodAnnotation) Descriptor
deprecated
func (*MethodAnnotation) Descriptor() ([]byte, []int)
Deprecated: Use MethodAnnotation.ProtoReflect.Descriptor instead.
func (*MethodAnnotation) GetConverter ¶
func (x *MethodAnnotation) GetConverter() *Converter
func (*MethodAnnotation) GetDelegate ¶
func (x *MethodAnnotation) GetDelegate() *Delegate
func (*MethodAnnotation) GetDeprecated ¶
func (x *MethodAnnotation) GetDeprecated() bool
func (*MethodAnnotation) ProtoMessage ¶
func (*MethodAnnotation) ProtoMessage()
func (*MethodAnnotation) ProtoReflect ¶
func (x *MethodAnnotation) ProtoReflect() protoreflect.Message
func (*MethodAnnotation) Reset ¶
func (x *MethodAnnotation) Reset()
func (*MethodAnnotation) String ¶
func (x *MethodAnnotation) String() string
type Number ¶
type Number struct { // value allows setting a numeric value that matches the field type. // // Types that are assignable to Value: // *Number_Int64 // *Number_Double // *Number_Uint64 Value isNumber_Value `protobuf_oneof:"value"` // contains filtered or unexported fields }
func (*Number) Descriptor
deprecated
func (*Number) ProtoMessage ¶
func (*Number) ProtoMessage()
func (*Number) ProtoReflect ¶
func (x *Number) ProtoReflect() protoreflect.Message
type Number_Double ¶
type Number_Double struct {
Double float64 `protobuf:"fixed64,2,opt,name=double,proto3,oneof"`
}
type Number_Int64 ¶
type Number_Int64 struct {
Int64 int64 `protobuf:"varint,1,opt,name=int64,proto3,oneof"`
}
type Number_Uint64 ¶
type Number_Uint64 struct {
Uint64 uint64 `protobuf:"varint,3,opt,name=uint64,proto3,oneof"`
}
type OneofAnnotation ¶
type OneofAnnotation struct { // delegate is a map with a string field `name`. The `name` field allows // overriding which oneof is targated when reading and writing between // messages of service versions. Delegate *Delegate `protobuf:"bytes,1,opt,name=delegate,proto3" json:"delegate,omitempty"` // receive is a map with a boolean field of `required`. The `required` value // states that the oneof must be populated for the message to be compatible // with the service version. Receive *FieldReceive `protobuf:"bytes,2,opt,name=receive,proto3" json:"receive,omitempty"` // validate is a map with a boolean field of `required`. The `required` value // states that the oneof must be populated. See documentation of // `OneofValidate`. Validate *OneofValidate `protobuf:"bytes,3,opt,name=validate,proto3" json:"validate,omitempty"` // deprecated indicates a oneof is not present in the message of the next // service version. Deprecated oneofs must be present on the message of the // private service. Deprecated bool `protobuf:"varint,5,opt,name=deprecated,proto3" json:"deprecated,omitempty"` // contains filtered or unexported fields }
func (*OneofAnnotation) Descriptor
deprecated
func (*OneofAnnotation) Descriptor() ([]byte, []int)
Deprecated: Use OneofAnnotation.ProtoReflect.Descriptor instead.
func (*OneofAnnotation) GetDelegate ¶
func (x *OneofAnnotation) GetDelegate() *Delegate
func (*OneofAnnotation) GetDeprecated ¶
func (x *OneofAnnotation) GetDeprecated() bool
func (*OneofAnnotation) GetReceive ¶
func (x *OneofAnnotation) GetReceive() *FieldReceive
func (*OneofAnnotation) GetValidate ¶
func (x *OneofAnnotation) GetValidate() *OneofValidate
func (*OneofAnnotation) ProtoMessage ¶
func (*OneofAnnotation) ProtoMessage()
func (*OneofAnnotation) ProtoReflect ¶
func (x *OneofAnnotation) ProtoReflect() protoreflect.Message
func (*OneofAnnotation) Reset ¶
func (x *OneofAnnotation) Reset()
func (*OneofAnnotation) String ¶
func (x *OneofAnnotation) String() string
type OneofValidate ¶
type OneofValidate struct { // required ensures a field value is not nil. Required bool `protobuf:"varint,1,opt,name=required,proto3" json:"required,omitempty"` // contains filtered or unexported fields }
func (*OneofValidate) Descriptor
deprecated
func (*OneofValidate) Descriptor() ([]byte, []int)
Deprecated: Use OneofValidate.ProtoReflect.Descriptor instead.
func (*OneofValidate) GetRequired ¶
func (x *OneofValidate) GetRequired() bool
func (*OneofValidate) ProtoMessage ¶
func (*OneofValidate) ProtoMessage()
func (*OneofValidate) ProtoReflect ¶
func (x *OneofValidate) ProtoReflect() protoreflect.Message
func (*OneofValidate) Reset ¶
func (x *OneofValidate) Reset()
func (*OneofValidate) String ¶
func (x *OneofValidate) String() string
type Receive ¶
type Receive struct { // name is the target found in the next service. This should only be set when // the target name differs between service versions. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // names are multiple targets found in the next service. This should only be // set when multiple targets should assign the value. Names []string `protobuf:"bytes,2,rep,name=names,proto3" json:"names,omitempty"` // contains filtered or unexported fields }
func (*Receive) Descriptor
deprecated
func (*Receive) ProtoMessage ¶
func (*Receive) ProtoMessage()
func (*Receive) ProtoReflect ¶
func (x *Receive) ProtoReflect() protoreflect.Message
type Validate ¶
type Validate struct { // required ensures a field value is not nil, an empty string, false, or // zero. Required bool `protobuf:"varint,1,opt,name=required,proto3" json:"required,omitempty"` // min ensures the field value is of a minimum size or length. Min *Number `protobuf:"bytes,2,opt,name=min,proto3" json:"min,omitempty"` // max ensures the field value is of a maximum size or length. Max *Number `protobuf:"bytes,3,opt,name=max,proto3" json:"max,omitempty"` // is ensures a field value meets a specific format. The supported options are // `UUID`, `EMAIL`, and `URL`. Is Validate_IsType `protobuf:"varint,4,opt,name=is,proto3,enum=gen.svc.Validate_IsType" json:"is,omitempty"` // in ensures the field value is one of the provided values. All values are // provided as strings (eg: "true" or "1") and support enum values. In []string `protobuf:"bytes,5,rep,name=in,proto3" json:"in,omitempty"` // contains filtered or unexported fields }
func (*Validate) Descriptor
deprecated
func (*Validate) GetIs ¶
func (x *Validate) GetIs() Validate_IsType
func (*Validate) GetRequired ¶
func (*Validate) ProtoMessage ¶
func (*Validate) ProtoMessage()
func (*Validate) ProtoReflect ¶
func (x *Validate) ProtoReflect() protoreflect.Message
type Validate_IsType ¶
type Validate_IsType int32
const ( // UNSPECIFIED should not be used. Validate_UNSPECIFIED Validate_IsType = 0 // UUID targets the formats UUID v3 to v5. Validate_UUID Validate_IsType = 1 // EMAIL targets the format of an email address. Validate_EMAIL Validate_IsType = 2 // URL targets the format of a URL. Validate_URL Validate_IsType = 3 )
func (Validate_IsType) Descriptor ¶
func (Validate_IsType) Descriptor() protoreflect.EnumDescriptor
func (Validate_IsType) Enum ¶
func (x Validate_IsType) Enum() *Validate_IsType
func (Validate_IsType) EnumDescriptor
deprecated
func (Validate_IsType) EnumDescriptor() ([]byte, []int)
Deprecated: Use Validate_IsType.Descriptor instead.
func (Validate_IsType) Number ¶
func (x Validate_IsType) Number() protoreflect.EnumNumber
func (Validate_IsType) String ¶
func (x Validate_IsType) String() string
func (Validate_IsType) Type ¶
func (Validate_IsType) Type() protoreflect.EnumType