Documentation ¶
Overview ¶
Context package defines primitives for generic context handling during execution.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { AWSSession *session.Session DDBSession *dynamodb.DynamoDB DBUserTable string DBWarnTable string // Application configuration Cfg *config.Config }
Context holds current execution details.
type ErrorMessage ¶
type ErrorMessage struct {
Message string `json:"message"`
}
ErrorMessage defines the message structure returned when an error happens.
type Handler ¶
type Handler struct { C *Context H func(*Context, http.ResponseWriter, *http.Request) (int, error) }
Handler is an abstraction layer to standardize web API returns, if an error happens.
type InitialContext ¶
type InitialContext struct { // --ip IP address of local webserver WebserverIp string // --port Port number of local webserver WebserverPort uint // --config Config file for local execution ConfigFile string // --webserver was set LocalExecution bool }
InitialContext holds the input parameter details at the start of execution.
func NewInitialContext ¶
func NewInitialContext() *InitialContext
NewInitialContext creates a fresh InitialContext.
Click to show internal directories.
Click to hide internal directories.