Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorStatusCode ¶
ErrorStatusCode translates to the respective status code.
func HelperModule ¶
HelperModule returns fx module for initialization of helper to start NATS client for handlers.
The module is only loaded once.
func WriteError ¶
func WriteError(w http.ResponseWriter, err error)
Types ¶
type Helper ¶
type Helper struct {
// contains filtered or unexported fields
}
Helper assists in creating event handlers.
func NewDefaultHelper ¶
func NewDefaultHelper(ctx context.Context, handler *cloudevents.HandlerWrapper) *Helper
NewDefaultHelper returns a new Helper with default options.
func NewHelper ¶
func NewHelper(ctx context.Context, options *Options, handler *cloudevents.HandlerWrapper) *Helper
NewHelper returns a new Helper with options.
type InvokeRequest ¶
type InvokeRequest struct { Data map[string]json.RawMessage Metadata map[string]interface{} }
type InvokeResponse ¶
Click to show internal directories.
Click to hide internal directories.