util

package
v0.0.0-...-e26370b Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateType

func ValidateType[T any](t T) (valid bool, errors []string)

Types

type ResultWrapper

type ResultWrapper[T any] struct {
	Success bool     `json:"success"`
	Errors  []string `json:"errors"`
	Data    T        `json:"data"`
}

func NewResultWrapperFailed

func NewResultWrapperFailed[T any](e []string) ResultWrapper[T]

func NewResultWrapperSucceded

func NewResultWrapperSucceded[T any](d T) ResultWrapper[T]

func NewResultWrapperSuccededEmpty

func NewResultWrapperSuccededEmpty[T any]() ResultWrapper[T]

Jump to

Keyboard shortcuts

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