tags

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EchoQuery  = "query"
	EchoParam  = "param"
	EchoHeader = "header"
	EchoForm   = "form"
)

Variables

This section is empty.

Functions

func Tags

func Tags(generables ...Generable) map[string]string

Types

type Echo

type Echo struct {
	EchoOptions
}

func (Echo) Generate

func (e Echo) Generate() (string, string)

type EchoOptions

type EchoOptions struct {
	Name string
	Tag  string
}

type Generable

type Generable interface {
	Generate() (string, string)
}

func NewEcho

func NewEcho(opts EchoOptions) Generable

func NewGormPK

func NewGormPK(opts GormPKOptions) Generable

func NewJson

func NewJson(options JsonOptions) Generable

func NewMapstructure

func NewMapstructure(options MapstructureOptions) Generable

func NewValidate

func NewValidate(validations ...ValidateGenerable) Generable

type GormPK

type GormPK struct {
	GormPKOptions
}

func (GormPK) Generate

func (g GormPK) Generate() (string, string)

type GormPKOptions

type GormPKOptions struct {
	IsUuid bool
}

type Json

type Json struct {
	JsonOptions
}

func (Json) Generate

func (c Json) Generate() (string, string)

type JsonOptions

type JsonOptions struct {
	Name        string
	IsOmitEmpty bool
	IsOmitZero  bool
	IsInline    bool
}

type Mapstructure

type Mapstructure struct {
	MapstructureOptions
}

func (Mapstructure) Generate

func (c Mapstructure) Generate() (string, string)

type MapstructureOptions

type MapstructureOptions struct {
	Name        string
	IsSquash    bool
	IsRemain    bool
	IsOmitEmpty bool
}

type Validate

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

func (Validate) Generate

func (v Validate) Generate() (string, string)

Generate creates all configured validations separating them with pipe | as gookit/validate package request

type ValidateGenerable

type ValidateGenerable interface {
	Generate() string
}

func NewValidateRequired

func NewValidateRequired() ValidateGenerable

func NewValidateRequiredUuid

func NewValidateRequiredUuid() ValidateGenerable

type ValidateRequired

type ValidateRequired struct{}

func (ValidateRequired) Generate

func (v ValidateRequired) Generate() string

type ValidateRequiredUuid

type ValidateRequiredUuid struct{}

func (ValidateRequiredUuid) Generate

func (v ValidateRequiredUuid) Generate() string

Jump to

Keyboard shortcuts

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