constant

package
v0.0.0-...-cfa269c Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserRoleAdmin    = "admin"
	UserRoleCustomer = "customer"
)

Variables

Functions

func HTTPStatusText

func HTTPStatusText(code int) string

Types

type ContextKey

type ContextKey string
const (
	UserIDKey ContextKey = "user_id"
	RoleKey   ContextKey = "role"
)

type InternalCode

type InternalCode int
const (
	DefaultUnhandledError InternalCode = 1000 + iota
	DefaultNotFoundError
	DefaultMethodNotAllowedError
	DefaultBadRequestError
	DefaultUnauthorizedError
	DefaultDuplicateDataError
)

type UserRole

type UserRole string

Jump to

Keyboard shortcuts

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