Documentation ¶
Index ¶
- type Generic
- type GenericOption
- type GenericOptions
- type HTTP
- func (b HTTP) Data() data.Raw
- func (b *HTTP) Header() http.Header
- func (b HTTP) MarshalJSON() ([]byte, error)
- func (b HTTP) Name() string
- func (b *HTTP) Write(d []byte) (int, error)
- func (b *HTTP) WriteHeader(statusCode int)
- func (b *HTTP) WriteResponse(statusCode int, body []byte, options ...HTTPOption)
- type HTTPOption
- type HTTPOptions
- type Queue
- type QueueOption
- type QueueOptions
- type ServiceBus
- type ServiceBusOption
- type ServiceBusOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generic ¶ added in v0.15.0
type Generic struct {
// contains filtered or unexported fields
}
Generic represents a generic output binding. With custom handlers all bindings that are not HTTP output bindings share the same data structure.
func NewGeneric ¶ added in v0.15.0
func NewGeneric(name string, options ...GenericOption) *Generic
NewGeneric creates a new generic output binding.
type GenericOption ¶ added in v0.15.0
type GenericOption func(o *GenericOptions)
GenericOption is a function that sets options on a Generic output binding
type GenericOptions ¶ added in v0.15.0
type GenericOptions struct { // Name sets the name of the binding. Name string // Data sets the data of the binding. Data data.Raw }
GenericOptions contains options for a Generic output binding.
type HTTP ¶
type HTTP struct {
// contains filtered or unexported fields
}
HTTP represents an HTTP output binding.
func (HTTP) MarshalJSON ¶ added in v0.11.0
MarshalJSON implements custom marshaling to create the required JSON structure as expected by the function host.
func (HTTP) Name ¶
Name returns the name of the binding. In case of an HTTP binding it is always "res".
func (*HTTP) WriteHeader ¶
WriteHeader sets the response header with the provided status code.
func (*HTTP) WriteResponse ¶ added in v0.2.0
func (b *HTTP) WriteResponse(statusCode int, body []byte, options ...HTTPOption)
WriteResponse writes the provided status code, body and options to the HTTP binding. Supports option WithHeader.
type HTTPOption ¶ added in v0.12.0
type HTTPOption func(o *HTTPOptions)
HTTPOption is a function that sets options on an HTTP output binding.
func WithHeader ¶ added in v0.2.0
func WithHeader(header http.Header) HTTPOption
WithHeader adds the provided header to a HTTP binding.
type HTTPOptions ¶ added in v0.12.0
type HTTPOptions struct { // Header sets the body of the binding. Header http.Header // Name sets the name of the binding. Name string // Body sets the body of the binding. Body data.Raw // StatusCode sets the status code of the binding. StatusCode int }
HTTPOptions contains options for an HTTP output binding.
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue represents a Queue Storage output binding.
func NewQueue ¶
func NewQueue(name string, options ...QueueOption) *Queue
NewQueue creates a new queue storage output binding.
type QueueOption ¶ added in v0.12.0
type QueueOption func(o *QueueOptions)
QueueOption is a function that sets options on a Queue Storage output binding.
type QueueOptions ¶ added in v0.12.0
type QueueOptions struct { // Name sets the name of the binding. Name string // Data sets the data of the binding. Data data.Raw }
QueueOptions contains options for a Queue Storage output binding.
type ServiceBus ¶ added in v0.7.0
type ServiceBus struct {
// contains filtered or unexported fields
}
ServiceBus represents a service bus output binding.
func NewServiceBus ¶ added in v0.7.0
func NewServiceBus(name string, options ...ServiceBusOption) *ServiceBus
NewServiceBus creates a new service bus output binding.
func (ServiceBus) Data ¶ added in v0.9.0
func (b ServiceBus) Data() data.Raw
Data returns the data of the binding.
func (ServiceBus) Name ¶ added in v0.7.0
func (b ServiceBus) Name() string
Name returns the name of the binding.
type ServiceBusOption ¶ added in v0.12.0
type ServiceBusOption func(o *ServiceBusOptions)
ServiceBusOption is a function that sets options on a ServiceBus output binding.
type ServiceBusOptions ¶ added in v0.12.0
type ServiceBusOptions struct { // Name sets the name of the binding. Name string // Data sets the data of the binding. Data data.Raw }
ServiceBusOptions contains options for a ServiceBus output binding.