internal

package
v0.0.0-...-9d9692a Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UserSortMap = map[string]db.Sorter{
	"id": {
		Column: "uid",
	},
	"email": {
		Column: "email",
	},
	"name": {
		Column: "username",
	},
	"~id": {
		Column: "uid",
		Desc:   true,
	},
	"~email": {
		Column: "email",
		Desc:   true,
	},
	"~name": {
		Column: "username",
		Desc:   true,
	},
}

UserSortMap maps allowed values of *sort* query parameter to corresponding sorters for user resource queries.

Functions

func ParseInt

func ParseInt(s string, _default int) (int, error)

ParseInt is wrapper on strconv.Atoi with default value in case of empty string.

Types

type AuthUserKey

type AuthUserKey struct{}

AuthUserKey is context key type for "sub" of JWT.

type BodyKey

type BodyKey struct{}

BodyKey is context key type for (parsed) HTTP request body.

type QueryKey

type QueryKey struct{}

QueryKey is context key type for query parameters.

type ScountKey

type ScountKey struct{}

ScountKey is context key type for `sid` path parameter.

type UserKey

type UserKey struct{}

UserKey is context key type for `userid` path parameter.

Jump to

Keyboard shortcuts

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