Documentation
¶
Index ¶
- Variables
- type CryptoReconciler
- func (c *CryptoReconciler) CloseAmqpClients(ctx context.Context)
- func (c *CryptoReconciler) CreateJob(ctx context.Context, event *model.Event) (orbital.Job, error)
- func (c *CryptoReconciler) GetLastEvent(ctx context.Context, cmkItemID string) (*model.Event, error)
- func (c *CryptoReconciler) KeyDetach(ctx context.Context, keyID string) (orbital.Job, error)
- func (c *CryptoReconciler) KeyDisable(ctx context.Context, keyID string) (orbital.Job, error)
- func (c *CryptoReconciler) KeyEnable(ctx context.Context, keyID string) (orbital.Job, error)
- func (c *CryptoReconciler) SendEvent(ctx context.Context, event Event) error
- func (c *CryptoReconciler) Start(ctx context.Context) error
- func (c *CryptoReconciler) SystemLink(ctx context.Context, system *model.System, keyID string) (orbital.Job, error)
- func (c *CryptoReconciler) SystemSwitch(ctx context.Context, system *model.System, keyIDTo string, keyIDFrom string, ...) (orbital.Job, error)
- func (c *CryptoReconciler) SystemUnlink(ctx context.Context, system *model.System, keyID string) (orbital.Job, error)
- type Event
- type KeyActionJobData
- type Option
- type SystemActionJobData
Constants ¶
This section is empty.
Variables ¶
var ( ErrTargetNotConfigured = errors.New("target not configured for region") ErrUnsupportedTaskType = errors.New("unsupported task type") ErrKeyAccessMetadataNotFound = errors.New("key access metadata not found for system region") ErrPluginNotFound = errors.New("plugin not found for key provider") ErrSettingKeyClaim = errors.New("error setting key claim for system") ErrUnsupportedRegion = errors.New("unsupported region") ErrNoConnectedRegionsForKey = errors.New("no connected regions found for key") )
var ( ErrNoPreviousEvent = errors.New("no previous events found for selected item") ErrSystemProcessing = errors.New("system is still in processing state") ErrMissingKeyID = errors.New("keyID is required to create key event job") )
var ErrEventSendingFailed = errors.New("failed to send event")
Functions ¶
This section is empty.
Types ¶
type CryptoReconciler ¶
type CryptoReconciler struct {
// contains filtered or unexported fields
}
CryptoReconciler is responsible for handling orbital jobs and managing the lifecycle of systems in CMK.
func NewCryptoReconciler ¶
func NewCryptoReconciler( ctx context.Context, cfg *config.Config, repository repo.Repo, pluginCatalog *plugincatalog.Catalog, clientsFactory clients.Factory, opts ...Option, ) (*CryptoReconciler, error)
NewCryptoReconciler creates a new CryptoReconciler instance.
func (*CryptoReconciler) CloseAmqpClients ¶
func (c *CryptoReconciler) CloseAmqpClients(ctx context.Context)
func (*CryptoReconciler) GetLastEvent ¶
func (c *CryptoReconciler) GetLastEvent( ctx context.Context, cmkItemID string, ) (*model.Event, error)
GetLastEvent returns the last event of an item
func (*CryptoReconciler) KeyDetach ¶
KeyDetach creates a job to detach a key. Context provided must have the tenant set.
func (*CryptoReconciler) KeyDisable ¶
KeyDisable creates a job to disable a key make sure the ctx provided has the tenant set.
func (*CryptoReconciler) KeyEnable ¶
KeyEnable creates a job to enable a key make sure the ctx provided has the tenant set.
func (*CryptoReconciler) SendEvent ¶
func (c *CryptoReconciler) SendEvent(ctx context.Context, event Event) error
func (*CryptoReconciler) Start ¶
func (c *CryptoReconciler) Start(ctx context.Context) error
Start starts the orbital manager.
func (*CryptoReconciler) SystemLink ¶
func (c *CryptoReconciler) SystemLink(ctx context.Context, system *model.System, keyID string) (orbital.Job, error)
SystemLink creates a job to link a system with a key make sure the ctx provided has the tenant set.
func (*CryptoReconciler) SystemSwitch ¶
func (c *CryptoReconciler) SystemSwitch( ctx context.Context, system *model.System, keyIDTo string, keyIDFrom string, trigger string, ) (orbital.Job, error)
SystemSwitch creates a job to switch the key of a system from keyIDFrom to keyIDTo make sure the ctx provided has the tenant set. trigger can be KeyActionSetPrimary to indicate this switch is from a make primary key action
type KeyActionJobData ¶
KeyActionJobData contains the data needed for a key action orbital job.
type SystemActionJobData ¶
type SystemActionJobData struct {
SystemID string `json:"systemID"`
TenantID string `json:"tenantID"`
KeyIDTo string `json:"keyIDTo"`
KeyIDFrom string `json:"keyIDFrom"`
Trigger string `json:"trigger,omitempty"`
}
SystemActionJobData contains the data needed for a system action orbital job.