types

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2017 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const ERR_FORBIDDEN = "err_forbidden"
View Source
const ERR_PARAMETER = "err_parameter"
View Source
const ERR_UNAUTHORIZED = "err_unauthorized"
View Source
const KEY_BasicRole = "basic_role"
View Source
const KEY_CasbinAnonymous = "casbin_anonymous"
View Source
const KEY_Username = "username"

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorMessage

type ErrorMessage struct {
	ErrorTitle       string `json:"error" form:"error" query:"error"`
	ErrorDescription string `json:"error_description"  form:"error_description" query:"error_description"`
}

ErrorMessage

func ErrForbidden

func ErrForbidden() *ErrorMessage

func ErrParameter

func ErrParameter() *ErrorMessage

func ErrUnauthorized

func ErrUnauthorized() *ErrorMessage

func (*ErrorMessage) Error

func (em *ErrorMessage) Error() string

Error makes it compatible with `error` interface.

type Policy

type Policy struct {
	User   string `json:"user" form:"user" query:"user"`
	Path   string `json:"path" form:"path" query:"path"`
	Method string `json:"method" form:"method" query:"method"`
}

type PolicyGroup

type PolicyGroup struct {
	User  string `json:"user" form:"user" query:"user"`
	Group string `json:"group" form:"group" query:"group"`
}

type User

type User struct {
	Username    string `json:"username" form:"username" query:"username"`
	Password    string `json:"password" form:"password" query:"password"`
	NewPassword string `json:"new_password" form:"new_password" query:"new_password"`
}

Jump to

Keyboard shortcuts

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