Documentation ¶
Index ¶
- type Context
- func (appContext *Context) CommandClient() interfaces.CommandClient
- func (appContext *Context) CorrelationID() string
- func (appContext *Context) EventClient() coredata.EventClient
- func (appContext *Context) GetSecret(path string, keys ...string) (map[string]string, error)
- func (appContext *Context) InputContentType() string
- func (appContext *Context) LoggingClient() logger.LoggingClient
- func (appContext *Context) NotificationsClient() notifications.NotificationsClient
- func (appContext *Context) PushToCoreData(deviceName string, readingName string, value interface{}) (*dtos.Event, error)
- func (appContext *Context) ResponseContentType() string
- func (appContext *Context) ResponseData() []byte
- func (appContext *Context) RetryData() []byte
- func (appContext *Context) SecretsLastUpdated() time.Time
- func (appContext *Context) SetCorrelationID(id string)
- func (appContext *Context) SetInputContentType(contentType string)
- func (appContext *Context) SetResponseContentType(contentType string)
- func (appContext *Context) SetResponseData(output []byte)
- func (appContext *Context) SetRetryData(payload []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context contains the data functions that implement the interfaces.AppFunctionContext
func NewContext ¶
NewContext creates, initializes and return a new Context with implements the interfaces.AppFunctionContext interface
func (*Context) CommandClient ¶
func (appContext *Context) CommandClient() interfaces.CommandClient
CommandClient returns the Command client, which may be nil, from the dependency injection container
func (*Context) CorrelationID ¶
CorrelationID returns context's the correlation ID
func (*Context) EventClient ¶
func (appContext *Context) EventClient() coredata.EventClient
EventClient returns the Event client, which may be nil, from the dependency injection container
func (*Context) GetSecret ¶
GetSecret returns the secret data from the secret store (secure or insecure) for the specified path.
func (*Context) InputContentType ¶
InputContentType returns the context's inputContentType
func (*Context) LoggingClient ¶
func (appContext *Context) LoggingClient() logger.LoggingClient
LoggingClient returns the Logging client from the dependency injection container
func (*Context) NotificationsClient ¶
func (appContext *Context) NotificationsClient() notifications.NotificationsClient
NotificationsClient returns the Notifications client, which may be nil, from the dependency injection container
func (*Context) PushToCoreData ¶
func (appContext *Context) PushToCoreData(deviceName string, readingName string, value interface{}) (*dtos.Event, error)
PushToCoreData pushes the provided value as an event to CoreData using the device name and reading name that have been set. TODO: This function must be reworked for the new V2 Event Client
func (*Context) ResponseContentType ¶
ResponseContentType returns the context's responseContentType
func (*Context) ResponseData ¶
ResponseData returns the context's responseData.
func (*Context) RetryData ¶
RetryData returns the context's retryData. This function is not part of the AppFunctionContext interface, so it is internal SDK use only
func (*Context) SecretsLastUpdated ¶
SecretsLastUpdated returns that timestamp for when the secrets in the SecretStore where last updated.
func (*Context) SetCorrelationID ¶
SetCorrelationID sets the correlationID. This function is not part of the AppFunctionContext interface, so it is internal SDK use only
func (*Context) SetInputContentType ¶
SetInputContentType sets the inputContentType. This function is not part of the AppFunctionContext interface, so it is internal SDK use only
func (*Context) SetResponseContentType ¶
SetResponseContentType sets the context's responseContentType
func (*Context) SetResponseData ¶
SetResponseData provides a way to return the specified data as a response to the trigger that initiated the execution of the function pipeline. In the case of an HTTP Trigger, the data will be returned as the http response. In the case of a message bus trigger, the data will be published to the configured message bus publish topic.
func (*Context) SetRetryData ¶
SetRetryData sets the context's retryData to the specified payload to be stored for later retry when the pipeline function returns an error.