utils

package
v0.0.0-...-99b28bf Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPGet

func HTTPGet(uri string) ([]byte, error)

HTTPGet get 请求

func HTTPPost

func HTTPPost(uri string, data string) ([]byte, error)

HTTPPost post 请求

func If

func If(cond bool, trueVal, falseVal interface{}) interface{}

func InsertMap

func InsertMap(data interface{}) g.Map

func IsObjectExist

func IsObjectExist(tableName string, data interface{}) bool

func MD5Encode

func MD5Encode(data string) string

func RandStringBytesMaskImprSrcSB

func RandStringBytesMaskImprSrcSB(n int) string

func SetWithTimeOut

func SetWithTimeOut(key string, val interface{}, timeout int) error

func SpliceToPgString

func SpliceToPgString(data interface{}) (formatString string)

SpliceToPgString splice change to postgres array

func Validation

func Validation(r *ghttp.Request, parser interface{})

func Where

func Where(data interface{}) g.Map

func WhereMap

func WhereMap(data interface{}, customWhere g.Map) g.Map

Types

type PqSlice

type PqSlice string

func (PqSlice) MarshalJSON

func (c PqSlice) MarshalJSON() ([]byte, error)

func (PqSlice) ToArray

func (c PqSlice) ToArray() []string

Jump to

Keyboard shortcuts

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