Documentation
¶
Index ¶
Constants ¶
const LibraryVersion = "1.2.0"
LibraryVersion represents the implemented custom binary interface version.
Variables ¶
This section is empty.
Functions ¶
func Start ¶
func Start(entrypoints interface{})
Start takes the struct containing the available entrypoint methods and handles the invocation of the entrypoint as well as the communication with the e5e platform itself. Control will not be handed back after function execution. In case of an error a Go panic will be raised otherwise an os.Exit(0) occurs.
Rules:
- Entrypoint functions must take 2 input parameters (Event and Context). Both types may be encapsulated within an user defined struct type.
- Entrypoint functions must return 2 values (Result and error). Type encapsulation is also allowed here.
- The input parameters as well as the return values must be compatible with "encoding/json" standard library.
Types ¶
type Context ¶
type Context struct { Async bool `json:"async,omitempty"` Date string `json:"date,omitempty"` Type string `json:"type,omitempty"` }
Context represents the passed `context` object of an e5e function. Contains all fields but `data`, as the user code is expected to encapsulate this struct within its own struct containing the `data` definition when necessary.
type Event ¶
type Event struct { Params map[string][]string `json:"params,omitempty"` RequestHeaders map[string]string `json:"request_headers,omitempty"` Type string `json:"type,omitempty"` }
Event represents the passed `event` object of an e5e function. Contains all fields but `data`, as the user code is expected to encapsulate this struct within its own struct containing the `data` definition.