extension

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadMessageDefinitions

func LoadMessageDefinitions(message *descriptor.DescriptorProto) *extensionpb.Model

Types

type FieldDefinitions

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

func (*FieldDefinitions) Model

func (*FieldDefinitions) Response

func (*FieldDefinitions) Validation

func (d *FieldDefinitions) Validation() *Validation

type Validation

type Validation struct {
	Validation *extensionpb.FieldValidation
	// contains filtered or unexported fields
}

func (*Validation) BuildValidationCall

func (v *Validation) BuildValidationCall(receiver string) error

BuildValidationCall is a helper call to build the field validation call, that can be used inside a source code, after it is completely loaded. It requires a receiver argument that can be used if a conditional validation was configured for it.

func (*Validation) GetValidator

func (v *Validation) GetValidator() string

GetValidator returns a string with the Go source code of how the validator for this object must be validatorCalled.

func (*Validation) NeedsOzzoIsPackage

func (v *Validation) NeedsOzzoIsPackage() bool

NeedsOzzoIsPackage returns if the field requires the package "ozzo/is".

func (*Validation) Required

func (v *Validation) Required() bool

Required returns if the field is set to be required or not.

Jump to

Keyboard shortcuts

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