Documentation
¶
Index ¶
- Constants
- func Abort(action AutomationAction, format string, v ...any)
- func AuthenticateAccount3(ctx context.Context, config AuthenticationConfig, env *Environment) error
- func First[T models.Linkableable](wrapper interface{ ... }, err error) (T, error)
- func IsEqual(a AutomationAction, b AutomationAction) bool
- func IsEqualOrInverse(a AutomationAction, b AutomationAction) bool
- func IsInverse(a AutomationAction, b AutomationAction) bool
- func KeyHubError(err error) error
- func Koppeling(linkable models.Linkableable) models.RestLinkable
- func Ptr[T any](val T) *T
- func Run(config AuthenticationConfig, action AutomationAction)
- func Self(linkable models.Linkableable) models.RestLinkable
- type AuthenticatedAccount
- type AuthenticationConfig
- type AutomationAction
- type Environment
- type ProgressBarStepper
- type Stepper
Constants ¶
View Source
const Account3UUIDPlaceholder = "00000000-0000-0000-0000-000000000000"
Variables ¶
This section is empty.
Functions ¶
func Abort ¶
func Abort(action AutomationAction, format string, v ...any)
func AuthenticateAccount3 ¶
func AuthenticateAccount3(ctx context.Context, config AuthenticationConfig, env *Environment) error
func First ¶
func First[T models.Linkableable](wrapper interface{ GetItems() []T }, err error) (T, error)
func IsEqual ¶
func IsEqual(a AutomationAction, b AutomationAction) bool
func IsEqualOrInverse ¶
func IsEqualOrInverse(a AutomationAction, b AutomationAction) bool
func IsInverse ¶
func IsInverse(a AutomationAction, b AutomationAction) bool
func KeyHubError ¶
func Koppeling ¶
func Koppeling(linkable models.Linkableable) models.RestLinkable
func Run ¶
func Run(config AuthenticationConfig, action AutomationAction)
func Self ¶
func Self(linkable models.Linkableable) models.RestLinkable
Types ¶
type AuthenticatedAccount ¶
type AuthenticatedAccount struct {
Client *keyhub.KeyHubClient
Account models.AuthAccountable
}
type AuthenticationConfig ¶
type AuthenticationConfig struct {
Issuer string
ClientID string
ClientSecret string
Scopes []string
VaultRecoveryRecordUUID string
}
func NewAuthenticationConfig ¶
func NewAuthenticationConfig(issuer string, clientID string, clientSecret string) AuthenticationConfig
type AutomationAction ¶
type AutomationAction interface {
TypeID() string
Parameters() []*string
Init(ctx context.Context, env *Environment)
IsSatisfied() bool
Requires3() bool
AllowGlobalOptimization() bool
Execute(ctx context.Context, env *Environment) error
Setup(env *Environment) []AutomationAction
Perform(env *Environment) []AutomationAction
Revert() AutomationAction
Progress() string
fmt.Stringer
}
func Collect ¶
func Collect(ctx context.Context, action AutomationAction, env *Environment, stepper Stepper) []AutomationAction
type Environment ¶
type Environment struct {
Account1 *AuthenticatedAccount
Account2 *AuthenticatedAccount
Account3 *AuthenticatedAccount
VaultRecoveryKey string
}
func SetupEnvironment ¶
func SetupEnvironment(ctx context.Context, config AuthenticationConfig) (*Environment, error)
type ProgressBarStepper ¶
type ProgressBarStepper struct {
// contains filtered or unexported fields
}
func (*ProgressBarStepper) AddSteps ¶
func (s *ProgressBarStepper) AddSteps(num int64)
func (*ProgressBarStepper) Describe ¶
func (s *ProgressBarStepper) Describe(text string)
func (*ProgressBarStepper) Done ¶
func (s *ProgressBarStepper) Done()
func (*ProgressBarStepper) Step ¶
func (s *ProgressBarStepper) Step()
Click to show internal directories.
Click to hide internal directories.