Documentation
¶
Index ¶
Constants ¶
View Source
const (
CustomBinaryInterfaceVersion = 2
)
Export a constant that indicates the implemented custom binary interface version.
Variables ¶
This section is empty.
Functions ¶
func Start ¶
func Start(entrypoints interface{}) error
This function 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. Does not return if everything went well but does return an error if there are errors in the invocation or the entrypoint signature.
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"` }
The struct for e5e context instances.
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"` }
The struct for e5e event instances. Contains all fields but `data`, as the user code is expected to encapsulate this struct within it's own struct containing the `data` definition.
Click to show internal directories.
Click to hide internal directories.