validationpb

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PathKind_name = map[int32]string{
		0: "VALUE",
		1: "KEY",
	}
	PathKind_value = map[string]int32{
		"VALUE": 0,
		"KEY":   1,
	}
)

Enum value maps for PathKind.

View Source
var File_validation_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ConstraintViolation

type ConstraintViolation struct {
	Path     string           `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	PathKind PathKind         `protobuf:"varint,2,opt,name=path_kind,json=pathKind,proto3,enum=seeruk.validation.PathKind" json:"path_kind,omitempty"`
	Message  string           `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	Details  *structpb.Struct `protobuf:"bytes,4,opt,name=details,proto3" json:"details,omitempty"`
	// contains filtered or unexported fields
}

ConstraintViolation is a ProtoBuf representation of the the ConstraintViolation type, intended to allow ConstraintViolations to be used with gRPC more easily.

func (*ConstraintViolation) Descriptor deprecated

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

Deprecated: Use ConstraintViolation.ProtoReflect.Descriptor instead.

func (*ConstraintViolation) GetDetails

func (x *ConstraintViolation) GetDetails() *structpb.Struct

func (*ConstraintViolation) GetMessage

func (x *ConstraintViolation) GetMessage() string

func (*ConstraintViolation) GetPath

func (x *ConstraintViolation) GetPath() string

func (*ConstraintViolation) GetPathKind

func (x *ConstraintViolation) GetPathKind() PathKind

func (*ConstraintViolation) ProtoMessage

func (*ConstraintViolation) ProtoMessage()

func (*ConstraintViolation) ProtoReflect added in v0.2.0

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

func (*ConstraintViolation) Reset

func (x *ConstraintViolation) Reset()

func (*ConstraintViolation) String

func (x *ConstraintViolation) String() string

type PathKind

type PathKind int32

PathKind is a ProtoBuf representation of the PathKind type, enumerating the different possible path kinds (i.e. denoting what the constraint violation is referring to at the given path).

const (
	PathKind_VALUE PathKind = 0
	PathKind_KEY   PathKind = 1
)

func (PathKind) Descriptor added in v0.2.0

func (PathKind) Descriptor() protoreflect.EnumDescriptor

func (PathKind) Enum added in v0.2.0

func (x PathKind) Enum() *PathKind

func (PathKind) EnumDescriptor deprecated

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

Deprecated: Use PathKind.Descriptor instead.

func (PathKind) Number added in v0.2.0

func (x PathKind) Number() protoreflect.EnumNumber

func (PathKind) String

func (x PathKind) String() string

func (PathKind) Type added in v0.2.0

Jump to

Keyboard shortcuts

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