proto

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_event_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Demo

type Demo struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*Demo) Descriptor deprecated

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

Deprecated: Use Demo.ProtoReflect.Descriptor instead.

func (*Demo) GetName

func (x *Demo) GetName() string

func (*Demo) ProtoMessage

func (*Demo) ProtoMessage()

func (*Demo) ProtoReflect

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

func (*Demo) Reset

func (x *Demo) Reset()

func (*Demo) String

func (x *Demo) String() string

func (*Demo) Validate

func (m *Demo) Validate() error

Validate checks the field values on Demo with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Demo) ValidateAll

func (m *Demo) ValidateAll() error

ValidateAll checks the field values on Demo with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in DemoMultiError, or nil if none found.

type DemoMultiError

type DemoMultiError []error

DemoMultiError is an error wrapping multiple validation errors returned by Demo.ValidateAll() if the designated constraints aren't met.

func (DemoMultiError) AllErrors

func (m DemoMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DemoMultiError) Error

func (m DemoMultiError) Error() string

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

type DemoValidationError

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

DemoValidationError is the validation error returned by Demo.Validate if the designated constraints aren't met.

func (DemoValidationError) Cause

func (e DemoValidationError) Cause() error

Cause function returns cause value.

func (DemoValidationError) Error

func (e DemoValidationError) Error() string

Error satisfies the builtin error interface

func (DemoValidationError) ErrorName

func (e DemoValidationError) ErrorName() string

ErrorName returns error name.

func (DemoValidationError) Field

func (e DemoValidationError) Field() string

Field function returns field value.

func (DemoValidationError) Key

func (e DemoValidationError) Key() bool

Key function returns key value.

func (DemoValidationError) Reason

func (e DemoValidationError) Reason() string

Reason function returns reason value.

Jump to

Keyboard shortcuts

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