util

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TimeFormat = "2006-01-02 15:04:05"
)

Variables

This section is empty.

Functions

func ConvertBasicList

func ConvertBasicList(data interface{}) string

func ConvertStruct

func ConvertStruct(data interface{}) string

func ConvertStructList

func ConvertStructList(data interface{}) string

func GetSign

func GetSign(publicParam map[string]interface{}, data map[string]interface{}, secret string) string

func HandleJsonResponse

func HandleJsonResponse(jsonStr string, v interface{}) (err error)

func HmacSha256

func HmacSha256(data string, secret string) string

func UnmarshalJSON

func UnmarshalJSON(data []byte, v interface{}) (err error)

Types

type FileItem

type FileItem struct {
	FileName string

	Content []byte
}

func NewFileItem

func NewFileItem(fileName string, content []byte) *FileItem

func (*FileItem) SetContent

func (s *FileItem) SetContent(v []byte) *FileItem

func (*FileItem) SetFileName

func (s *FileItem) SetFileName(v string) *FileItem

type LocalTime

type LocalTime time.Time

func (LocalTime) MarshalJSON

func (t LocalTime) MarshalJSON() ([]byte, error)

func (LocalTime) String

func (t LocalTime) String() string

func (*LocalTime) UnmarshalJSON

func (t *LocalTime) UnmarshalJSON(data []byte) (err error)

type TopApiRequestError

type TopApiRequestError struct {
	/*
	   System code
	*/
	TopCode int `json:"code,omitempty" `

	/*
	   System error message
	*/
	Msg string `json:"msg,omitempty" `

	/*
	   System sub code
	*/
	SubCode string `json:"sub_code,omitempty" `

	/*
	   System sub message
	*/
	SubMsg string `json:"sub_msg,omitempty" `

	/*
	   System request id
	*/
	RequestId string `json:"request_id,omitempty" `
}

func (*TopApiRequestError) Error

func (e *TopApiRequestError) Error() string

Jump to

Keyboard shortcuts

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