tools

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Provider      string = "provider"
	UniqueName    string = "uniqueName"
	StatusID      string = "statusID"
	UID           string = "uid"
	KeySession    CtxKey = "session"
	KeySessionUID CtxKey = "sessionUID"
)
View Source
var (
	Version, Commit string
)

Functions

func Contains added in v0.2.0

func Contains(strSlice []string, searchString string) bool

Contains 函数用于判断一个字符串切片中是否存在某个字符串

func URLQueryInt64 added in v0.1.0

func URLQueryInt64(r *http.Request, key string) (value int64, err error)

func URLQueryInt64Default added in v0.1.0

func URLQueryInt64Default(r *http.Request, key string, defaultValue int64) (value int64, err error)

func Unique

func Unique(slice []string) []string

Unique distinct slice

Types

type CtxKey

type CtxKey string

type PaginationOptions added in v0.1.0

type PaginationOptions struct {
	After, Size int64
	Ascend      bool
}

PaginationOptions options for pagination

func URLPaginationOptions added in v0.1.0

func URLPaginationOptions(r *http.Request) (*PaginationOptions, error)

Jump to

Keyboard shortcuts

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