Versions in this module Expand all Collapse all v1 v1.1.2 Jun 19, 2021 Changes in this version + const StateConcurrencyFirstWrite + const StateConcurrencyLastWrite + const StateConcurrencyUndefined + const StateConsistencyEventual + const StateConsistencyStrong + const StateConsistencyUndefined + const StateOperationTypeDelete + const StateOperationTypeUndefined + const StateOperationTypeUpsert + const UndefinedType + type BindingEvent struct + Data []byte + Metadata map[string]string + type BulkStateItem struct + Error string + Etag string + Key string + Metadata map[string]string + Value []byte + type Client interface + Close func() + DeleteBulkState func(ctx context.Context, storeName string, keys []string) error + DeleteBulkStateItems func(ctx context.Context, storeName string, items []*DeleteStateItem) error + DeleteState func(ctx context.Context, storeName, key string) error + DeleteStateWithETag func(ctx context.Context, storeName, key string, etag *ETag, meta map[string]string, ...) error + ExecuteStateTransaction func(ctx context.Context, storeName string, meta map[string]string, ...) error + GetBulkSecret func(ctx context.Context, storeName string, meta map[string]string) (data map[string]map[string]string, err error) + GetBulkState func(ctx context.Context, storeName string, keys []string, meta map[string]string, ...) ([]*BulkStateItem, error) + GetSecret func(ctx context.Context, storeName, key string, meta map[string]string) (data map[string]string, err error) + GetState func(ctx context.Context, storeName, key string) (item *StateItem, err error) + GetStateWithConsistency func(ctx context.Context, storeName, key string, meta map[string]string, ...) (item *StateItem, err error) + InvokeBinding func(ctx context.Context, in *InvokeBindingRequest) (out *BindingEvent, err error) + InvokeMethod func(ctx context.Context, appID, methodName, verb string) (out []byte, err error) + InvokeMethodWithContent func(ctx context.Context, appID, methodName, verb string, content *DataContent) (out []byte, err error) + InvokeMethodWithCustomContent func(ctx context.Context, appID, methodName, verb string, contentType string, ...) (out []byte, err error) + InvokeOutputBinding func(ctx context.Context, in *InvokeBindingRequest) error + PublishEvent func(ctx context.Context, pubsubName, topicName string, data []byte) error + PublishEventfromCustomContent func(ctx context.Context, pubsubName, topicName string, data interface{}) error + SaveBulkState func(ctx context.Context, storeName string, items ...*SetStateItem) error + SaveState func(ctx context.Context, storeName, key string, data []byte, so ...StateOption) error + Shutdown func(ctx context.Context) error + WithAuthToken func(token string) + WithTraceID func(ctx context.Context, id string) context.Context + func NewClient() (client Client, err error) + func NewClientWithAddress(address string) (client Client, err error) + func NewClientWithConnection(conn *grpc.ClientConn) Client + func NewClientWithPort(port string) (client Client, err error) + type DataContent struct + ContentType string + Data []byte + type DeleteStateItem SetStateItem + type ETag struct + Value string + type GRPCClient struct + func (c *GRPCClient) Close() + func (c *GRPCClient) DeleteBulkState(ctx context.Context, storeName string, keys []string) error + func (c *GRPCClient) DeleteBulkStateItems(ctx context.Context, storeName string, items []*DeleteStateItem) error + func (c *GRPCClient) DeleteState(ctx context.Context, storeName, key string) error + func (c *GRPCClient) DeleteStateWithETag(ctx context.Context, storeName, key string, etag *ETag, meta map[string]string, ...) error + func (c *GRPCClient) ExecuteStateTransaction(ctx context.Context, storeName string, meta map[string]string, ...) error + func (c *GRPCClient) GetBulkSecret(ctx context.Context, storeName string, meta map[string]string) (data map[string]map[string]string, err error) + func (c *GRPCClient) GetBulkState(ctx context.Context, storeName string, keys []string, meta map[string]string, ...) ([]*BulkStateItem, error) + func (c *GRPCClient) GetSecret(ctx context.Context, storeName, key string, meta map[string]string) (data map[string]string, err error) + func (c *GRPCClient) GetState(ctx context.Context, storeName, key string) (item *StateItem, err error) + func (c *GRPCClient) GetStateWithConsistency(ctx context.Context, storeName, key string, meta map[string]string, ...) (item *StateItem, err error) + func (c *GRPCClient) InvokeBinding(ctx context.Context, in *InvokeBindingRequest) (out *BindingEvent, err error) + func (c *GRPCClient) InvokeMethod(ctx context.Context, appID, methodName, verb string) (out []byte, err error) + func (c *GRPCClient) InvokeMethodWithContent(ctx context.Context, appID, methodName, verb string, content *DataContent) (out []byte, err error) + func (c *GRPCClient) InvokeMethodWithCustomContent(ctx context.Context, appID, methodName, verb string, contentType string, ...) (out []byte, err error) + func (c *GRPCClient) InvokeOutputBinding(ctx context.Context, in *InvokeBindingRequest) error + func (c *GRPCClient) PublishEvent(ctx context.Context, pubsubName, topicName string, data []byte) error + func (c *GRPCClient) PublishEventfromCustomContent(ctx context.Context, pubsubName, topicName string, data interface{}) error + func (c *GRPCClient) SaveBulkState(ctx context.Context, storeName string, items ...*SetStateItem) error + func (c *GRPCClient) SaveState(ctx context.Context, storeName, key string, data []byte, so ...StateOption) error + func (c *GRPCClient) Shutdown(ctx context.Context) error + func (c *GRPCClient) WithAuthToken(token string) + func (c *GRPCClient) WithTraceID(ctx context.Context, id string) context.Context + type InvokeBindingRequest struct + Data []byte + Metadata map[string]string + Name string + Operation string + type OperationType int + func (o OperationType) String() string + type SetStateItem struct + Etag *ETag + Key string + Metadata map[string]string + Options *StateOptions + Value []byte + type StateConcurrency int + func (c StateConcurrency) String() string + func (s StateConcurrency) GetPBConcurrency() v1.StateOptions_StateConcurrency + type StateConsistency int + func (c StateConsistency) String() string + func (s StateConsistency) GetPBConsistency() v1.StateOptions_StateConsistency + type StateItem struct + Etag string + Key string + Metadata map[string]string + Value []byte + type StateOperation struct + Item *SetStateItem + Type OperationType + type StateOption func(*StateOptions) + func WithConcurrency(concurrency StateConcurrency) StateOption + func WithConsistency(consistency StateConsistency) StateOption + type StateOptions struct + Concurrency StateConcurrency + Consistency StateConsistency