Documentation ¶
Overview ¶
Package universalapi contains the implementation of APIs that are shared between gRPC and HTTP servers. On HTTP servers, they use protojson to convert data to/from JSON.
Index ¶
- type UniversalAPI
- func (a *UniversalAPI) CryptoGetUnwrapKeyFn(ctx context.Context, componentName string, ...) encv1.UnwrapKeyFn
- func (a *UniversalAPI) CryptoGetWrapKeyFn(ctx context.Context, componentName string, ...) encv1.WrapKeyFn
- func (a *UniversalAPI) CryptoValidateRequest(componentName string) (contribCrypto.SubtleCrypto, error)
- func (a *UniversalAPI) GetBulkSecret(ctx context.Context, in *runtimev1pb.GetBulkSecretRequest) (*runtimev1pb.GetBulkSecretResponse, error)
- func (a *UniversalAPI) GetMetadata(ctx context.Context, in *emptypb.Empty) (*runtimev1pb.GetMetadataResponse, error)
- func (a *UniversalAPI) GetSecret(ctx context.Context, in *runtimev1pb.GetSecretRequest) (*runtimev1pb.GetSecretResponse, error)
- func (a *UniversalAPI) GetStateStore(name string) (state.Store, error)
- func (a *UniversalAPI) GetWorkflowAlpha1(ctx context.Context, in *runtimev1pb.GetWorkflowRequest) (*runtimev1pb.GetWorkflowResponse, error)
- func (a *UniversalAPI) GetWorkflowBeta1(ctx context.Context, in *runtimev1pb.GetWorkflowRequest) (*runtimev1pb.GetWorkflowResponse, error)
- func (a *UniversalAPI) InitUniversalAPI()
- func (a *UniversalAPI) PauseWorkflowAlpha1(ctx context.Context, in *runtimev1pb.PauseWorkflowRequest) (*emptypb.Empty, error)
- func (a *UniversalAPI) PauseWorkflowBeta1(ctx context.Context, in *runtimev1pb.PauseWorkflowRequest) (*emptypb.Empty, error)
- func (a *UniversalAPI) PurgeWorkflowAlpha1(ctx context.Context, in *runtimev1pb.PurgeWorkflowRequest) (*emptypb.Empty, error)
- func (a *UniversalAPI) PurgeWorkflowBeta1(ctx context.Context, in *runtimev1pb.PurgeWorkflowRequest) (*emptypb.Empty, error)
- func (a *UniversalAPI) QueryStateAlpha1(ctx context.Context, in *runtimev1pb.QueryStateRequest) (*runtimev1pb.QueryStateResponse, error)
- func (a *UniversalAPI) RaiseEventWorkflowAlpha1(ctx context.Context, in *runtimev1pb.RaiseEventWorkflowRequest) (*emptypb.Empty, error)
- func (a *UniversalAPI) RaiseEventWorkflowBeta1(ctx context.Context, in *runtimev1pb.RaiseEventWorkflowRequest) (*emptypb.Empty, error)
- func (a *UniversalAPI) ResumeWorkflowAlpha1(ctx context.Context, in *runtimev1pb.ResumeWorkflowRequest) (*emptypb.Empty, error)
- func (a *UniversalAPI) ResumeWorkflowBeta1(ctx context.Context, in *runtimev1pb.ResumeWorkflowRequest) (*emptypb.Empty, error)
- func (a *UniversalAPI) SetActorRuntime(actor actors.ActorRuntime)
- func (a *UniversalAPI) SetActorsInitDone()
- func (a *UniversalAPI) SetMetadata(ctx context.Context, in *runtimev1pb.SetMetadataRequest) (*emptypb.Empty, error)
- func (a *UniversalAPI) Shutdown(ctx context.Context, in *emptypb.Empty) (*emptypb.Empty, error)
- func (a *UniversalAPI) StartWorkflowAlpha1(ctx context.Context, in *runtimev1pb.StartWorkflowRequest) (*runtimev1pb.StartWorkflowResponse, error)
- func (a *UniversalAPI) StartWorkflowBeta1(ctx context.Context, in *runtimev1pb.StartWorkflowRequest) (*runtimev1pb.StartWorkflowResponse, error)
- func (a *UniversalAPI) SubtleDecryptAlpha1(ctx context.Context, in *runtimev1pb.SubtleDecryptRequest) (*runtimev1pb.SubtleDecryptResponse, error)
- func (a *UniversalAPI) SubtleEncryptAlpha1(ctx context.Context, in *runtimev1pb.SubtleEncryptRequest) (*runtimev1pb.SubtleEncryptResponse, error)
- func (a *UniversalAPI) SubtleGetKeyAlpha1(ctx context.Context, in *runtimev1pb.SubtleGetKeyRequest) (*runtimev1pb.SubtleGetKeyResponse, error)
- func (a *UniversalAPI) SubtleSignAlpha1(ctx context.Context, in *runtimev1pb.SubtleSignRequest) (*runtimev1pb.SubtleSignResponse, error)
- func (a *UniversalAPI) SubtleUnwrapKeyAlpha1(ctx context.Context, in *runtimev1pb.SubtleUnwrapKeyRequest) (*runtimev1pb.SubtleUnwrapKeyResponse, error)
- func (a *UniversalAPI) SubtleVerifyAlpha1(ctx context.Context, in *runtimev1pb.SubtleVerifyRequest) (*runtimev1pb.SubtleVerifyResponse, error)
- func (a *UniversalAPI) SubtleWrapKeyAlpha1(ctx context.Context, in *runtimev1pb.SubtleWrapKeyRequest) (*runtimev1pb.SubtleWrapKeyResponse, error)
- func (a *UniversalAPI) TerminateWorkflowAlpha1(ctx context.Context, in *runtimev1pb.TerminateWorkflowRequest) (*emptypb.Empty, error)
- func (a *UniversalAPI) TerminateWorkflowBeta1(ctx context.Context, in *runtimev1pb.TerminateWorkflowRequest) (*emptypb.Empty, error)
- func (a *UniversalAPI) TryLockAlpha1(ctx context.Context, req *runtimev1pb.TryLockRequest) (*runtimev1pb.TryLockResponse, error)
- func (a *UniversalAPI) UnlockAlpha1(ctx context.Context, req *runtimev1pb.UnlockRequest) (*runtimev1pb.UnlockResponse, error)
- func (a *UniversalAPI) WaitForActorsReady(ctx context.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UniversalAPI ¶
type UniversalAPI struct { AppID string Logger logger.Logger Resiliency resiliency.Provider Actors actors.ActorRuntime CompStore *compstore.ComponentStore ShutdownFn func() GetComponentsCapabilitiesFn func() map[string][]string ExtendedMetadata map[string]string AppConnectionConfig config.AppConnectionConfig GlobalConfig *config.Configuration // contains filtered or unexported fields }
UniversalAPI contains the implementation of gRPC APIs that are also used by the HTTP server.
func (*UniversalAPI) CryptoGetUnwrapKeyFn ¶ added in v1.11.0
func (a *UniversalAPI) CryptoGetUnwrapKeyFn(ctx context.Context, componentName string, component contribCrypto.SubtleCrypto) encv1.UnwrapKeyFn
func (*UniversalAPI) CryptoGetWrapKeyFn ¶ added in v1.11.0
func (a *UniversalAPI) CryptoGetWrapKeyFn(ctx context.Context, componentName string, component contribCrypto.SubtleCrypto) encv1.WrapKeyFn
func (*UniversalAPI) CryptoValidateRequest ¶ added in v1.11.0
func (a *UniversalAPI) CryptoValidateRequest(componentName string) (contribCrypto.SubtleCrypto, error)
CryptoValidateRequest is an internal method that checks if the request is for a valid crypto component.
func (*UniversalAPI) GetBulkSecret ¶
func (a *UniversalAPI) GetBulkSecret(ctx context.Context, in *runtimev1pb.GetBulkSecretRequest) (*runtimev1pb.GetBulkSecretResponse, error)
func (*UniversalAPI) GetMetadata ¶ added in v1.12.0
func (a *UniversalAPI) GetMetadata(ctx context.Context, in *emptypb.Empty) (*runtimev1pb.GetMetadataResponse, error)
func (*UniversalAPI) GetSecret ¶
func (a *UniversalAPI) GetSecret(ctx context.Context, in *runtimev1pb.GetSecretRequest) (*runtimev1pb.GetSecretResponse, error)
func (*UniversalAPI) GetStateStore ¶ added in v1.11.0
func (a *UniversalAPI) GetStateStore(name string) (state.Store, error)
func (*UniversalAPI) GetWorkflowAlpha1 ¶ added in v1.11.0
func (a *UniversalAPI) GetWorkflowAlpha1(ctx context.Context, in *runtimev1pb.GetWorkflowRequest) (*runtimev1pb.GetWorkflowResponse, error)
GetWorkflowAlpha1 is the API handler for getting workflow details
func (*UniversalAPI) GetWorkflowBeta1 ¶ added in v1.12.0
func (a *UniversalAPI) GetWorkflowBeta1(ctx context.Context, in *runtimev1pb.GetWorkflowRequest) (*runtimev1pb.GetWorkflowResponse, error)
GetWorkflowBeta1 is the API handler for getting workflow details
func (*UniversalAPI) InitUniversalAPI ¶ added in v1.12.0
func (a *UniversalAPI) InitUniversalAPI()
InitUniversalAPI completes the initialization of the UniversalAPI object.
func (*UniversalAPI) PauseWorkflowAlpha1 ¶ added in v1.11.0
func (a *UniversalAPI) PauseWorkflowAlpha1(ctx context.Context, in *runtimev1pb.PauseWorkflowRequest) (*emptypb.Empty, error)
PauseWorkflowAlpha1 is the API handler for pausing a workflow
func (*UniversalAPI) PauseWorkflowBeta1 ¶ added in v1.12.0
func (a *UniversalAPI) PauseWorkflowBeta1(ctx context.Context, in *runtimev1pb.PauseWorkflowRequest) (*emptypb.Empty, error)
PauseWorkflowBeta1 is the API handler for pausing a workflow
func (*UniversalAPI) PurgeWorkflowAlpha1 ¶ added in v1.11.0
func (a *UniversalAPI) PurgeWorkflowAlpha1(ctx context.Context, in *runtimev1pb.PurgeWorkflowRequest) (*emptypb.Empty, error)
PurgeWorkflowAlpha1 is the API handler for purging a workflow
func (*UniversalAPI) PurgeWorkflowBeta1 ¶ added in v1.12.0
func (a *UniversalAPI) PurgeWorkflowBeta1(ctx context.Context, in *runtimev1pb.PurgeWorkflowRequest) (*emptypb.Empty, error)
PurgeWorkflowBeta1 is the API handler for purging a workflow
func (*UniversalAPI) QueryStateAlpha1 ¶ added in v1.11.0
func (a *UniversalAPI) QueryStateAlpha1(ctx context.Context, in *runtimev1pb.QueryStateRequest) (*runtimev1pb.QueryStateResponse, error)
func (*UniversalAPI) RaiseEventWorkflowAlpha1 ¶ added in v1.11.0
func (a *UniversalAPI) RaiseEventWorkflowAlpha1(ctx context.Context, in *runtimev1pb.RaiseEventWorkflowRequest) (*emptypb.Empty, error)
RaiseEventWorkflowAlpha1 is the API handler for raising an event to a workflow
func (*UniversalAPI) RaiseEventWorkflowBeta1 ¶ added in v1.12.0
func (a *UniversalAPI) RaiseEventWorkflowBeta1(ctx context.Context, in *runtimev1pb.RaiseEventWorkflowRequest) (*emptypb.Empty, error)
RaiseEventWorkflowBeta1 is the API handler for raising an event to a workflow
func (*UniversalAPI) ResumeWorkflowAlpha1 ¶ added in v1.11.0
func (a *UniversalAPI) ResumeWorkflowAlpha1(ctx context.Context, in *runtimev1pb.ResumeWorkflowRequest) (*emptypb.Empty, error)
ResumeWorkflowAlpha1 is the API handler for resuming a workflow
func (*UniversalAPI) ResumeWorkflowBeta1 ¶ added in v1.12.0
func (a *UniversalAPI) ResumeWorkflowBeta1(ctx context.Context, in *runtimev1pb.ResumeWorkflowRequest) (*emptypb.Empty, error)
ResumeWorkflowBeta1 is the API handler for resuming a workflow
func (*UniversalAPI) SetActorRuntime ¶ added in v1.12.0
func (a *UniversalAPI) SetActorRuntime(actor actors.ActorRuntime)
func (*UniversalAPI) SetActorsInitDone ¶ added in v1.12.0
func (a *UniversalAPI) SetActorsInitDone()
SetActorsInitDone indicates that the actors runtime has been initialized, whether actors are available or not
func (*UniversalAPI) SetMetadata ¶ added in v1.12.0
func (a *UniversalAPI) SetMetadata(ctx context.Context, in *runtimev1pb.SetMetadataRequest) (*emptypb.Empty, error)
SetMetadata Sets value in extended metadata of the sidecar.
func (*UniversalAPI) StartWorkflowAlpha1 ¶ added in v1.11.0
func (a *UniversalAPI) StartWorkflowAlpha1(ctx context.Context, in *runtimev1pb.StartWorkflowRequest) (*runtimev1pb.StartWorkflowResponse, error)
StartWorkflowAlpha1 is the API handler for starting a workflow
func (*UniversalAPI) StartWorkflowBeta1 ¶ added in v1.12.0
func (a *UniversalAPI) StartWorkflowBeta1(ctx context.Context, in *runtimev1pb.StartWorkflowRequest) (*runtimev1pb.StartWorkflowResponse, error)
StartWorkflowBeta1 is the API handler for starting a workflow
func (*UniversalAPI) SubtleDecryptAlpha1 ¶ added in v1.11.0
func (a *UniversalAPI) SubtleDecryptAlpha1(ctx context.Context, in *runtimev1pb.SubtleDecryptRequest) (*runtimev1pb.SubtleDecryptResponse, error)
SubtleDecryptAlpha1 decrypts a small message using a key stored in the vault.
func (*UniversalAPI) SubtleEncryptAlpha1 ¶ added in v1.11.0
func (a *UniversalAPI) SubtleEncryptAlpha1(ctx context.Context, in *runtimev1pb.SubtleEncryptRequest) (*runtimev1pb.SubtleEncryptResponse, error)
SubtleEncryptAlpha1 encrypts a small message using a key stored in the vault.
func (*UniversalAPI) SubtleGetKeyAlpha1 ¶ added in v1.11.0
func (a *UniversalAPI) SubtleGetKeyAlpha1(ctx context.Context, in *runtimev1pb.SubtleGetKeyRequest) (*runtimev1pb.SubtleGetKeyResponse, error)
SubtleGetKeyAlpha1 returns the public part of an asymmetric key stored in the vault.
func (*UniversalAPI) SubtleSignAlpha1 ¶ added in v1.11.0
func (a *UniversalAPI) SubtleSignAlpha1(ctx context.Context, in *runtimev1pb.SubtleSignRequest) (*runtimev1pb.SubtleSignResponse, error)
SubtleSignAlpha1 signs a message using a key stored in the vault.
func (*UniversalAPI) SubtleUnwrapKeyAlpha1 ¶ added in v1.11.0
func (a *UniversalAPI) SubtleUnwrapKeyAlpha1(ctx context.Context, in *runtimev1pb.SubtleUnwrapKeyRequest) (*runtimev1pb.SubtleUnwrapKeyResponse, error)
SubtleUnwrapKeyAlpha1 unwraps a key using a key stored in the vault.
func (*UniversalAPI) SubtleVerifyAlpha1 ¶ added in v1.11.0
func (a *UniversalAPI) SubtleVerifyAlpha1(ctx context.Context, in *runtimev1pb.SubtleVerifyRequest) (*runtimev1pb.SubtleVerifyResponse, error)
SubtleVerifyAlpha1 verifies the signature of a message using a key stored in the vault.
func (*UniversalAPI) SubtleWrapKeyAlpha1 ¶ added in v1.11.0
func (a *UniversalAPI) SubtleWrapKeyAlpha1(ctx context.Context, in *runtimev1pb.SubtleWrapKeyRequest) (*runtimev1pb.SubtleWrapKeyResponse, error)
SubtleWrapKeyAlpha1 wraps a key using a key stored in the vault.
func (*UniversalAPI) TerminateWorkflowAlpha1 ¶ added in v1.11.0
func (a *UniversalAPI) TerminateWorkflowAlpha1(ctx context.Context, in *runtimev1pb.TerminateWorkflowRequest) (*emptypb.Empty, error)
TerminateWorkflowAlpha1 is the API handler for terminating a workflow
func (*UniversalAPI) TerminateWorkflowBeta1 ¶ added in v1.12.0
func (a *UniversalAPI) TerminateWorkflowBeta1(ctx context.Context, in *runtimev1pb.TerminateWorkflowRequest) (*emptypb.Empty, error)
TerminateWorkflowBeta1 is the API handler for terminating a workflow
func (*UniversalAPI) TryLockAlpha1 ¶ added in v1.11.0
func (a *UniversalAPI) TryLockAlpha1(ctx context.Context, req *runtimev1pb.TryLockRequest) (*runtimev1pb.TryLockResponse, error)
func (*UniversalAPI) UnlockAlpha1 ¶ added in v1.11.0
func (a *UniversalAPI) UnlockAlpha1(ctx context.Context, req *runtimev1pb.UnlockRequest) (*runtimev1pb.UnlockResponse, error)
func (*UniversalAPI) WaitForActorsReady ¶ added in v1.12.0
func (a *UniversalAPI) WaitForActorsReady(ctx context.Context)
WaitForActorsReady blocks until the actor runtime is set in the object (or until the context is canceled).