utils

package
v0.0.0-...-f2c966f Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ERROR_CODE_ARGUMENTS_INVALID = "41"
	ERROR_CODE_ARGUMENTS_MISSING = "40"
)

Variables

This section is empty.

Functions

func CheckFileMaxLength

func CheckFileMaxLength(fileItem *os.File, maxLength int, fieldName string) *taobao.ApiRuleError

func CheckMaxLength

func CheckMaxLength(value string, maxLength int, fieldName string) *taobao.ApiRuleError

func CheckMaxListSize

func CheckMaxListSize(list []string, maxSize int, fieldName string) *taobao.ApiRuleError

func CheckMaxValue

func CheckMaxValue(value int, maxValue int, fieldName string) *taobao.ApiRuleError

func CheckMinValue

func CheckMinValue(value, minValue int, fieldName string) *taobao.ApiRuleError

func CheckNotEmpty

func CheckNotEmpty(value interface{}, fieldName string) *taobao.ApiRuleError

func CheckObjectMaxListSize

func CheckObjectMaxListSize(value string, maxSize int, fieldName string) *taobao.ApiRuleError

func CheckStringMaxListSize

func CheckStringMaxListSize(value string, maxSize int, fieldName string) *taobao.ApiRuleError

func ComputeSignature

func ComputeSignature(accessSecret, data string) (string, *taobao.ApiRuleError)

func CurrentTimeMillis

func CurrentTimeMillis() int64

func FormatTime

func FormatTime(t time.Time) string

func GetCanonicalStringForIsv

func GetCanonicalStringForIsv(timestamp int64, suiteTicket string) string

func Int64S

func Int64S(i int64) string

func IsEmpty

func IsEmpty(s string) bool

func ParamToQueryString

func ParamToQueryString(m map[string]string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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