Documentation
¶
Index ¶
- Constants
- type ManageSSHKeyGroup
- func (mskg ManageSSHKeyGroup) DeleteSSHKeyGroupViaSiteAgent(ctx context.Context, siteID uuid.UUID, sshKeyGroupID uuid.UUID) error
- func (mskg ManageSSHKeyGroup) IsSSHKeyGroupCreatedOnSite(ctx context.Context, tx *cdb.Tx, sshKeyGroupSiteAssociationID uuid.UUID) (*bool, error)
- func (mskg ManageSSHKeyGroup) SyncSSHKeyGroupViaSiteAgent(ctx context.Context, siteID uuid.UUID, sshKeyGroupID uuid.UUID, version string) error
- func (mskg ManageSSHKeyGroup) UpdateSSHKeyGroupInDB(ctx context.Context, siteID uuid.UUID, transactionID *cwssaws.TransactionID, ...) (*string, error)
- func (mskg ManageSSHKeyGroup) UpdateSSHKeyGroupStatusInDB(ctx context.Context, sshKeyGroupIDStr string) error
- func (mskg ManageSSHKeyGroup) UpdateSSHKeyGroupsInDB(ctx context.Context, siteID uuid.UUID, ...) ([]string, error)
Constants ¶
const ( MsgSSHKeyGroupSynced = "SSHKeyGroup successfully synced to Site" MsgSSHKeyGroupCreateInitiated = "initiated SSHKeyGroup syncing for create via Site Agent" MsgSSHKeyGroupUpdateInitiated = "initiated SSHKeyGroup syncing for update via Site Agent" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ManageSSHKeyGroup ¶
type ManageSSHKeyGroup struct {
// contains filtered or unexported fields
}
ManageSSHKeyGroup is an activity wrapper for managing SSHKeyGroup lifecycle for a Site and allows injecting DB access
func NewManageSSHKeyGroup ¶
func NewManageSSHKeyGroup(dbSession *cdb.Session, siteClientPool *sc.ClientPool) ManageSSHKeyGroup
NewManageSSHKeyGroup returns a new ManageSSHKeyGroup activity
func (ManageSSHKeyGroup) DeleteSSHKeyGroupViaSiteAgent ¶
func (mskg ManageSSHKeyGroup) DeleteSSHKeyGroupViaSiteAgent(ctx context.Context, siteID uuid.UUID, sshKeyGroupID uuid.UUID) error
DeleteSSHKeyGroupViaSiteAgent is a Temporal activity that delete a SSHKeyGroup in Site Controller via Site agent
func (ManageSSHKeyGroup) IsSSHKeyGroupCreatedOnSite ¶
func (mskg ManageSSHKeyGroup) IsSSHKeyGroupCreatedOnSite(ctx context.Context, tx *cdb.Tx, sshKeyGroupSiteAssociationID uuid.UUID) (*bool, error)
IsSSHKeyGroupCreated is helper function to get if sshkeygroup created or not
func (ManageSSHKeyGroup) SyncSSHKeyGroupViaSiteAgent ¶
func (mskg ManageSSHKeyGroup) SyncSSHKeyGroupViaSiteAgent(ctx context.Context, siteID uuid.UUID, sshKeyGroupID uuid.UUID, version string) error
SyncSSHKeyGroupViaSiteAgent is a Temporal activity that create/update SSHKeyGroup in Site Controller via Site agent
func (ManageSSHKeyGroup) UpdateSSHKeyGroupInDB ¶
func (mskg ManageSSHKeyGroup) UpdateSSHKeyGroupInDB(ctx context.Context, siteID uuid.UUID, transactionID *cwssaws.TransactionID, sshKeyGroupInfo *cwssaws.SSHKeyGroupInfo) (*string, error)
UpdateSSHKeyGroupSiteAssociationInDB updates an SSHKeyGroup for a Site in the DB from data pushed by Site Controller
func (ManageSSHKeyGroup) UpdateSSHKeyGroupStatusInDB ¶
func (mskg ManageSSHKeyGroup) UpdateSSHKeyGroupStatusInDB(ctx context.Context, sshKeyGroupIDStr string) error
UpdateSSHKeyGroupStatusInDB is helper function to write SSH Key Group updates to DB
func (ManageSSHKeyGroup) UpdateSSHKeyGroupsInDB ¶
func (mskg ManageSSHKeyGroup) UpdateSSHKeyGroupsInDB(ctx context.Context, siteID uuid.UUID, sshKeyGroupInventory *cwssaws.SSHKeyGroupInventory) ([]string, error)
UpdateSSHKeyGroupsInDB takes information pushed by Site Agent for a collection of SSH Key Groups associated with the Site and updates the DB