utils

package
v0.0.0-...-ae4ac97 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2022 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CORSMiddleware

func CORSMiddleware(router *gin.Engine)

func GetConfig

func GetConfig(name string, type_ string) (vv interface{})

GetConfig get env var named `name` of type `type_`

func GetConfigBool

func GetConfigBool(name string) bool

func GetConfigInt

func GetConfigInt(name string) int64

func GetConfigInt16

func GetConfigInt16(name string) int16

func GetConfigInt32

func GetConfigInt32(name string) int32

func GetConfigInt8

func GetConfigInt8(name string) int8

func GetConfigUint

func GetConfigUint(name string) uint64

func GetConfigUint16

func GetConfigUint16(name string) uint16

func GetConfigUint32

func GetConfigUint32(name string) uint32

func GetConfigUint8

func GetConfigUint8(name string) uint8

func RandString

func RandString(length int, ascii, digits, punctuation bool) string

Types

type CommonErrorResp

type CommonErrorResp struct {
	Msg string `json:"error"`
}

type MiddlewareType

type MiddlewareType func() gin.HandlerFunc

Jump to

Keyboard shortcuts

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