gozerocommon

package module
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CtxKeyJwtEntityId = "entityId"
View Source
var CtxKeyJwtUserId = "jwtUserId"
View Source
var DateFormat = "2006-01-02 15:04:05"
View Source
var DateFormatShort = "2006-01-02"

Functions

func GetCellIndex added in v0.1.4

func GetCellIndex(row, col int64) string

func GetUidFromCtx

func GetUidFromCtx(ctx context.Context) int64

func GetUserIdAndEntityIdFromCtx added in v0.1.6

func GetUserIdAndEntityIdFromCtx(ctx context.Context) (int64, string)

func Int64SliceToInterface

func Int64SliceToInterface(ids []int64) []interface{}

func ListInInt64 added in v0.1.3

func ListInInt64(list []int64, i int64) bool

ListInInt64 list in action

func Md5ByBytes

func Md5ByBytes(b []byte) string

func Md5ByString

func Md5ByString(str string) string

func Placeholders

func Placeholders(n int) string

func Response

func Response(w http.ResponseWriter, resp interface{}, err error)

Types

type Body

type Body struct {
	Code int         `json:"code"`
	Msg  string      `json:"msg"`
	Data interface{} `json:"data,omitempty"`
}

type HashId

type HashId struct {
	// contains filtered or unexported fields
}

func (*HashId) IdToString

func (hi *HashId) IdToString(id int64) string

func (*HashId) New

func (hi *HashId) New(salt string, minLength int) *HashId

func (*HashId) StringToid

func (hi *HashId) StringToid(id string) int64

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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