Documentation
¶
Index ¶
- Variables
- type BytesRules
- func (*BytesRules) Descriptor() ([]byte, []int)deprecated
- func (x *BytesRules) GetGt() uint64
- func (x *BytesRules) GetGte() uint64
- func (x *BytesRules) GetLen() uint64
- func (x *BytesRules) GetLt() uint64
- func (x *BytesRules) GetLte() uint64
- func (x *BytesRules) GetMax() uint64
- func (x *BytesRules) GetMin() uint64
- func (x *BytesRules) GetPrefix() string
- func (x *BytesRules) GetRequired() bool
- func (x *BytesRules) GetSuffix() string
- func (*BytesRules) ProtoMessage()
- func (x *BytesRules) ProtoReflect() protoreflect.Message
- func (x *BytesRules) Reset()
- func (x *BytesRules) String() string
- type DoubleRules
- func (*DoubleRules) Descriptor() ([]byte, []int)deprecated
- func (x *DoubleRules) GetEq() float64
- func (x *DoubleRules) GetGt() float64
- func (x *DoubleRules) GetGte() float64
- func (x *DoubleRules) GetLt() float64
- func (x *DoubleRules) GetLte() float64
- func (x *DoubleRules) GetMax() float64
- func (x *DoubleRules) GetMin() float64
- func (x *DoubleRules) GetRequired() bool
- func (*DoubleRules) ProtoMessage()
- func (x *DoubleRules) ProtoReflect() protoreflect.Message
- func (x *DoubleRules) Reset()
- func (x *DoubleRules) String() string
- type FieldRules
- func (*FieldRules) Descriptor() ([]byte, []int)deprecated
- func (x *FieldRules) GetBytes() *BytesRules
- func (x *FieldRules) GetDouble() *DoubleRules
- func (x *FieldRules) GetFloat() *FloatRules
- func (x *FieldRules) GetInt32() *Int32Rules
- func (x *FieldRules) GetInt64() *Int64Rules
- func (x *FieldRules) GetMessage() *MessageRules
- func (x *FieldRules) GetRepeated() *RepeatedRules
- func (x *FieldRules) GetString_() *StringRules
- func (m *FieldRules) GetType() isFieldRules_Type
- func (x *FieldRules) GetUint32() *UInt32Rules
- func (x *FieldRules) GetUint64() *UInt64Rules
- func (*FieldRules) ProtoMessage()
- func (x *FieldRules) ProtoReflect() protoreflect.Message
- func (x *FieldRules) Reset()
- func (x *FieldRules) String() string
- type FieldRules_Bytes
- type FieldRules_Double
- type FieldRules_Float
- type FieldRules_Int32
- type FieldRules_Int64
- type FieldRules_Repeated
- type FieldRules_String_
- type FieldRules_Uint32
- type FieldRules_Uint64
- type FloatRules
- func (*FloatRules) Descriptor() ([]byte, []int)deprecated
- func (x *FloatRules) GetEq() float32
- func (x *FloatRules) GetGt() float32
- func (x *FloatRules) GetGte() float32
- func (x *FloatRules) GetLt() float32
- func (x *FloatRules) GetLte() float32
- func (x *FloatRules) GetMax() float32
- func (x *FloatRules) GetMin() float32
- func (x *FloatRules) GetRequired() bool
- func (*FloatRules) ProtoMessage()
- func (x *FloatRules) ProtoReflect() protoreflect.Message
- func (x *FloatRules) Reset()
- func (x *FloatRules) String() string
- type Int32Rules
- func (*Int32Rules) Descriptor() ([]byte, []int)deprecated
- func (x *Int32Rules) GetEq() int32
- func (x *Int32Rules) GetGt() int32
- func (x *Int32Rules) GetGte() int32
- func (x *Int32Rules) GetLt() int32
- func (x *Int32Rules) GetLte() int32
- func (x *Int32Rules) GetMax() int32
- func (x *Int32Rules) GetMin() int32
- func (x *Int32Rules) GetRequired() bool
- func (*Int32Rules) ProtoMessage()
- func (x *Int32Rules) ProtoReflect() protoreflect.Message
- func (x *Int32Rules) Reset()
- func (x *Int32Rules) String() string
- type Int64Rules
- func (*Int64Rules) Descriptor() ([]byte, []int)deprecated
- func (x *Int64Rules) GetEq() int64
- func (x *Int64Rules) GetGt() int64
- func (x *Int64Rules) GetGte() int64
- func (x *Int64Rules) GetLt() int64
- func (x *Int64Rules) GetLte() int64
- func (x *Int64Rules) GetMax() int64
- func (x *Int64Rules) GetMin() int64
- func (x *Int64Rules) GetRequired() bool
- func (*Int64Rules) ProtoMessage()
- func (x *Int64Rules) ProtoReflect() protoreflect.Message
- func (x *Int64Rules) Reset()
- func (x *Int64Rules) String() string
- type MessageRules
- func (*MessageRules) Descriptor() ([]byte, []int)deprecated
- func (x *MessageRules) GetRequired() bool
- func (x *MessageRules) GetSkip() bool
- func (*MessageRules) ProtoMessage()
- func (x *MessageRules) ProtoReflect() protoreflect.Message
- func (x *MessageRules) Reset()
- func (x *MessageRules) String() string
- type RepeatedRules
- func (*RepeatedRules) Descriptor() ([]byte, []int)deprecated
- func (x *RepeatedRules) GetMax() uint64
- func (x *RepeatedRules) GetMin() uint64
- func (*RepeatedRules) ProtoMessage()
- func (x *RepeatedRules) ProtoReflect() protoreflect.Message
- func (x *RepeatedRules) Reset()
- func (x *RepeatedRules) String() string
- type StringRules
- func (*StringRules) Descriptor() ([]byte, []int)deprecated
- func (x *StringRules) GetAllowSpace() bool
- func (x *StringRules) GetAsciiOnly() bool
- func (x *StringRules) GetContains() string
- func (x *StringRules) GetGt() uint64
- func (x *StringRules) GetLen() uint64
- func (x *StringRules) GetLt() uint64
- func (x *StringRules) GetMatch() string
- func (x *StringRules) GetMax() uint64
- func (x *StringRules) GetMin() uint64
- func (x *StringRules) GetNotContains() string
- func (x *StringRules) GetNotMatch() string
- func (x *StringRules) GetPrefix() string
- func (x *StringRules) GetRequired() bool
- func (x *StringRules) GetSuffix() string
- func (*StringRules) ProtoMessage()
- func (x *StringRules) ProtoReflect() protoreflect.Message
- func (x *StringRules) Reset()
- func (x *StringRules) String() string
- type UInt32Rules
- func (*UInt32Rules) Descriptor() ([]byte, []int)deprecated
- func (x *UInt32Rules) GetEq() uint32
- func (x *UInt32Rules) GetGt() uint32
- func (x *UInt32Rules) GetGte() uint32
- func (x *UInt32Rules) GetLt() uint32
- func (x *UInt32Rules) GetLte() uint32
- func (x *UInt32Rules) GetMax() uint32
- func (x *UInt32Rules) GetMin() uint32
- func (x *UInt32Rules) GetRequired() bool
- func (*UInt32Rules) ProtoMessage()
- func (x *UInt32Rules) ProtoReflect() protoreflect.Message
- func (x *UInt32Rules) Reset()
- func (x *UInt32Rules) String() string
- type UInt64Rules
- func (*UInt64Rules) Descriptor() ([]byte, []int)deprecated
- func (x *UInt64Rules) GetEq() uint64
- func (x *UInt64Rules) GetGt() uint64
- func (x *UInt64Rules) GetGte() uint64
- func (x *UInt64Rules) GetLt() uint64
- func (x *UInt64Rules) GetLte() uint64
- func (x *UInt64Rules) GetMax() uint64
- func (x *UInt64Rules) GetMin() uint64
- func (x *UInt64Rules) GetRequired() bool
- func (*UInt64Rules) ProtoMessage()
- func (x *UInt64Rules) ProtoReflect() protoreflect.Message
- func (x *UInt64Rules) Reset()
- func (x *UInt64Rules) String() string
Constants ¶
This section is empty.
Variables ¶
var (
// optional validate.FieldRules field = 1081;
E_Field = &file_validate_validate_proto_extTypes[0]
)
Extension fields to descriptorpb.FieldOptions.
var File_validate_validate_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type BytesRules ¶
type BytesRules struct { // Require field value have a specific length. // // “`protobuf // message CheckCertificateRequest { // bytes pem_block = 1 [(validate.field).bytes.len = 2000]; // } // “` Len *uint64 `protobuf:"varint,1,opt,name=len,proto3,oneof" json:"len,omitempty"` // Require field value be greater than a specific length. // // “`protobuf // message SignMessageRequest { // bytes msg = 1 [(validate.field).bytes.gt = 0]; // } // “` Gt *uint64 `protobuf:"varint,2,opt,name=gt,proto3,oneof" json:"gt,omitempty"` // Require field value be less than a specific length. // // “`protobuf // message SignMessageRequest { // bytes msg = 1 [(validate.field).bytes.lt = 5000]; // } // “` Lt *uint64 `protobuf:"varint,3,opt,name=lt,proto3,oneof" json:"lt,omitempty"` // Require field value be greater than or equal to a specific length. // // “`protobuf // message SignMessageRequest { // bytes msg = 1 [(validate.field).bytes.gte = 1]; // } // “` Gte *uint64 `protobuf:"varint,4,opt,name=gte,proto3,oneof" json:"gte,omitempty"` // Require field value be less than or equal to a specific length. // // “`protobuf // message SignMessageRequest { // bytes msg = 1 [(validate.field).bytes.lte = 500]; // } // “` Lte *uint64 `protobuf:"varint,5,opt,name=lte,proto3,oneof" json:"lte,omitempty"` // Require field value to have a specific minimum length. // // “`protobuf // message SignMessageRequest { // bytes msg = 1 [(validate.field).bytes.min = 1]; // } // “` Min *uint64 `protobuf:"varint,6,opt,name=min,proto3,oneof" json:"min,omitempty"` // Require field value to have a specific maximum length. // // “`protobuf // message SignMessageRequest { // bytes msg = 1 [(validate.field).bytes.max = 500]; // } // “` Max *uint64 `protobuf:"varint,7,opt,name=max,proto3,oneof" json:"max,omitempty"` // Require field value to have a specific prefix. // // “`protobuf // message StoreKeyRequest { // bytes key = 1 [(validate.field).bytes.prefix = "-----BEGIN PRIVATE KEY-----\n"]; // } // “` Prefix *string `protobuf:"bytes,8,opt,name=prefix,proto3,oneof" json:"prefix,omitempty"` // Require field value to have a specific suffix. // // “`protobuf // message StoreKeyRequest { // bytes key = 1 [(validate.field).bytes.suffix = "-----END PRIVATE KEY-----\n"]; // } // “` Suffix *string `protobuf:"bytes,9,opt,name=suffix,proto3,oneof" json:"suffix,omitempty"` // Require a non-empty chunk of bytes. // // “`protobuf // message StoreKeyRequest { // bytes key = 1 [(validate.field).bytes.required = true]; // } // “` Required *bool `protobuf:"varint,10,opt,name=required,proto3,oneof" json:"required,omitempty"` // contains filtered or unexported fields }
BytesRules contain all of the possible validation for bytes types.
func (*BytesRules) Descriptor
deprecated
func (*BytesRules) Descriptor() ([]byte, []int)
Deprecated: Use BytesRules.ProtoReflect.Descriptor instead.
func (*BytesRules) GetGt ¶
func (x *BytesRules) GetGt() uint64
func (*BytesRules) GetGte ¶
func (x *BytesRules) GetGte() uint64
func (*BytesRules) GetLen ¶
func (x *BytesRules) GetLen() uint64
func (*BytesRules) GetLt ¶
func (x *BytesRules) GetLt() uint64
func (*BytesRules) GetLte ¶
func (x *BytesRules) GetLte() uint64
func (*BytesRules) GetMax ¶
func (x *BytesRules) GetMax() uint64
func (*BytesRules) GetMin ¶
func (x *BytesRules) GetMin() uint64
func (*BytesRules) GetPrefix ¶
func (x *BytesRules) GetPrefix() string
func (*BytesRules) GetRequired ¶
func (x *BytesRules) GetRequired() bool
func (*BytesRules) GetSuffix ¶
func (x *BytesRules) GetSuffix() string
func (*BytesRules) ProtoMessage ¶
func (*BytesRules) ProtoMessage()
func (*BytesRules) ProtoReflect ¶
func (x *BytesRules) ProtoReflect() protoreflect.Message
func (*BytesRules) Reset ¶
func (x *BytesRules) Reset()
func (*BytesRules) String ¶
func (x *BytesRules) String() string
type DoubleRules ¶
type DoubleRules struct { // Require field value to equal a specific value. // // “`protobuf // message AwardPointsRequest { // double points = 1 [(validate.field).double.eq = 10]; // } // “` Eq *float64 `protobuf:"fixed64,1,opt,name=eq,proto3,oneof" json:"eq,omitempty"` // Require field value be greater than a specific value. // // “`protobuf // message AwardPointsRequest { // double points = 1 [(validate.field).double.gt = 0]; // } // “` Gt *float64 `protobuf:"fixed64,2,opt,name=gt,proto3,oneof" json:"gt,omitempty"` // Require field value be less than a specific value. // // “`protobuf // message AwardPointsRequest { // double points = 1 [(validate.field).double.lt = 1000]; // } // “` Lt *float64 `protobuf:"fixed64,3,opt,name=lt,proto3,oneof" json:"lt,omitempty"` // Require field value be greater than or equal to a specific value. // // “`protobuf // message AwardPointsRequest { // double points = 1 [(validate.field).double.gte = 1]; // } // “` Gte *float64 `protobuf:"fixed64,4,opt,name=gte,proto3,oneof" json:"gte,omitempty"` // Require field value be greater than or equal to a specific value. // // “`protobuf // message AwardPointsRequest { // double points = 1 [(validate.field).double.lte = 100]; // } // “` Lte *float64 `protobuf:"fixed64,5,opt,name=lte,proto3,oneof" json:"lte,omitempty"` // Require field value to have a specific minimum value. // // “`protobuf // message AwardPointsRequest { // uint points = 1 [(validate.field).double.min = 1]; // } // “` Min *float64 `protobuf:"fixed64,6,opt,name=min,proto3,oneof" json:"min,omitempty"` // Require field value to have a specific maximum value. // // “`protobuf // message AwardPointsRequest { // double points = 1 [(validate.field).double.min = 1]; // } // “` Max *float64 `protobuf:"fixed64,7,opt,name=max,proto3,oneof" json:"max,omitempty"` // Require field to have a non-empty and non-zero value. // // “`protobuf // message AwardPointsRequest { // double points = 1 [(validate.field).double.required = true]; // } // “` Required *bool `protobuf:"varint,10,opt,name=required,proto3,oneof" json:"required,omitempty"` // contains filtered or unexported fields }
DoubleRules contain all of the possible validation for double types.
func (*DoubleRules) Descriptor
deprecated
func (*DoubleRules) Descriptor() ([]byte, []int)
Deprecated: Use DoubleRules.ProtoReflect.Descriptor instead.
func (*DoubleRules) GetEq ¶
func (x *DoubleRules) GetEq() float64
func (*DoubleRules) GetGt ¶
func (x *DoubleRules) GetGt() float64
func (*DoubleRules) GetGte ¶
func (x *DoubleRules) GetGte() float64
func (*DoubleRules) GetLt ¶
func (x *DoubleRules) GetLt() float64
func (*DoubleRules) GetLte ¶
func (x *DoubleRules) GetLte() float64
func (*DoubleRules) GetMax ¶
func (x *DoubleRules) GetMax() float64
func (*DoubleRules) GetMin ¶
func (x *DoubleRules) GetMin() float64
func (*DoubleRules) GetRequired ¶
func (x *DoubleRules) GetRequired() bool
func (*DoubleRules) ProtoMessage ¶
func (*DoubleRules) ProtoMessage()
func (*DoubleRules) ProtoReflect ¶
func (x *DoubleRules) ProtoReflect() protoreflect.Message
func (*DoubleRules) Reset ¶
func (x *DoubleRules) Reset()
func (*DoubleRules) String ¶
func (x *DoubleRules) String() string
type FieldRules ¶
type FieldRules struct { // Define validation rules for message fields. // // “`protobuf // message Outer { // message Inner {} // // Inner inner = 1 [(validate.field).message = { // required: true, // }]; // } // “` Message *MessageRules `protobuf:"bytes,9,opt,name=message,proto3,oneof" json:"message,omitempty"` // Types that are assignable to Type: // // *FieldRules_String_ // *FieldRules_Bytes // *FieldRules_Uint32 // *FieldRules_Uint64 // *FieldRules_Int32 // *FieldRules_Int64 // *FieldRules_Float // *FieldRules_Double // *FieldRules_Repeated Type isFieldRules_Type `protobuf_oneof:"type"` // contains filtered or unexported fields }
Field defines validation behavior for specific message field types.
func (*FieldRules) Descriptor
deprecated
func (*FieldRules) Descriptor() ([]byte, []int)
Deprecated: Use FieldRules.ProtoReflect.Descriptor instead.
func (*FieldRules) GetBytes ¶
func (x *FieldRules) GetBytes() *BytesRules
func (*FieldRules) GetDouble ¶
func (x *FieldRules) GetDouble() *DoubleRules
func (*FieldRules) GetFloat ¶
func (x *FieldRules) GetFloat() *FloatRules
func (*FieldRules) GetInt32 ¶
func (x *FieldRules) GetInt32() *Int32Rules
func (*FieldRules) GetInt64 ¶
func (x *FieldRules) GetInt64() *Int64Rules
func (*FieldRules) GetMessage ¶
func (x *FieldRules) GetMessage() *MessageRules
func (*FieldRules) GetRepeated ¶
func (x *FieldRules) GetRepeated() *RepeatedRules
func (*FieldRules) GetString_ ¶
func (x *FieldRules) GetString_() *StringRules
func (*FieldRules) GetType ¶
func (m *FieldRules) GetType() isFieldRules_Type
func (*FieldRules) GetUint32 ¶
func (x *FieldRules) GetUint32() *UInt32Rules
func (*FieldRules) GetUint64 ¶
func (x *FieldRules) GetUint64() *UInt64Rules
func (*FieldRules) ProtoMessage ¶
func (*FieldRules) ProtoMessage()
func (*FieldRules) ProtoReflect ¶
func (x *FieldRules) ProtoReflect() protoreflect.Message
func (*FieldRules) Reset ¶
func (x *FieldRules) Reset()
func (*FieldRules) String ¶
func (x *FieldRules) String() string
type FieldRules_Bytes ¶
type FieldRules_Bytes struct { // Define validation rules for message fields of type `bytes`. // // “`protobuf // message UploadBlobRequest { // bytes blob = 1 [(validate.field).bytes = { // min: 1, // max: 1024, // }]; // } // “` Bytes *BytesRules `protobuf:"bytes,2,opt,name=bytes,proto3,oneof"` }
type FieldRules_Double ¶
type FieldRules_Double struct { // Define validation rules for message fields of type `double`. // // “`protobuf // message AddFuelRequest { // double ammount = 1 [(validate.field).double = { // gt: 0, // }]; // } // “` Double *DoubleRules `protobuf:"bytes,8,opt,name=double,proto3,oneof"` }
type FieldRules_Float ¶
type FieldRules_Float struct { // Define validation rules for message fields of type `float32`. // // “`protobuf // message AddFuelRequest { // float ammount = 1 [(validate.field).float = { // gt: 0, // }]; // } // “` Float *FloatRules `protobuf:"bytes,7,opt,name=float,proto3,oneof"` }
type FieldRules_Int32 ¶
type FieldRules_Int32 struct { // Define validation rules for message fields of type `int32`. // // “`protobuf // message AddPointsRequest { // int32 points = 1 [(validate.field).int32 = { // gte: 1, // lte: 100, // }]; // } // “` Int32 *Int32Rules `protobuf:"bytes,5,opt,name=int32,proto3,oneof"` }
type FieldRules_Int64 ¶
type FieldRules_Int64 struct { // Define validation rules for message fields of type `int64`. // // “`protobuf // message AddPointsRequest { // int64 points = 1 [(validate.field).int64 = { // gte: 1, // lte: 100, // }]; // } // “` Int64 *Int64Rules `protobuf:"bytes,6,opt,name=int64,proto3,oneof"` }
type FieldRules_Repeated ¶
type FieldRules_Repeated struct { // Define validation rules for message fields of type `repeated`. // // “`protobuf // message AddFuelRequest { // repeated string fuel_types = 1 [(validate.field).repeated = { // min: 1, // max: 3, // }]; // } // “` Repeated *RepeatedRules `protobuf:"bytes,10,opt,name=repeated,proto3,oneof"` }
type FieldRules_String_ ¶
type FieldRules_String_ struct { // Define validation rules for message fields of type `string`. // // “`protobuf // message CreateUserRequest { // string name = 1 [(validate.field).string = { // min: 1, // max: 255, // allow_space: false, // ascii_only: true, // }]; // string password = 2 [(validate.field).string = { // min: 8, // max: 255, // }]; // } // “` String_ *StringRules `protobuf:"bytes,1,opt,name=string,proto3,oneof"` }
type FieldRules_Uint32 ¶
type FieldRules_Uint32 struct { // Define validation rules for message fields of type `uint32`. // // “`protobuf // message AddPointsRequest { // uint32 points = 1 [(validate.field).uint32 = { // gte: 1, // lte: 100, // }]; // } // “` Uint32 *UInt32Rules `protobuf:"bytes,3,opt,name=uint32,proto3,oneof"` }
type FieldRules_Uint64 ¶
type FieldRules_Uint64 struct { // Define validation rules for message fields of type `uint64`. // // “`protobuf // message AddPointsRequest { // uint64 points = 1 [(validate.field).uint64 = { // gte: 1, // lte: 100, // }]; // } // “` Uint64 *UInt64Rules `protobuf:"bytes,4,opt,name=uint64,proto3,oneof"` }
type FloatRules ¶
type FloatRules struct { // Require field value to equal a specific value. // // “`protobuf // message AwardPointsRequest { // float points = 1 [(validate.field).float.eq = 10]; // } // “` Eq *float32 `protobuf:"fixed32,1,opt,name=eq,proto3,oneof" json:"eq,omitempty"` // Require field value be greater than a specific value. // // “`protobuf // message AwardPointsRequest { // float points = 1 [(validate.field).float.gt = 0]; // } // “` Gt *float32 `protobuf:"fixed32,2,opt,name=gt,proto3,oneof" json:"gt,omitempty"` // Require field value be less than a specific value. // // “`protobuf // message AwardPointsRequest { // float points = 1 [(validate.field).float.lt = 1000]; // } // “` Lt *float32 `protobuf:"fixed32,3,opt,name=lt,proto3,oneof" json:"lt,omitempty"` // Require field value be greater than or equal to a specific value. // // “`protobuf // message AwardPointsRequest { // float points = 1 [(validate.field).float.gte = 1]; // } // “` Gte *float32 `protobuf:"fixed32,4,opt,name=gte,proto3,oneof" json:"gte,omitempty"` // Require field value be greater than or equal to a specific value. // // “`protobuf // message AwardPointsRequest { // float points = 1 [(validate.field).float.lte = 100]; // } // “` Lte *float32 `protobuf:"fixed32,5,opt,name=lte,proto3,oneof" json:"lte,omitempty"` // Require field value to have a specific minimum value. // // “`protobuf // message AwardPointsRequest { // uint points = 1 [(validate.field).float.min = 1]; // } // “` Min *float32 `protobuf:"fixed32,6,opt,name=min,proto3,oneof" json:"min,omitempty"` // Require field value to have a specific maximum value. // // “`protobuf // message AwardPointsRequest { // float points = 1 [(validate.field).float.min = 1]; // } // “` Max *float32 `protobuf:"fixed32,7,opt,name=max,proto3,oneof" json:"max,omitempty"` // Require field to have a non-empty and non-zero value. // // “`protobuf // message AwardPointsRequest { // float points = 1 [(validate.field).float.required = true]; // } // “` Required *bool `protobuf:"varint,10,opt,name=required,proto3,oneof" json:"required,omitempty"` // contains filtered or unexported fields }
FloatRules contain all of the possible validation for float types.
func (*FloatRules) Descriptor
deprecated
func (*FloatRules) Descriptor() ([]byte, []int)
Deprecated: Use FloatRules.ProtoReflect.Descriptor instead.
func (*FloatRules) GetEq ¶
func (x *FloatRules) GetEq() float32
func (*FloatRules) GetGt ¶
func (x *FloatRules) GetGt() float32
func (*FloatRules) GetGte ¶
func (x *FloatRules) GetGte() float32
func (*FloatRules) GetLt ¶
func (x *FloatRules) GetLt() float32
func (*FloatRules) GetLte ¶
func (x *FloatRules) GetLte() float32
func (*FloatRules) GetMax ¶
func (x *FloatRules) GetMax() float32
func (*FloatRules) GetMin ¶
func (x *FloatRules) GetMin() float32
func (*FloatRules) GetRequired ¶
func (x *FloatRules) GetRequired() bool
func (*FloatRules) ProtoMessage ¶
func (*FloatRules) ProtoMessage()
func (*FloatRules) ProtoReflect ¶
func (x *FloatRules) ProtoReflect() protoreflect.Message
func (*FloatRules) Reset ¶
func (x *FloatRules) Reset()
func (*FloatRules) String ¶
func (x *FloatRules) String() string
type Int32Rules ¶
type Int32Rules struct { // Require field value to equal a specific value. // // “`protobuf // message AwardPointsRequest { // int32 points = 1 [(validate.field).int32.eq = 10]; // } // “` Eq *int32 `protobuf:"varint,1,opt,name=eq,proto3,oneof" json:"eq,omitempty"` // Require field value be greater than a specific value. // // “`protobuf // message AwardPointsRequest { // int32 points = 1 [(validate.field).int32.gt = 0]; // } // “` Gt *int32 `protobuf:"varint,2,opt,name=gt,proto3,oneof" json:"gt,omitempty"` // Require field value be less than a specific value. // // “`protobuf // message AwardPointsRequest { // int32 points = 1 [(validate.field).int32.lt = 1000]; // } // “` Lt *int32 `protobuf:"varint,3,opt,name=lt,proto3,oneof" json:"lt,omitempty"` // Require field value be greater than or equal to a specific value. // // “`protobuf // message AwardPointsRequest { // int32 points = 1 [(validate.field).int32.gte = 1]; // } // “` Gte *int32 `protobuf:"varint,4,opt,name=gte,proto3,oneof" json:"gte,omitempty"` // Require field value be greater than or equal to a specific value. // // “`protobuf // message AwardPointsRequest { // int32 points = 1 [(validate.field).int32.lte = 100]; // } // “` Lte *int32 `protobuf:"varint,5,opt,name=lte,proto3,oneof" json:"lte,omitempty"` // Require field value to have a specific minimum value. // // “`protobuf // message AwardPointsRequest { // int32 points = 1 [(validate.field).int32.min = 1]; // } // “` Min *int32 `protobuf:"varint,6,opt,name=min,proto3,oneof" json:"min,omitempty"` // Require field value to have a specific maximum value. // // “`protobuf // message AwardPointsRequest { // int32 points = 1 [(validate.field).int32.min = 1]; // } // “` Max *int32 `protobuf:"varint,7,opt,name=max,proto3,oneof" json:"max,omitempty"` // Require field to have a non-empty and non-zero value. // // “`protobuf // message AwardPointsRequest { // int32 points = 1 [(validate.field).int32.required = true]; // } // “` Required *bool `protobuf:"varint,10,opt,name=required,proto3,oneof" json:"required,omitempty"` // contains filtered or unexported fields }
Int32Rules contain all of the possible validation for int32 types.
func (*Int32Rules) Descriptor
deprecated
func (*Int32Rules) Descriptor() ([]byte, []int)
Deprecated: Use Int32Rules.ProtoReflect.Descriptor instead.
func (*Int32Rules) GetEq ¶
func (x *Int32Rules) GetEq() int32
func (*Int32Rules) GetGt ¶
func (x *Int32Rules) GetGt() int32
func (*Int32Rules) GetGte ¶
func (x *Int32Rules) GetGte() int32
func (*Int32Rules) GetLt ¶
func (x *Int32Rules) GetLt() int32
func (*Int32Rules) GetLte ¶
func (x *Int32Rules) GetLte() int32
func (*Int32Rules) GetMax ¶
func (x *Int32Rules) GetMax() int32
func (*Int32Rules) GetMin ¶
func (x *Int32Rules) GetMin() int32
func (*Int32Rules) GetRequired ¶
func (x *Int32Rules) GetRequired() bool
func (*Int32Rules) ProtoMessage ¶
func (*Int32Rules) ProtoMessage()
func (*Int32Rules) ProtoReflect ¶
func (x *Int32Rules) ProtoReflect() protoreflect.Message
func (*Int32Rules) Reset ¶
func (x *Int32Rules) Reset()
func (*Int32Rules) String ¶
func (x *Int32Rules) String() string
type Int64Rules ¶
type Int64Rules struct { // Require field value to equal a specific value. // // “`protobuf // message AwardPointsRequest { // int64 points = 1 [(validate.field).int64.eq = 10]; // } // “` Eq *int64 `protobuf:"varint,1,opt,name=eq,proto3,oneof" json:"eq,omitempty"` // Require field value be greater than a specific value. // // “`protobuf // message AwardPointsRequest { // int64 points = 1 [(validate.field).int64.gt = 0]; // } // “` Gt *int64 `protobuf:"varint,2,opt,name=gt,proto3,oneof" json:"gt,omitempty"` // Require field value be less than a specific value. // // “`protobuf // message AwardPointsRequest { // int64 points = 1 [(validate.field).int64.lt = 1000]; // } // “` Lt *int64 `protobuf:"varint,3,opt,name=lt,proto3,oneof" json:"lt,omitempty"` // Require field value be greater than or equal to a specific value. // // “`protobuf // message AwardPointsRequest { // int64 points = 1 [(validate.field).int64.gte = 1]; // } // “` Gte *int64 `protobuf:"varint,4,opt,name=gte,proto3,oneof" json:"gte,omitempty"` // Require field value be greater than or equal to a specific value. // // “`protobuf // message AwardPointsRequest { // int64 points = 1 [(validate.field).int64.lte = 100]; // } // “` Lte *int64 `protobuf:"varint,5,opt,name=lte,proto3,oneof" json:"lte,omitempty"` // Require field value to have a specific minimum value. // // “`protobuf // message AwardPointsRequest { // uint points = 1 [(validate.field).int64.min = 1]; // } // “` Min *int64 `protobuf:"varint,6,opt,name=min,proto3,oneof" json:"min,omitempty"` // Require field value to have a specific maximum value. // // “`protobuf // message AwardPointsRequest { // int64 points = 1 [(validate.field).int64.min = 1]; // } // “` Max *int64 `protobuf:"varint,7,opt,name=max,proto3,oneof" json:"max,omitempty"` // Require field to have a non-empty and non-zero value. // // “`protobuf // message AwardPointsRequest { // int64 points = 1 [(validate.field).int64.required = true]; // } // “` Required *bool `protobuf:"varint,10,opt,name=required,proto3,oneof" json:"required,omitempty"` // contains filtered or unexported fields }
Int64Rules contain all of the possible validation for int64 types.
func (*Int64Rules) Descriptor
deprecated
func (*Int64Rules) Descriptor() ([]byte, []int)
Deprecated: Use Int64Rules.ProtoReflect.Descriptor instead.
func (*Int64Rules) GetEq ¶
func (x *Int64Rules) GetEq() int64
func (*Int64Rules) GetGt ¶
func (x *Int64Rules) GetGt() int64
func (*Int64Rules) GetGte ¶
func (x *Int64Rules) GetGte() int64
func (*Int64Rules) GetLt ¶
func (x *Int64Rules) GetLt() int64
func (*Int64Rules) GetLte ¶
func (x *Int64Rules) GetLte() int64
func (*Int64Rules) GetMax ¶
func (x *Int64Rules) GetMax() int64
func (*Int64Rules) GetMin ¶
func (x *Int64Rules) GetMin() int64
func (*Int64Rules) GetRequired ¶
func (x *Int64Rules) GetRequired() bool
func (*Int64Rules) ProtoMessage ¶
func (*Int64Rules) ProtoMessage()
func (*Int64Rules) ProtoReflect ¶
func (x *Int64Rules) ProtoReflect() protoreflect.Message
func (*Int64Rules) Reset ¶
func (x *Int64Rules) Reset()
func (*Int64Rules) String ¶
func (x *Int64Rules) String() string
type MessageRules ¶
type MessageRules struct { // Skip specifies that the validation rules of this field should not be // evaluated Skip *bool `protobuf:"varint,1,opt,name=skip,proto3,oneof" json:"skip,omitempty"` // Required specifies that this field must be set Required *bool `protobuf:"varint,2,opt,name=required,proto3,oneof" json:"required,omitempty"` // contains filtered or unexported fields }
MessageRules describe the constraints applied to embedded message values.
For message-type fields, validation is performed recursively.
func (*MessageRules) Descriptor
deprecated
func (*MessageRules) Descriptor() ([]byte, []int)
Deprecated: Use MessageRules.ProtoReflect.Descriptor instead.
func (*MessageRules) GetRequired ¶
func (x *MessageRules) GetRequired() bool
func (*MessageRules) GetSkip ¶
func (x *MessageRules) GetSkip() bool
func (*MessageRules) ProtoMessage ¶
func (*MessageRules) ProtoMessage()
func (*MessageRules) ProtoReflect ¶
func (x *MessageRules) ProtoReflect() protoreflect.Message
func (*MessageRules) Reset ¶
func (x *MessageRules) Reset()
func (*MessageRules) String ¶
func (x *MessageRules) String() string
type RepeatedRules ¶
type RepeatedRules struct { // MinItems specifies that this field must have the specified number of // items at a minimum Min *uint64 `protobuf:"varint,1,opt,name=min,proto3,oneof" json:"min,omitempty"` // MaxItems specifies that this field must have the specified number of // items at a maximum Max *uint64 `protobuf:"varint,2,opt,name=max,proto3,oneof" json:"max,omitempty"` // contains filtered or unexported fields }
RepeatedRules describe the constraints applied to `repeated` values
func (*RepeatedRules) Descriptor
deprecated
func (*RepeatedRules) Descriptor() ([]byte, []int)
Deprecated: Use RepeatedRules.ProtoReflect.Descriptor instead.
func (*RepeatedRules) GetMax ¶
func (x *RepeatedRules) GetMax() uint64
func (*RepeatedRules) GetMin ¶
func (x *RepeatedRules) GetMin() uint64
func (*RepeatedRules) ProtoMessage ¶
func (*RepeatedRules) ProtoMessage()
func (*RepeatedRules) ProtoReflect ¶
func (x *RepeatedRules) ProtoReflect() protoreflect.Message
func (*RepeatedRules) Reset ¶
func (x *RepeatedRules) Reset()
func (*RepeatedRules) String ¶
func (x *RepeatedRules) String() string
type StringRules ¶
type StringRules struct { // Require field value have a specific length. // // “`protobuf // message ReadUserByIDRequest { // string uuid = 1 [(validate.field).string.len = 16]; // } // “` Len *uint64 `protobuf:"varint,1,opt,name=len,proto3,oneof" json:"len,omitempty"` // Require field value be greater than a specific length. // // “`protobuf // message ReadUserByEmailRequest { // string email = 1 [(validate.field).string.gt = 0]; // } // “` Gt *uint64 `protobuf:"varint,2,opt,name=gt,proto3,oneof" json:"gt,omitempty"` // Require field value be less than a specific length. // // “`protobuf // message RegisterUserRequest { // string email = 1 [(validate.field).string.lt = 256]; // } // “` Lt *uint64 `protobuf:"varint,3,opt,name=lt,proto3,oneof" json:"lt,omitempty"` // Require field value contains a specific sub-string. // // “`protobuf // message RegisterUserRequest { // string email = 1 [(validate.field).string.contains = "@"]; // } // “` Contains *string `protobuf:"bytes,5,opt,name=contains,proto3,oneof" json:"contains,omitempty"` // Require field value does not contain a specific sub-string. // // “`protobuf // message RegisterUserRequest { // string name = 1 [(validate.field).string.not_contains = " "]; // } // “` NotContains *string `protobuf:"bytes,6,opt,name=not_contains,json=notContains,proto3,oneof" json:"not_contains,omitempty"` // Require field value has a specific prefix. // // “`protobuf // message TweetAtUserRequest { // string name = 1 [(validate.field).string.prefix = "@"]; // } // “` Prefix *string `protobuf:"bytes,7,opt,name=prefix,proto3,oneof" json:"prefix,omitempty"` // Require field value has a specific suffix. // // “`protobuf // message WriteRequest { // string paragraph = 1 [(validate.field).string.suffix = "."]; // } // “` Suffix *string `protobuf:"bytes,8,opt,name=suffix,proto3,oneof" json:"suffix,omitempty"` // Allow (or not) spaces. // // “`protobuf // message RegisterUserRequest { // string name = 1 [(validate.field).string.allow_spaces = false]; // } // “` AllowSpace *bool `protobuf:"varint,9,opt,name=allow_space,json=allowSpace,proto3,oneof" json:"allow_space,omitempty"` // Require field value uses only ASCII characters. // // “`protobuf // message RegisterUserRequest { // string name = 1 [(validate.field).string.ascii_only = true]; // } // “` AsciiOnly *bool `protobuf:"varint,10,opt,name=ascii_only,json=asciiOnly,proto3,oneof" json:"ascii_only,omitempty"` // Require field value have a specific minimum length. // // “`protobuf // message RegisterUserRequest { // string name = 1 [(validate.field).string.min = 1]; // } // “` Min *uint64 `protobuf:"varint,11,opt,name=min,proto3,oneof" json:"min,omitempty"` // Require field value have a specific maximum length. // // “`protobuf // message RegisterUserRequest { // string name = 1 [(validate.field).string.max = 255]; // } // “` Max *uint64 `protobuf:"varint,12,opt,name=max,proto3,oneof" json:"max,omitempty"` // Require field value match a specific regular expression. // // “`protobuf // message RegisterUserRequest { // string name = 1 [(validate.field).string.match = "[[:alpha:]]"]; // } // “` Match *string `protobuf:"bytes,13,opt,name=match,proto3,oneof" json:"match,omitempty"` // Require field value does not match a specific regular expression. // // “`protobuf // message RegisterUserRequest { // string non_alpha_name = 1 [(validate.field).string.not_match = "[[:alpha:]]"]; // } // “` NotMatch *string `protobuf:"bytes,14,opt,name=not_match,json=notMatch,proto3,oneof" json:"not_match,omitempty"` // Require a non-empty string. // // “`protobuf // message RegisterUserRequest { // string name = 1 [(validate.field).string.required = true]; // } // “` Required *bool `protobuf:"varint,15,opt,name=required,proto3,oneof" json:"required,omitempty"` // contains filtered or unexported fields }
StringRules contain all of the possible validation for string types.
func (*StringRules) Descriptor
deprecated
func (*StringRules) Descriptor() ([]byte, []int)
Deprecated: Use StringRules.ProtoReflect.Descriptor instead.
func (*StringRules) GetAllowSpace ¶
func (x *StringRules) GetAllowSpace() bool
func (*StringRules) GetAsciiOnly ¶
func (x *StringRules) GetAsciiOnly() bool
func (*StringRules) GetContains ¶
func (x *StringRules) GetContains() string
func (*StringRules) GetGt ¶
func (x *StringRules) GetGt() uint64
func (*StringRules) GetLen ¶
func (x *StringRules) GetLen() uint64
func (*StringRules) GetLt ¶
func (x *StringRules) GetLt() uint64
func (*StringRules) GetMatch ¶
func (x *StringRules) GetMatch() string
func (*StringRules) GetMax ¶
func (x *StringRules) GetMax() uint64
func (*StringRules) GetMin ¶
func (x *StringRules) GetMin() uint64
func (*StringRules) GetNotContains ¶
func (x *StringRules) GetNotContains() string
func (*StringRules) GetNotMatch ¶
func (x *StringRules) GetNotMatch() string
func (*StringRules) GetPrefix ¶
func (x *StringRules) GetPrefix() string
func (*StringRules) GetRequired ¶
func (x *StringRules) GetRequired() bool
func (*StringRules) GetSuffix ¶
func (x *StringRules) GetSuffix() string
func (*StringRules) ProtoMessage ¶
func (*StringRules) ProtoMessage()
func (*StringRules) ProtoReflect ¶
func (x *StringRules) ProtoReflect() protoreflect.Message
func (*StringRules) Reset ¶
func (x *StringRules) Reset()
func (*StringRules) String ¶
func (x *StringRules) String() string
type UInt32Rules ¶
type UInt32Rules struct { // Require field value to equal a specific value. // // “`protobuf // message AwardPointsRequest { // uint32 points = 1 [(validate.field).uint32.eq = 10]; // } // “` Eq *uint32 `protobuf:"varint,1,opt,name=eq,proto3,oneof" json:"eq,omitempty"` // Require field value be greater than a specific value. // // “`protobuf // message AwardPointsRequest { // uint32 points = 1 [(validate.field).uint32.gt = 0]; // } // “` Gt *uint32 `protobuf:"varint,2,opt,name=gt,proto3,oneof" json:"gt,omitempty"` // Require field value be less than a specific value. // // “`protobuf // message AwardPointsRequest { // uint32 points = 1 [(validate.field).uint32.lt = 1000]; // } // “` Lt *uint32 `protobuf:"varint,3,opt,name=lt,proto3,oneof" json:"lt,omitempty"` // Require field value be greater than or equal to a specific value. // // “`protobuf // message AwardPointsRequest { // uint32 points = 1 [(validate.field).uint32.gte = 1]; // } // “` Gte *uint32 `protobuf:"varint,4,opt,name=gte,proto3,oneof" json:"gte,omitempty"` // Require field value be greater than or equal to a specific value. // // “`protobuf // message AwardPointsRequest { // uint32 points = 1 [(validate.field).uint32.lte = 100]; // } // “` Lte *uint32 `protobuf:"varint,5,opt,name=lte,proto3,oneof" json:"lte,omitempty"` // Require field value to have a specific minimum value. // // “`protobuf // message AwardPointsRequest { // uint32 points = 1 [(validate.field).uint32.min = 1]; // } // “` Min *uint32 `protobuf:"varint,6,opt,name=min,proto3,oneof" json:"min,omitempty"` // Require field value to have a specific maximum value. // // “`protobuf // message AwardPointsRequest { // uint32 points = 1 [(validate.field).uint32.min = 1]; // } // “` Max *uint32 `protobuf:"varint,7,opt,name=max,proto3,oneof" json:"max,omitempty"` // Require field to have a non-empty and non-zero value. // // “`protobuf // message AwardPointsRequest { // uint32 points = 1 [(validate.field).uint32.required = true]; // } // “` Required *bool `protobuf:"varint,10,opt,name=required,proto3,oneof" json:"required,omitempty"` // contains filtered or unexported fields }
UInt32Rules contain all of the possible validation for uint32 types.
func (*UInt32Rules) Descriptor
deprecated
func (*UInt32Rules) Descriptor() ([]byte, []int)
Deprecated: Use UInt32Rules.ProtoReflect.Descriptor instead.
func (*UInt32Rules) GetEq ¶
func (x *UInt32Rules) GetEq() uint32
func (*UInt32Rules) GetGt ¶
func (x *UInt32Rules) GetGt() uint32
func (*UInt32Rules) GetGte ¶
func (x *UInt32Rules) GetGte() uint32
func (*UInt32Rules) GetLt ¶
func (x *UInt32Rules) GetLt() uint32
func (*UInt32Rules) GetLte ¶
func (x *UInt32Rules) GetLte() uint32
func (*UInt32Rules) GetMax ¶
func (x *UInt32Rules) GetMax() uint32
func (*UInt32Rules) GetMin ¶
func (x *UInt32Rules) GetMin() uint32
func (*UInt32Rules) GetRequired ¶
func (x *UInt32Rules) GetRequired() bool
func (*UInt32Rules) ProtoMessage ¶
func (*UInt32Rules) ProtoMessage()
func (*UInt32Rules) ProtoReflect ¶
func (x *UInt32Rules) ProtoReflect() protoreflect.Message
func (*UInt32Rules) Reset ¶
func (x *UInt32Rules) Reset()
func (*UInt32Rules) String ¶
func (x *UInt32Rules) String() string
type UInt64Rules ¶
type UInt64Rules struct { // Require field value to equal a specific value. // // “`protobuf // message AwardPointsRequest { // uint64 points = 1 [(validate.field).uint64.eq = 10]; // } // “` Eq *uint64 `protobuf:"varint,1,opt,name=eq,proto3,oneof" json:"eq,omitempty"` // Require field value be greater than a specific value. // // “`protobuf // message AwardPointsRequest { // uint64 points = 1 [(validate.field).uint64.gt = 0]; // } // “` Gt *uint64 `protobuf:"varint,2,opt,name=gt,proto3,oneof" json:"gt,omitempty"` // Require field value be less than a specific value. // // “`protobuf // message AwardPointsRequest { // uint64 points = 1 [(validate.field).uint64.lt = 1000]; // } // “` Lt *uint64 `protobuf:"varint,3,opt,name=lt,proto3,oneof" json:"lt,omitempty"` // Require field value be greater than or equal to a specific value. // // “`protobuf // message AwardPointsRequest { // uint64 points = 1 [(validate.field).uint64.gte = 1]; // } // “` Gte *uint64 `protobuf:"varint,4,opt,name=gte,proto3,oneof" json:"gte,omitempty"` // Require field value be greater than or equal to a specific value. // // “`protobuf // message AwardPointsRequest { // uint64 points = 1 [(validate.field).uint64.lte = 100]; // } // “` Lte *uint64 `protobuf:"varint,5,opt,name=lte,proto3,oneof" json:"lte,omitempty"` // Require field value to have a specific minimum value. // // “`protobuf // message AwardPointsRequest { // uint points = 1 [(validate.field).uint64.min = 1]; // } // “` Min *uint64 `protobuf:"varint,6,opt,name=min,proto3,oneof" json:"min,omitempty"` // Require field value to have a specific maximum value. // // “`protobuf // message AwardPointsRequest { // uint64 points = 1 [(validate.field).uint64.min = 1]; // } // “` Max *uint64 `protobuf:"varint,7,opt,name=max,proto3,oneof" json:"max,omitempty"` // Require field to have a non-empty and non-zero value. // // “`protobuf // message AwardPointsRequest { // uint64 points = 1 [(validate.field).uint64.required = true]; // } // “` Required *bool `protobuf:"varint,10,opt,name=required,proto3,oneof" json:"required,omitempty"` // contains filtered or unexported fields }
UInt64Rules contain all of the possible validation for uint64 types.
func (*UInt64Rules) Descriptor
deprecated
func (*UInt64Rules) Descriptor() ([]byte, []int)
Deprecated: Use UInt64Rules.ProtoReflect.Descriptor instead.
func (*UInt64Rules) GetEq ¶
func (x *UInt64Rules) GetEq() uint64
func (*UInt64Rules) GetGt ¶
func (x *UInt64Rules) GetGt() uint64
func (*UInt64Rules) GetGte ¶
func (x *UInt64Rules) GetGte() uint64
func (*UInt64Rules) GetLt ¶
func (x *UInt64Rules) GetLt() uint64
func (*UInt64Rules) GetLte ¶
func (x *UInt64Rules) GetLte() uint64
func (*UInt64Rules) GetMax ¶
func (x *UInt64Rules) GetMax() uint64
func (*UInt64Rules) GetMin ¶
func (x *UInt64Rules) GetMin() uint64
func (*UInt64Rules) GetRequired ¶
func (x *UInt64Rules) GetRequired() bool
func (*UInt64Rules) ProtoMessage ¶
func (*UInt64Rules) ProtoMessage()
func (*UInt64Rules) ProtoReflect ¶
func (x *UInt64Rules) ProtoReflect() protoreflect.Message
func (*UInt64Rules) Reset ¶
func (x *UInt64Rules) Reset()
func (*UInt64Rules) String ¶
func (x *UInt64Rules) String() string