proto

package
Version: v0.0.0-...-571f2ff Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MsgType_name = map[int32]string{
	0: "Common",
}
View Source
var MsgType_value = map[string]int32{
	"Common": 0,
}

Functions

This section is empty.

Types

type Data

type Data struct {
	Id                   string            `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Desc                 map[string][]byte `` /* 149-byte string literal not displayed */
	Data                 []byte            `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*Data) Descriptor

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

func (*Data) GetData

func (m *Data) GetData() []byte

func (*Data) GetDesc

func (m *Data) GetDesc() map[string][]byte

func (*Data) GetId

func (m *Data) GetId() string

func (*Data) ProtoMessage

func (*Data) ProtoMessage()

func (*Data) Reset

func (m *Data) Reset()

func (*Data) String

func (m *Data) String() string

func (*Data) Validate

func (m *Data) Validate(all bool) error

Validate checks the field values on Data with the rules defined in the proto definition for this message. If any rules are violated, an error is returned. When asked to return all errors, validation continues after first violation, and the result is a list of violation errors wrapped in DataMultiError, or nil if none found. Otherwise, only the first error is returned, if any.

func (*Data) XXX_DiscardUnknown

func (m *Data) XXX_DiscardUnknown()

func (*Data) XXX_Marshal

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

func (*Data) XXX_Merge

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

func (*Data) XXX_Size

func (m *Data) XXX_Size() int

func (*Data) XXX_Unmarshal

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

type DataMultiError

type DataMultiError []error

DataMultiError is an error wrapping multiple validation errors returned by Data.Validate(true) if the designated constraints aren't met.

func (DataMultiError) AllErrors

func (m DataMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DataMultiError) Error

func (m DataMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type DataValidationError

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

DataValidationError is the validation error returned by Data.Validate if the designated constraints aren't met.

func (DataValidationError) Cause

func (e DataValidationError) Cause() error

Cause function returns cause value.

func (DataValidationError) Error

func (e DataValidationError) Error() string

Error satisfies the builtin error interface

func (DataValidationError) ErrorName

func (e DataValidationError) ErrorName() string

ErrorName returns error name.

func (DataValidationError) Field

func (e DataValidationError) Field() string

Field function returns field value.

func (DataValidationError) Key

func (e DataValidationError) Key() bool

Key function returns key value.

func (DataValidationError) Reason

func (e DataValidationError) Reason() string

Reason function returns reason value.

type Msg

type Msg struct {
	Id                   string            `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Type                 MsgType           `protobuf:"varint,2,opt,name=type,proto3,enum=proto.MsgType" json:"type,omitempty"`
	Desc                 map[string][]byte `` /* 149-byte string literal not displayed */
	DataList             []*Data           `protobuf:"bytes,4,rep,name=dataList,proto3" json:"dataList,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*Msg) Descriptor

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

func (*Msg) GetDataList

func (m *Msg) GetDataList() []*Data

func (*Msg) GetDesc

func (m *Msg) GetDesc() map[string][]byte

func (*Msg) GetId

func (m *Msg) GetId() string

func (*Msg) GetType

func (m *Msg) GetType() MsgType

func (*Msg) ProtoMessage

func (*Msg) ProtoMessage()

func (*Msg) Reset

func (m *Msg) Reset()

func (*Msg) String

func (m *Msg) String() string

func (*Msg) Validate

func (m *Msg) Validate(all bool) error

Validate checks the field values on Msg with the rules defined in the proto definition for this message. If any rules are violated, an error is returned. When asked to return all errors, validation continues after first violation, and the result is a list of violation errors wrapped in MsgMultiError, or nil if none found. Otherwise, only the first error is returned, if any.

func (*Msg) XXX_DiscardUnknown

func (m *Msg) XXX_DiscardUnknown()

func (*Msg) XXX_Marshal

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

func (*Msg) XXX_Merge

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

func (*Msg) XXX_Size

func (m *Msg) XXX_Size() int

func (*Msg) XXX_Unmarshal

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

type MsgMultiError

type MsgMultiError []error

MsgMultiError is an error wrapping multiple validation errors returned by Msg.Validate(true) if the designated constraints aren't met.

func (MsgMultiError) AllErrors

func (m MsgMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (MsgMultiError) Error

func (m MsgMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type MsgType

type MsgType int32
const (
	MsgType_Common MsgType = 0
)

func (MsgType) EnumDescriptor

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

func (MsgType) String

func (x MsgType) String() string

type MsgValidationError

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

MsgValidationError is the validation error returned by Msg.Validate if the designated constraints aren't met.

func (MsgValidationError) Cause

func (e MsgValidationError) Cause() error

Cause function returns cause value.

func (MsgValidationError) Error

func (e MsgValidationError) Error() string

Error satisfies the builtin error interface

func (MsgValidationError) ErrorName

func (e MsgValidationError) ErrorName() string

ErrorName returns error name.

func (MsgValidationError) Field

func (e MsgValidationError) Field() string

Field function returns field value.

func (MsgValidationError) Key

func (e MsgValidationError) Key() bool

Key function returns key value.

func (MsgValidationError) Reason

func (e MsgValidationError) Reason() string

Reason function returns reason value.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL