util

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HttpGet

func HttpGet(url string, header http.Header, result interface{}) error

func HttpPost

func HttpPost(url string, header http.Header, body io.Reader, result interface{}) error

func HttpPostForm

func HttpPostForm(url string, values url.Values, result interface{}) error

func HttpPostFormHeader

func HttpPostFormHeader(url string, header http.Header, values url.Values, result interface{}) error

func HttpPostJson

func HttpPostJson(url string, value interface{}, result interface{}) error

func HttpPostJsonHeader

func HttpPostJsonHeader(url string, header http.Header, value interface{}, result interface{}) error

func JsonValueToArray

func JsonValueToArray(value interface{}) []interface{}

func JsonValueToBool added in v0.6.0

func JsonValueToBool(value interface{}) bool

func JsonValueToInt added in v0.6.0

func JsonValueToInt(value interface{}) int

func JsonValueToInt32

func JsonValueToInt32(value interface{}) int32

func JsonValueToInt64

func JsonValueToInt64(value interface{}) int64

func JsonValueToIntArray added in v0.6.0

func JsonValueToIntArray(value interface{}) []int

func JsonValueToString added in v0.5.0

func JsonValueToString(value interface{}) string

func JsonValueToUint16

func JsonValueToUint16(value interface{}) uint16

func JsonValueToUint16Array

func JsonValueToUint16Array(value interface{}) []uint16

func JsonValueToUint32

func JsonValueToUint32(value interface{}) uint32

func JsonValueToUint32Array

func JsonValueToUint32Array(value interface{}) []uint32

func JsonValueToUint64

func JsonValueToUint64(value interface{}) uint64

func JsonValueToUint8

func JsonValueToUint8(value interface{}) uint8

func JsonValueToUint8Array

func JsonValueToUint8Array(value interface{}) []uint8

func MD5

func MD5(reader io.Reader) string

func NewSnowFlake

func NewSnowFlake(node int64) (n *snowflake.Node, err error)

func NextSnowFlakeID

func NextSnowFlakeID() int64

func SHA1

func SHA1(reader io.Reader) string

func UUID

func UUID() string

Types

type HttpStatusError

type HttpStatusError struct {
	HttpStatus int
	Message    string
}

func (HttpStatusError) Error

func (hse HttpStatusError) Error() string

Jump to

Keyboard shortcuts

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