Documentation ¶
Index ¶
- Constants
- type ArgoWorkflowMediator
- type CredentialMicroservice
- func (c CredentialMicroservice) Get(actor types.Actor, owner, id string) (*service.CredentialModel, error)
- func (c CredentialMicroservice) List(actor types.Actor, owner string) ([]service.CredentialModel, error)
- func (c CredentialMicroservice) ListPublicSSHKeys(actor types.Actor, owner string) ([]service.CredentialModel, error)
- type DeploymentMetadataService
- type DeploymentWorkflowStorage
- func (storage DeploymentWorkflowStorage) CreateDeploymentDeletionWorkflow(deployment common.ID, templateType service.TemplateTypeName, ...) error
- func (storage DeploymentWorkflowStorage) CreateDeploymentExecWorkflow(deployment common.ID, templateType service.TemplateTypeName, run common.ID, ...) error
- func (storage DeploymentWorkflowStorage) CreateDeploymentPreflightWorkflow(deployment common.ID, templateType service.TemplateTypeName, run common.ID, ...) error
- func (storage DeploymentWorkflowStorage) CreatePrerequisiteDeletionWorkflow(deployment common.ID, templateType service.TemplateTypeName, ...) error
- func (storage *DeploymentWorkflowStorage) Init() error
- func (storage DeploymentWorkflowStorage) ListDeploymentDeletionWorkflows(deploymentID common.ID) ([]types.DeploymentWorkflow, error)
- func (storage DeploymentWorkflowStorage) ListDeploymentRunWorkflows(deploymentID common.ID, runID common.ID) ([]types.DeploymentWorkflow, error)
- func (storage DeploymentWorkflowStorage) Search(provider awmclient.AWMProvider, workflowName string) (types.DeploymentWorkflow, error)
- func (storage DeploymentWorkflowStorage) WorkflowFailedAt(provider awmclient.AWMProvider, workflowName string, endsAt time.Time) error
- func (storage DeploymentWorkflowStorage) WorkflowSucceededAt(provider awmclient.AWMProvider, workflowName string, endsAt time.Time) error
- type EncryptionKeyEnvVar
- type EncryptionKeyFile
- type Event
- type ProviderMicroservice
- type QueryAdapter
- type SSHKeySrc
- type StanAdapter
- type StanAdapterOutgoing
- func (s StanAdapterOutgoing) EventDeploymentDeletionCleanupFailed(result deploymentevents.DeploymentDeletionCleanupResult)
- func (s StanAdapterOutgoing) EventDeploymentDeletionCleanupStarted(started deploymentevents.DeploymentDeletionCleanupStarted)
- func (s StanAdapterOutgoing) EventDeploymentDeletionCleanupSucceeded(result deploymentevents.DeploymentDeletionCleanupResult)
- func (s StanAdapterOutgoing) EventRunExecutionFailed(failed deploymentevents.RunExecutionFailed)
- func (s StanAdapterOutgoing) EventRunExecutionStarted(started deploymentevents.RunExecutionStarted)
- func (s StanAdapterOutgoing) EventRunExecutionSucceeded(succeeded deploymentevents.RunExecutionSucceeded)
- func (s StanAdapterOutgoing) EventRunPreflightFailed(result deploymentevents.RunPreflightResult)
- func (s StanAdapterOutgoing) EventRunPreflightStartFailed(failed deploymentevents.RunPreflightStartFailed)
- func (s StanAdapterOutgoing) EventRunPreflightStarted(started deploymentevents.RunPreflightStarted)
- func (s StanAdapterOutgoing) EventRunPreflightSucceeded(result deploymentevents.RunPreflightResult)
- type TFRunMongoStorage
- func (storage *TFRunMongoStorage) Close() error
- func (storage TFRunMongoStorage) Create(run types.DeploymentRun) error
- func (storage TFRunMongoStorage) Get(runID common.ID) (types.DeploymentRun, error)
- func (storage *TFRunMongoStorage) Init() error
- func (storage TFRunMongoStorage) Search(filter types.DeploymentRunFilter) ([]types.DeploymentRun, error)
- func (storage TFRunMongoStorage) Update(runID common.ID, update types.DeploymentRunUpdate, ...) (updated bool, err error)
- type TemplateMicroservice
- type UTCTimeSrc
- type WorkspaceMicroservice
Constants ¶
const TFRunCollectionName = "deploymentRunTF"
TFRunCollectionName is mongodb collection name for Terraform Run
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArgoWorkflowMediator ¶
type ArgoWorkflowMediator struct {
// contains filtered or unexported fields
}
ArgoWorkflowMediator is a client to interact with ArgoWorkflowMediator
func NewArgoWorkflowMediator ¶
func NewArgoWorkflowMediator(conn *messaging2.StanConnection) ArgoWorkflowMediator
NewArgoWorkflowMediator creates a new ArgoWorkflowMediator
func (ArgoWorkflowMediator) Create ¶
func (awm ArgoWorkflowMediator) Create( ctx context.Context, provider common.ID, username string, workflowFilename string, opts ...awmclient.AWMWorkflowCreateOpt) (awmProvider awmclient.AWMProvider, wfName string, err error)
Create perform sync workflow creation
func (ArgoWorkflowMediator) CreateAsync ¶
func (awm ArgoWorkflowMediator) CreateAsync( provider common.ID, username string, workflowFilename string, opts ...awmclient.AWMWorkflowCreateOpt) error
CreateAsync perform async creation
type CredentialMicroservice ¶
type CredentialMicroservice struct {
// contains filtered or unexported fields
}
CredentialMicroservice ...
func NewCredentialMicroservice ¶
func NewCredentialMicroservice(queryConn messaging2.QueryConnection) *CredentialMicroservice
NewCredentialMicroservice ...
func (CredentialMicroservice) Get ¶
func (c CredentialMicroservice) Get(actor types.Actor, owner, id string) (*service.CredentialModel, error)
Get a credential by ID from credential microservice. Note: the combination of username and cred ID is unique. The ID alone is Not.
func (CredentialMicroservice) List ¶
func (c CredentialMicroservice) List(actor types.Actor, owner string) ([]service.CredentialModel, error)
List returns a list of all credentials owned by a user.
func (CredentialMicroservice) ListPublicSSHKeys ¶
func (c CredentialMicroservice) ListPublicSSHKeys(actor types.Actor, owner string) ([]service.CredentialModel, error)
ListPublicSSHKeys returns a list of all ssh credentials owned by a user.
type DeploymentMetadataService ¶
type DeploymentMetadataService struct {
// contains filtered or unexported fields
}
DeploymentMetadataService is a client to interact with deployment metadata service
func NewDeploymentMetadataService ¶
func NewDeploymentMetadataService(conn messaging2.QueryConnection) DeploymentMetadataService
NewDeploymentMetadataService ...
func (DeploymentMetadataService) Get ¶
func (svc DeploymentMetadataService) Get(actor types.Actor, id common.ID) (service.Deployment, error)
Get fetches a deployment by ID
type DeploymentWorkflowStorage ¶
type DeploymentWorkflowStorage struct {
// contains filtered or unexported fields
}
DeploymentWorkflowStorage is a mongodb storage adapter for deployment workflow records
func NewDeploymentWorkflowStorage ¶
func NewDeploymentWorkflowStorage(config db.MongoDBConfig) *DeploymentWorkflowStorage
NewDeploymentWorkflowStorage ...
func (DeploymentWorkflowStorage) CreateDeploymentDeletionWorkflow ¶
func (storage DeploymentWorkflowStorage) CreateDeploymentDeletionWorkflow(deployment common.ID, templateType service.TemplateTypeName, awmProvider awmclient.AWMProvider, workflowName string) error
CreateDeploymentDeletionWorkflow inserts a workflow record for workflow that deletes deployment resource.
func (DeploymentWorkflowStorage) CreateDeploymentExecWorkflow ¶
func (storage DeploymentWorkflowStorage) CreateDeploymentExecWorkflow(deployment common.ID, templateType service.TemplateTypeName, run common.ID, awmProvider awmclient.AWMProvider, workflowName string) error
CreateDeploymentExecWorkflow inserts a workflow record for workflow that executes the execution template.
func (DeploymentWorkflowStorage) CreateDeploymentPreflightWorkflow ¶
func (storage DeploymentWorkflowStorage) CreateDeploymentPreflightWorkflow(deployment common.ID, templateType service.TemplateTypeName, run common.ID, awmProvider awmclient.AWMProvider, workflowName string) error
CreateDeploymentPreflightWorkflow inserts a workflow record for workflow that executes the prerequisite template.
func (DeploymentWorkflowStorage) CreatePrerequisiteDeletionWorkflow ¶
func (storage DeploymentWorkflowStorage) CreatePrerequisiteDeletionWorkflow(deployment common.ID, templateType service.TemplateTypeName, awmProvider awmclient.AWMProvider, workflowName string) error
CreatePrerequisiteDeletionWorkflow inserts a workflow record for workflow that deletes prerequisite (resource provisioned for prerequisite template).
func (*DeploymentWorkflowStorage) Init ¶
func (storage *DeploymentWorkflowStorage) Init() error
Init initialize the mongo connection
func (DeploymentWorkflowStorage) ListDeploymentDeletionWorkflows ¶
func (storage DeploymentWorkflowStorage) ListDeploymentDeletionWorkflows(deploymentID common.ID) ([]types.DeploymentWorkflow, error)
ListDeploymentDeletionWorkflows ...
func (DeploymentWorkflowStorage) ListDeploymentRunWorkflows ¶
func (storage DeploymentWorkflowStorage) ListDeploymentRunWorkflows(deploymentID common.ID, runID common.ID) ([]types.DeploymentWorkflow, error)
ListDeploymentRunWorkflows ...
func (DeploymentWorkflowStorage) Search ¶
func (storage DeploymentWorkflowStorage) Search(provider awmclient.AWMProvider, workflowName string) (types.DeploymentWorkflow, error)
Search searches for a workflow record.
func (DeploymentWorkflowStorage) WorkflowFailedAt ¶
func (storage DeploymentWorkflowStorage) WorkflowFailedAt(provider awmclient.AWMProvider, workflowName string, endsAt time.Time) error
WorkflowFailedAt update the workflow record to failed
func (DeploymentWorkflowStorage) WorkflowSucceededAt ¶
func (storage DeploymentWorkflowStorage) WorkflowSucceededAt(provider awmclient.AWMProvider, workflowName string, endsAt time.Time) error
WorkflowSucceededAt update the workflow record to succeeded
type EncryptionKeyEnvVar ¶
type EncryptionKeyEnvVar struct {
// contains filtered or unexported fields
}
EncryptionKeyEnvVar reads base64 encoded encryption key from env var.
func NewEncryptionKeyEnvVar ¶
func NewEncryptionKeyEnvVar(envVar string) *EncryptionKeyEnvVar
NewEncryptionKeyEnvVar ...
type EncryptionKeyFile ¶
type EncryptionKeyFile struct {
// contains filtered or unexported fields
}
EncryptionKeyFile reads encryption key from file.
func NewEncryptionKeyFile ¶
func NewEncryptionKeyFile(filename string) *EncryptionKeyFile
NewEncryptionKeyFile ...
type Event ¶
type Event cloudevents.Event
Event implements types.IncomingEvent & types.OutgoingEvent
func (Event) CloudEvent ¶
func (e Event) CloudEvent() cloudevents.Event
CloudEvent returns the event as a cloudevent
func (Event) ToCloudEvent ¶
func (e Event) ToCloudEvent(source string) (cloudevents.Event, error)
ToCloudEvent returns the event as a cloudevent with the specified source
func (Event) Transaction ¶
func (e Event) Transaction() common.TransactionID
Transaction returns the transaction ID
type ProviderMicroservice ¶
type ProviderMicroservice struct {
// contains filtered or unexported fields
}
ProviderMicroservice is a client to provider microservice
func NewProviderMicroservice ¶
func NewProviderMicroservice(queryConn messaging2.QueryConnection) *ProviderMicroservice
NewProviderMicroservice ...
func (ProviderMicroservice) Get ¶
func (p ProviderMicroservice) Get(actor types.Actor, id common.ID) (*service.ProviderModel, error)
Get fetch a provider by ID
func (ProviderMicroservice) List ¶
func (p ProviderMicroservice) List(actor types.Actor) ([]service.ProviderModel, error)
List fetches a list of provider
type QueryAdapter ¶
type QueryAdapter struct {
// contains filtered or unexported fields
}
QueryAdapter is an adapter for NATS, implements ports.ReplySink and ports.QuerySrc
func NewQueryAdapter ¶
func NewQueryAdapter(qc messaging2.QueryConnection) *QueryAdapter
NewQueryAdapter ...
func (*QueryAdapter) Start ¶
func (a *QueryAdapter) Start(ctx context.Context, wg *sync.WaitGroup, handlers ports.QueryHandlers) error
Start ...
type SSHKeySrc ¶
type SSHKeySrc struct {
SSHKey string
}
SSHKeySrc stores the master SSH key that will be injected into users' VMs to provide CACAO access to users' VMs.
type StanAdapter ¶
type StanAdapter struct {
// contains filtered or unexported fields
}
StanAdapter is an adapter for STAN that does both publishing and subscription
func NewStanAdapter ¶
func NewStanAdapter(conn messaging2.EventConnection) *StanAdapter
NewStanAdapter ...
func (*StanAdapter) SetHandlers ¶
func (src *StanAdapter) SetHandlers(handlers ports.EventHandlers)
SetHandlers ...
type StanAdapterOutgoing ¶
type StanAdapterOutgoing struct {
// contains filtered or unexported fields
}
StanAdapterOutgoing ...
func (StanAdapterOutgoing) EventDeploymentDeletionCleanupFailed ¶
func (s StanAdapterOutgoing) EventDeploymentDeletionCleanupFailed(result deploymentevents.DeploymentDeletionCleanupResult)
EventDeploymentDeletionCleanupFailed ...
func (StanAdapterOutgoing) EventDeploymentDeletionCleanupStarted ¶
func (s StanAdapterOutgoing) EventDeploymentDeletionCleanupStarted(started deploymentevents.DeploymentDeletionCleanupStarted)
EventDeploymentDeletionCleanupStarted ...
func (StanAdapterOutgoing) EventDeploymentDeletionCleanupSucceeded ¶
func (s StanAdapterOutgoing) EventDeploymentDeletionCleanupSucceeded(result deploymentevents.DeploymentDeletionCleanupResult)
EventDeploymentDeletionCleanupSucceeded ...
func (StanAdapterOutgoing) EventRunExecutionFailed ¶
func (s StanAdapterOutgoing) EventRunExecutionFailed(failed deploymentevents.RunExecutionFailed)
EventRunExecutionFailed ...
func (StanAdapterOutgoing) EventRunExecutionStarted ¶
func (s StanAdapterOutgoing) EventRunExecutionStarted(started deploymentevents.RunExecutionStarted)
EventRunExecutionStarted ...
func (StanAdapterOutgoing) EventRunExecutionSucceeded ¶
func (s StanAdapterOutgoing) EventRunExecutionSucceeded(succeeded deploymentevents.RunExecutionSucceeded)
EventRunExecutionSucceeded ...
func (StanAdapterOutgoing) EventRunPreflightFailed ¶
func (s StanAdapterOutgoing) EventRunPreflightFailed(result deploymentevents.RunPreflightResult)
EventRunPreflightFailed ...
func (StanAdapterOutgoing) EventRunPreflightStartFailed ¶
func (s StanAdapterOutgoing) EventRunPreflightStartFailed(failed deploymentevents.RunPreflightStartFailed)
EventRunPreflightStartFailed ...
func (StanAdapterOutgoing) EventRunPreflightStarted ¶
func (s StanAdapterOutgoing) EventRunPreflightStarted(started deploymentevents.RunPreflightStarted)
EventRunPreflightStarted ...
func (StanAdapterOutgoing) EventRunPreflightSucceeded ¶
func (s StanAdapterOutgoing) EventRunPreflightSucceeded(result deploymentevents.RunPreflightResult)
EventRunPreflightSucceeded ...
type TFRunMongoStorage ¶
type TFRunMongoStorage struct {
// contains filtered or unexported fields
}
TFRunMongoStorage is mongodb storage for Terraform Run
func NewTFRunMongoStorage ¶
func NewTFRunMongoStorage(conf db.MongoDBConfig) *TFRunMongoStorage
NewTFRunMongoStorage ...
func (TFRunMongoStorage) Create ¶
func (storage TFRunMongoStorage) Create(run types.DeploymentRun) error
Create inserts a run
func (TFRunMongoStorage) Get ¶
func (storage TFRunMongoStorage) Get(runID common.ID) (types.DeploymentRun, error)
Get fetches a run based on ID
func (*TFRunMongoStorage) Init ¶
func (storage *TFRunMongoStorage) Init() error
Init initialize the mongo connection
func (TFRunMongoStorage) Search ¶
func (storage TFRunMongoStorage) Search(filter types.DeploymentRunFilter) ([]types.DeploymentRun, error)
Search ...
func (TFRunMongoStorage) Update ¶
func (storage TFRunMongoStorage) Update(runID common.ID, update types.DeploymentRunUpdate, filter types.DeploymentRunFilter) (updated bool, err error)
Update ...
type TemplateMicroservice ¶
type TemplateMicroservice struct {
// contains filtered or unexported fields
}
TemplateMicroservice is a client for template microservice
func NewTemplateMicroservice ¶
func NewTemplateMicroservice(queryConn messaging2.QueryConnection) *TemplateMicroservice
NewTemplateMicroservice ...
func (TemplateMicroservice) GetTemplateVersion ¶
func (t TemplateMicroservice) GetTemplateVersion(actor types.Actor, id common.ID) (*service.TemplateVersion, error)
GetTemplateVersion ...
type WorkspaceMicroservice ¶
type WorkspaceMicroservice struct {
// contains filtered or unexported fields
}
WorkspaceMicroservice is a client to interact with Workspace microservice
func NewWorkspaceMicroservice ¶
func NewWorkspaceMicroservice(queryConn messaging2.QueryConnection) *WorkspaceMicroservice
NewWorkspaceMicroservice ...
func (WorkspaceMicroservice) Get ¶
func (w WorkspaceMicroservice) Get(actor types.Actor, id common.ID) (*service.WorkspaceModel, error)
Get a workspace