utl

package module
v0.0.0-...-06a4c55 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogAttrKeyError = "error"
)

Variables

This section is empty.

Functions

func NewCharmLogger

func NewCharmLogger(option LoggerOption) *slog.Logger

func NewJSONLogger

func NewJSONLogger(option LoggerOption) *slog.Logger

Types

type LoggerOption

type LoggerOption struct {
	Level slog.Level
}

type RequestValidationError

type RequestValidationError struct {
	Field   string `json:"field"`
	Tag     string `json:"tag"`
	Message string `json:"message"`
}

type RequestValidationErrorResponse

type RequestValidationErrorResponse struct {
	ErrorType RequestValidationErrorType `json:"error_type"`
	Errors    []RequestValidationError   `json:"errors"`
}

func ValidateRequestAllEmptyResponse

func ValidateRequestAllEmptyResponse() RequestValidationErrorResponse

func ValidateRequestStruct

func ValidateRequestStruct(req interface{}) (RequestValidationErrorResponse, bool)

type RequestValidationErrorType

type RequestValidationErrorType string

Jump to

Keyboard shortcuts

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