package
1.4.5-alpha1
Repository: https://github.com/ottemo/foundation.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
Package rest is a default implementation of a RESTful server.
Package session is a default implementation of a application Session manager.

# Functions

AsyncHandler runs FuncAPIHandler in async.
GetArgumentOrContentValue looks for a given name within request parameters and content (map only), returns first occurrence according to mentioned sequence or nil if not found.
GetContentValue looks for a given name within request content (map only), returns value or nil if not found.
GetRequestContentAsMap tries to represent HTTP request content in map[string]interface{} format.
GetRestService returns currently using RESTFul service implementation.
GetSessionByID returns session instance by id or nil.
GetSessionService returns currently using session service implementation.
IsAdminHandler returns middleware API Handler that checks admin rights.
IsAdminSession returns true if session with admin rights.
NewSession returns new session instance.
OnRestServiceStart fires RESTFul service start event (callback handling).
RegisterOnRestServiceStart registers new callback on RESTFul service start.
RegisterRestService registers RESTFul service in the system - will cause error if there are couple candidates for that role.
RegisterSessionService registers session managing service in the system - will cause error if there are couple candidates for that role.
StartSession returns session object for request or creates new one.
ValidateAdminRights returns nil if session contains admin rights.

# Constants

Package global constants.
Package global constants.
Package global constants.
Package global constants.
Package global constants.
Package global constants.
cookie name which should contain sessionID.
session key used to flag that user have admin rights.
session key for setting time zone.

# Structs

ApplicationContext is a type you can embed in your model for application context support.
StructRestRedirect is a structure you should return in API handler function if redirect needed.

# Interfaces

InterfaceApplicationContext is an interface representing context where current execution happens.
InterfaceApplicationContextSupport is an interface to assign/get application context to object.
InterfaceRestService is an interface to interact with RESTFul API service.
InterfaceSession is an interface represents private storage for particular API request.
InterfaceSessionService is an interface to access session managing service.

# Type aliases

FuncAPIHandler is an API handler callback function.
FuncAPIResultHandler is an API result handler callback function.