v1

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: MIT-0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAPIV1Routes

func CreateAPIV1Routes(context *serverContext.Context, api fiber.Router)

func UnprocessableEntityResponse

func UnprocessableEntityResponse(ctx *fiber.Ctx, errors []*ValidationError) error

Types

type ApiV1

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

type Response added in v1.0.13

type Response struct {
	Message string
	Data    interface{}
	Meta    interface{}
	Status  int
}

func (*Response) Send added in v1.0.13

func (response *Response) Send(ctx *fiber.Ctx) error

type ValidationError

type ValidationError struct {
	FailedField string `json:"failed_field" xml:"failed_field"`
	Tag         string `json:"tag" xml:"tag"`
	Value       string `json:"value" xml:"value"`
}

func ValidateStruct

func ValidateStruct(structToValidate interface{}) []*ValidationError

func ValidationErrorFromError

func ValidationErrorFromError(field string, err error) *ValidationError

Jump to

Keyboard shortcuts

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