Documentation
      ¶
    
    
  
    
  
    Index ¶
- func PingInpBinding(ctx context.Context, inputBinding InputBinding) error
 - func PingOutBinding(ctx context.Context, outputBinding OutputBinding) error
 - type AppResponse
 - type Handler
 - type InputBinding
 - type InputOutputBinding
 - type InvokeRequest
 - type InvokeResponse
 - type Metadata
 - type OperationKind
 - type OutputBinding
 - type ReadResponse
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PingInpBinding ¶ added in v1.8.0
func PingInpBinding(ctx context.Context, inputBinding InputBinding) error
func PingOutBinding ¶ added in v1.8.0
func PingOutBinding(ctx context.Context, outputBinding OutputBinding) error
Types ¶
type AppResponse ¶
type AppResponse struct {
	Data        interface{}        `json:"data"`
	To          []string           `json:"to"`
	StoreName   string             `json:"storeName"`
	State       []state.SetRequest `json:"state"`
	Concurrency string             `json:"concurrency"`
}
    AppResponse is the object describing the response from user code after a bindings event.
type Handler ¶ added in v1.8.0
type Handler func(context.Context, *ReadResponse) ([]byte, error)
Handler is the handler used to invoke the app handler.
type InputBinding ¶
type InputBinding interface {
	metadata.ComponentWithMetadata
	// Init passes connection and properties metadata to the binding implementation.
	Init(ctx context.Context, metadata Metadata) error
	// Read is a method that runs in background and triggers the callback function whenever an event arrives.
	Read(ctx context.Context, handler Handler) error
	// Close is a method that closes the connection to the binding. Must be
	// called when the binding is no longer needed to free up resources.
	io.Closer
}
    InputBinding is the interface to define a binding that triggers on incoming events.
type InputOutputBinding ¶ added in v1.9.0
type InputOutputBinding interface {
	InputBinding
	OutputBinding
}
    InputOutputBinding is the interface for bindings that implement both input and output bindings.
type InvokeRequest ¶
type InvokeRequest struct {
	Data      []byte            `json:"data"`
	Metadata  map[string]string `json:"metadata"`
	Operation OperationKind     `json:"operation"`
}
    InvokeRequest is the object given to a dapr output binding.
func (*InvokeRequest) GetMetadataAsBool ¶ added in v1.4.4
func (r *InvokeRequest) GetMetadataAsBool(key string) (bool, error)
GetMetadataAsBool parses metadata as bool.
func (*InvokeRequest) GetMetadataAsInt64 ¶ added in v1.4.4
func (r *InvokeRequest) GetMetadataAsInt64(key string, bitSize int) (int64, error)
GetMetadataAsInt64 parses metadata as int64.
type InvokeResponse ¶
type InvokeResponse struct {
	Data        []byte            `json:"data"`
	Metadata    map[string]string `json:"metadata"`
	ContentType *string           `json:"contentType,omitempty"`
}
    InvokeResponse is the response object returned from an output binding.
type OperationKind ¶
type OperationKind string
OperationKind defines an output binding operation.
const ( GetOperation OperationKind = "get" CreateOperation OperationKind = "create" DeleteOperation OperationKind = "delete" ListOperation OperationKind = "list" )
Non exhaustive list of operations. A binding can add operations that are not in this list.
type OutputBinding ¶
type OutputBinding interface {
	metadata.ComponentWithMetadata
	Init(ctx context.Context, metadata Metadata) error
	Invoke(ctx context.Context, req *InvokeRequest) (*InvokeResponse, error)
	Operations() []OperationKind
}
    OutputBinding is the interface for an output binding, allowing users to invoke remote systems with optional payloads.
      
      Source Files
      ¶
    
  
      
      Directories
      ¶
    
    | Path | Synopsis | 
|---|---|
| 
       alicloud
        | 
      |
| 
       Package apns implements an output binding for Dapr that allows services to send push notifications to Apple devices and Mac computers using Apple's Push Notification Service (APNS). 
         | 
      Package apns implements an output binding for Dapr that allows services to send push notifications to Apple devices and Mac computers using Apple's Push Notification Service (APNS). | 
| 
       aws
        | 
      |
| 
       azure
        | 
      |
| 
       cloudflare
        | 
      |
| 
       gcp
        | 
      |
| 
       huawei
        | 
      |
| 
       rethinkdb
        | 
      |
| 
       twilio
        | 
      |