Documentation ¶
Index ¶
- Constants
- func EscapeJson(s string) string
- func ExecShell(ctx context.Context, command string) (string, error)
- func FileExist(file string) bool
- func GBK2UTF8(s string) (string, bool)
- func InStringSlice(slice []string, element string) bool
- func JsonResponseByErr(err error) string
- func Md5(str string) string
- func RandAuthToken() string
- func RandNumber(max int) int
- func RandString(length int64) string
- func ReplaceStrings(s string, old []string, replace []string) string
- type JsonResponse
- type Result
Constants ¶
View Source
const AppNotInstall = 801
View Source
const AuthError = 401
View Source
const FailureContent = "操作失败"
View Source
const NotFound = 404
View Source
const ResponseFailure = 1
View Source
const ResponseSuccess = 0
View Source
const ServerError = 500
View Source
const SuccessContent = "操作成功"
Variables ¶
This section is empty.
Functions ¶
func InStringSlice ¶
func JsonResponseByErr ¶
func RandAuthToken ¶
func RandAuthToken() string
Types ¶
type JsonResponse ¶
type JsonResponse struct{}
func (*JsonResponse) CommonFailure ¶
func (j *JsonResponse) CommonFailure(message string, err ...error) string
func (*JsonResponse) Success ¶
func (j *JsonResponse) Success(message string, data interface{}) string
Click to show internal directories.
Click to hide internal directories.