validators

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Int64MinMaxValidator

type Int64MinMaxValidator struct {
	Min int64
	Max int64
}

func (Int64MinMaxValidator) Description

func (v Int64MinMaxValidator) Description(ctx context.Context) string

Description returns a plain text description of the validator's behavior, suitable for a practitioner to understand its impact.

func (Int64MinMaxValidator) MarkdownDescription

func (v Int64MinMaxValidator) MarkdownDescription(ctx context.Context) string

MarkdownDescription returns a markdown formatted description of the validator's behavior, suitable for a practitioner to understand its impact.

func (Int64MinMaxValidator) Validate

Validate runs the main validation logic of the validator, reading configuration data out of `req` and updating `resp` with diagnostics.

type Int64MinValidator

type Int64MinValidator struct {
	Min int64
}

func (Int64MinValidator) Description

func (v Int64MinValidator) Description(ctx context.Context) string

Description returns a plain text description of the validator's behavior, suitable for a practitioner to understand its impact.

func (Int64MinValidator) MarkdownDescription

func (v Int64MinValidator) MarkdownDescription(ctx context.Context) string

MarkdownDescription returns a markdown formatted description of the validator's behavior, suitable for a practitioner to understand its impact.

func (Int64MinValidator) Validate

Validate runs the main validation logic of the validator, reading configuration data out of `req` and updating `resp` with diagnostics.

type StringEnumValidator

type StringEnumValidator struct {
	Enum []string
}

StringEnumValidator validates that the value is contained in Enum

func (StringEnumValidator) Description

func (v StringEnumValidator) Description(_ context.Context) string

Description returns a plain text description of the validator's behavior, suitable for a practitioner to understand its impact.

func (StringEnumValidator) MarkdownDescription

func (v StringEnumValidator) MarkdownDescription(_ context.Context) string

MarkdownDescription returns a markdown formatted description of the validator's behavior, suitable for a practitioner to understand its impact.

func (StringEnumValidator) Validate

Validate runs the main validation logic of the validator, reading configuration data out of `req` and updating `resp` with diagnostics.

Jump to

Keyboard shortcuts

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