api

package
v0.0.0-...-83255ff Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderReferrerPolicy = "Referrer-Policy"
)

Variables

View Source
var ARANGODB_CLIENT arango.Client
View Source
var ARANGODB_POOL arango.Database

Functions

func ActiveUserID

func ActiveUserID(c echo.Context, ctx *gruff.ServerContext) string

func AddContext

func AddContext(c echo.Context) error

func AddError

func AddError(ctx *gruff.ServerContext, c echo.Context, errGruff gruff.Error) error

func AddNotFoundError

func AddNotFoundError(c echo.Context, payload map[string]interface{}, code int, message string) error

func AddPayloadError

func AddPayloadError(c echo.Context, payload map[string]interface{}, code int, message string) error

func AddPayloadWarning

func AddPayloadWarning(c echo.Context, payload map[string]interface{}, code int, message string) error

func AddPermissionError

func AddPermissionError(c echo.Context, payload map[string]interface{}, code int, message string) error

func AddPremise

func AddPremise(c echo.Context) error

func AddServerError

func AddServerError(c echo.Context, payload map[string]interface{}, code int, message string) error

func AddUnauthorizedError

func AddUnauthorizedError(c echo.Context, payload map[string]interface{}, code int, message string) error

func AssociationFieldNameFromPath

func AssociationFieldNameFromPath(c echo.Context) string

func ChangePassword

func ChangePassword(c echo.Context) error

func ConvertClaimToMultiPremise

func ConvertClaimToMultiPremise(c echo.Context) error

func Create

func Create(c echo.Context) error

func DBMiddleware

func DBMiddleware(db arango.Database) echo.MiddlewareFunc

func Delete

func Delete(c echo.Context) error

func DetermineType

func DetermineType(next echo.HandlerFunc) echo.HandlerFunc

func Get

func Get(c echo.Context) error

TODO: Handle query date

func GetListParametersFromRequest

func GetListParametersFromRequest(c echo.Context) gruff.ArangoQueryParameters

TODO: GetQueryDateFromRequest

func GetMe

func GetMe(c echo.Context) error

func Home

func Home(c echo.Context) error

func InitializePayload

func InitializePayload(next echo.HandlerFunc) echo.HandlerFunc
func Links(c echo.Context) error

func List

func List(c echo.Context) error

TODO: Handle query date

func ListClaims

func ListClaims(which string) func(c echo.Context) error

func ListParentArguments

func ListParentArguments(c echo.Context) error

func MoveArgument

func MoveArgument(c echo.Context) error

func PathParts

func PathParts(path string) []string

func ReferrerPolicy

func ReferrerPolicy(p string) securityMiddlewareOption

func RemoveContext

func RemoveContext(c echo.Context) error

func RemovePremise

func RemovePremise(c echo.Context) error

func SearchContext

func SearchContext(c echo.Context) error

func SearchContexts

func SearchContexts(c echo.Context) error

func Secure

func Secure(headers ...securityMiddlewareOption) echo.MiddlewareFunc

func ServerContext

func ServerContext(c echo.Context) *gruff.ServerContext

func Session

func Session(next echo.HandlerFunc) echo.HandlerFunc

func SetScore

func SetScore(c echo.Context) error

func SetUpRouter

func SetUpRouter(mc MiddlewareConfigurer) *echo.Echo

func SettingHeaders

func SettingHeaders(test bool) echo.MiddlewareFunc

func SignIn

func SignIn(c echo.Context) error

func SignUp

func SignUp(c echo.Context) error

func StringToType

func StringToType(typeName string) (t reflect.Type)

func TokenForUser

func TokenForUser(user gruff.User) (string, error)

func Update

func Update(c echo.Context) error

func UpdateMe

func UpdateMe(c echo.Context) error

Types

type MiddlewareConfigurer

type MiddlewareConfigurer interface {
	ConfigureDefaultApiMiddleware(*echo.Echo) *echo.Echo
	ConfigurePublicApiMiddleware(*echo.Echo) *echo.Group
	ConfigurePrivateApiMiddleware(*echo.Echo) *echo.Group
}

type ProductionMiddlewareConfigurer

type ProductionMiddlewareConfigurer struct{}

func (ProductionMiddlewareConfigurer) ConfigureDefaultApiMiddleware

func (mc ProductionMiddlewareConfigurer) ConfigureDefaultApiMiddleware(root *echo.Echo) *echo.Echo

func (ProductionMiddlewareConfigurer) ConfigurePrivateApiMiddleware

func (mc ProductionMiddlewareConfigurer) ConfigurePrivateApiMiddleware(root *echo.Echo) *echo.Group

func (ProductionMiddlewareConfigurer) ConfigurePublicApiMiddleware

func (mc ProductionMiddlewareConfigurer) ConfigurePublicApiMiddleware(root *echo.Echo) *echo.Group

Jump to

Keyboard shortcuts

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