validator_examples

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Action_name = map[int32]string{
		0: "ALLOW",
		1: "DENY",
		2: "CHILL",
	}
	Action_value = map[string]int32{
		"ALLOW": 0,
		"DENY":  1,
		"CHILL": 2,
	}
)

Enum value maps for Action.

View Source
var File_examples_enum_proto protoreflect.FileDescriptor
View Source
var File_examples_nested_proto protoreflect.FileDescriptor
View Source
var File_examples_uuid_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Action

type Action int32
const (
	Action_ALLOW Action = 0
	Action_DENY  Action = 1
	Action_CHILL Action = 2
)

func (Action) Descriptor added in v0.4.0

func (Action) Descriptor() protoreflect.EnumDescriptor

func (Action) Enum added in v0.4.0

func (x Action) Enum() *Action

func (Action) EnumDescriptor deprecated

func (Action) EnumDescriptor() ([]byte, []int)

Deprecated: Use Action.Descriptor instead.

func (Action) Number added in v0.4.0

func (x Action) Number() protoreflect.EnumNumber

func (Action) String

func (x Action) String() string

func (Action) Type added in v0.4.0

func (Action) Type() protoreflect.EnumType

type Foo

type Foo struct {
	// contains filtered or unexported fields
}

func (*Foo) Descriptor deprecated

func (*Foo) Descriptor() ([]byte, []int)

Deprecated: Use Foo.ProtoReflect.Descriptor instead.

func (*Foo) ProtoMessage

func (*Foo) ProtoMessage()

func (*Foo) ProtoReflect

func (x *Foo) ProtoReflect() protoreflect.Message

func (*Foo) Reset

func (x *Foo) Reset()

func (*Foo) String

func (x *Foo) String() string

func (*Foo) Validate

func (this *Foo) Validate() error

type InnerMessage

type InnerMessage struct {

	// some_integer can only be in range (1, 100).
	SomeInteger int32 `protobuf:"varint,1,opt,name=some_integer,json=someInteger,proto3" json:"some_integer,omitempty"`
	// contains filtered or unexported fields
}

func (*InnerMessage) Descriptor deprecated

func (*InnerMessage) Descriptor() ([]byte, []int)

Deprecated: Use InnerMessage.ProtoReflect.Descriptor instead.

func (*InnerMessage) GetSomeInteger

func (x *InnerMessage) GetSomeInteger() int32

func (*InnerMessage) ProtoMessage

func (*InnerMessage) ProtoMessage()

func (*InnerMessage) ProtoReflect added in v0.4.0

func (x *InnerMessage) ProtoReflect() protoreflect.Message

func (*InnerMessage) Reset

func (x *InnerMessage) Reset()

func (*InnerMessage) String

func (x *InnerMessage) String() string

func (*InnerMessage) Validate

func (this *InnerMessage) Validate() error

type OuterMessage

type OuterMessage struct {

	// important_string must be a lowercase alpha-numeric of 5 to 30 characters (RE2 syntax).
	ImportantString string `protobuf:"bytes,1,opt,name=important_string,json=importantString,proto3" json:"important_string,omitempty"`
	// proto3 doesn't have `required`, the `msg_exist` enforces presence of InnerMessage.
	Inner *InnerMessage `protobuf:"bytes,2,opt,name=inner,proto3" json:"inner,omitempty"`
	// contains filtered or unexported fields
}

func (*OuterMessage) Descriptor deprecated

func (*OuterMessage) Descriptor() ([]byte, []int)

Deprecated: Use OuterMessage.ProtoReflect.Descriptor instead.

func (*OuterMessage) GetImportantString

func (x *OuterMessage) GetImportantString() string

func (*OuterMessage) GetInner

func (x *OuterMessage) GetInner() *InnerMessage

func (*OuterMessage) ProtoMessage

func (*OuterMessage) ProtoMessage()

func (*OuterMessage) ProtoReflect added in v0.4.0

func (x *OuterMessage) ProtoReflect() protoreflect.Message

func (*OuterMessage) Reset

func (x *OuterMessage) Reset()

func (*OuterMessage) String

func (x *OuterMessage) String() string

func (*OuterMessage) Validate

func (this *OuterMessage) Validate() error

type SomeMsg

type SomeMsg struct {
	Do Action `protobuf:"varint,1,opt,name=do,proto3,enum=validator.examples.Action" json:"do,omitempty"`
	// contains filtered or unexported fields
}

func (*SomeMsg) Descriptor deprecated

func (*SomeMsg) Descriptor() ([]byte, []int)

Deprecated: Use SomeMsg.ProtoReflect.Descriptor instead.

func (*SomeMsg) GetDo

func (x *SomeMsg) GetDo() Action

func (*SomeMsg) ProtoMessage

func (*SomeMsg) ProtoMessage()

func (*SomeMsg) ProtoReflect added in v0.4.0

func (x *SomeMsg) ProtoReflect() protoreflect.Message

func (*SomeMsg) Reset

func (x *SomeMsg) Reset()

func (*SomeMsg) String

func (x *SomeMsg) String() string

func (*SomeMsg) Validate

func (this *SomeMsg) Validate() error

type UUIDMsg

type UUIDMsg struct {

	// user_id must be a valid version 4 UUID.
	UserId string     `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Xyz    []*v1.UUID `protobuf:"bytes,2,rep,name=xyz,proto3" json:"xyz,omitempty"`
	Abc    []string   `protobuf:"bytes,3,rep,name=abc,proto3" json:"abc,omitempty"`
	// contains filtered or unexported fields
}

func (*UUIDMsg) Descriptor deprecated

func (*UUIDMsg) Descriptor() ([]byte, []int)

Deprecated: Use UUIDMsg.ProtoReflect.Descriptor instead.

func (*UUIDMsg) GetAbc

func (x *UUIDMsg) GetAbc() []string

func (*UUIDMsg) GetUserId

func (x *UUIDMsg) GetUserId() string

func (*UUIDMsg) GetXyz

func (x *UUIDMsg) GetXyz() []*v1.UUID

func (*UUIDMsg) ProtoMessage

func (*UUIDMsg) ProtoMessage()

func (*UUIDMsg) ProtoReflect

func (x *UUIDMsg) ProtoReflect() protoreflect.Message

func (*UUIDMsg) Reset

func (x *UUIDMsg) Reset()

func (*UUIDMsg) String

func (x *UUIDMsg) String() string

func (*UUIDMsg) Validate

func (this *UUIDMsg) Validate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL