validator_examples

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: Apache-2.0 Imports: 5 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",
}
View Source
var Action_value = map[string]int32{
	"ALLOW": 0,
	"DENY":  1,
	"CHILL": 2,
}

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) EnumDescriptor

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

func (Action) String

func (x Action) String() string

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*InnerMessage) Descriptor

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

func (*InnerMessage) GetSomeInteger

func (m *InnerMessage) GetSomeInteger() int32

func (*InnerMessage) ProtoMessage

func (*InnerMessage) ProtoMessage()

func (*InnerMessage) Reset

func (m *InnerMessage) Reset()

func (*InnerMessage) String

func (m *InnerMessage) String() string

func (*InnerMessage) Validate

func (this *InnerMessage) Validate() error

func (*InnerMessage) XXX_DiscardUnknown

func (m *InnerMessage) XXX_DiscardUnknown()

func (*InnerMessage) XXX_Marshal

func (m *InnerMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*InnerMessage) XXX_Merge

func (m *InnerMessage) XXX_Merge(src proto.Message)

func (*InnerMessage) XXX_Size

func (m *InnerMessage) XXX_Size() int

func (*InnerMessage) XXX_Unmarshal

func (m *InnerMessage) XXX_Unmarshal(b []byte) 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"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

func (*OuterMessage) Descriptor

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

func (*OuterMessage) GetImportantString

func (m *OuterMessage) GetImportantString() string

func (*OuterMessage) GetInner

func (m *OuterMessage) GetInner() *InnerMessage

func (*OuterMessage) ProtoMessage

func (*OuterMessage) ProtoMessage()

func (*OuterMessage) Reset

func (m *OuterMessage) Reset()

func (*OuterMessage) String

func (m *OuterMessage) String() string

func (*OuterMessage) Validate

func (this *OuterMessage) Validate() error

func (*OuterMessage) XXX_DiscardUnknown

func (m *OuterMessage) XXX_DiscardUnknown()

func (*OuterMessage) XXX_Marshal

func (m *OuterMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OuterMessage) XXX_Merge

func (m *OuterMessage) XXX_Merge(src proto.Message)

func (*OuterMessage) XXX_Size

func (m *OuterMessage) XXX_Size() int

func (*OuterMessage) XXX_Unmarshal

func (m *OuterMessage) XXX_Unmarshal(b []byte) error

type SomeMsg

type SomeMsg struct {
	Do                   Action   `protobuf:"varint,1,opt,name=do,proto3,enum=validator.examples.Action" json:"do,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SomeMsg) Descriptor

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

func (*SomeMsg) GetDo

func (m *SomeMsg) GetDo() Action

func (*SomeMsg) ProtoMessage

func (*SomeMsg) ProtoMessage()

func (*SomeMsg) Reset

func (m *SomeMsg) Reset()

func (*SomeMsg) String

func (m *SomeMsg) String() string

func (*SomeMsg) Validate

func (this *SomeMsg) Validate() error

func (*SomeMsg) XXX_DiscardUnknown

func (m *SomeMsg) XXX_DiscardUnknown()

func (*SomeMsg) XXX_Marshal

func (m *SomeMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SomeMsg) XXX_Merge

func (m *SomeMsg) XXX_Merge(src proto.Message)

func (*SomeMsg) XXX_Size

func (m *SomeMsg) XXX_Size() int

func (*SomeMsg) XXX_Unmarshal

func (m *SomeMsg) XXX_Unmarshal(b []byte) 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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UUIDMsg) Descriptor

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

func (*UUIDMsg) GetUserId

func (m *UUIDMsg) GetUserId() string

func (*UUIDMsg) ProtoMessage

func (*UUIDMsg) ProtoMessage()

func (*UUIDMsg) Reset

func (m *UUIDMsg) Reset()

func (*UUIDMsg) String

func (m *UUIDMsg) String() string

func (*UUIDMsg) Validate

func (this *UUIDMsg) Validate() error

func (*UUIDMsg) XXX_DiscardUnknown

func (m *UUIDMsg) XXX_DiscardUnknown()

func (*UUIDMsg) XXX_Marshal

func (m *UUIDMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UUIDMsg) XXX_Merge

func (m *UUIDMsg) XXX_Merge(src proto.Message)

func (*UUIDMsg) XXX_Size

func (m *UUIDMsg) XXX_Size() int

func (*UUIDMsg) XXX_Unmarshal

func (m *UUIDMsg) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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