Documentation
¶
Index ¶
- Variables
- func InitializeProviders(registry *ProviderRegistry)
- type ApprovalAction
- type Category
- type CloudCategoryAdapter
- type CloudOperationAdapter
- type CloudProviderAdapter
- func (a *CloudProviderAdapter) Authenticate(method string, authConfig map[string]string) error
- func (a *CloudProviderAdapter) Configure(config map[string]string) error
- func (a *CloudProviderAdapter) Description() string
- func (a *CloudProviderAdapter) GetAuthConfigKeys(method string) []string
- func (a *CloudProviderAdapter) GetAuthenticationMethods() []string
- func (a *CloudProviderAdapter) GetConfigKeys() []string
- func (a *CloudProviderAdapter) GetConfigOptions(key string) ([]string, error)
- func (a *CloudProviderAdapter) GetProfiles() ([]string, error)
- func (a *CloudProviderAdapter) IsAuthenticated() bool
- func (a *CloudProviderAdapter) LoadConfig(profile, region string) error
- func (a *CloudProviderAdapter) Name() string
- func (a *CloudProviderAdapter) Services() []Service
- type CloudServiceAdapter
- type CodePipelineManualApprovalOperation
- type FunctionStatus
- type FunctionStatusOperation
- type Operation
- type PipelineStatus
- type PipelineStatusOperation
- type Provider
- type ProviderRegistry
- func (r *ProviderRegistry) Get(name string) (Provider, error)
- func (r *ProviderRegistry) GetProvider(name string) (Provider, bool)
- func (r *ProviderRegistry) GetProviderNames() []string
- func (r *ProviderRegistry) List() []Provider
- func (r *ProviderRegistry) Providers() []Provider
- func (r *ProviderRegistry) Register(provider Provider)
- type Service
- type StageStatus
- type StartPipelineOperation
- type UIOperation
Constants ¶
This section is empty.
Variables ¶
var CreateAWSProvider func() Provider
CreateAWSProvider creates a new AWS provider. This is a placeholder that will be replaced by the actual implementation.
Functions ¶
func InitializeProviders ¶
func InitializeProviders(registry *ProviderRegistry)
InitializeProviders registers all available providers with the registry.
Types ¶
type ApprovalAction ¶
ApprovalAction represents a pending approval in a pipeline
type Category ¶
type Category interface {
// Name returns the category's name
Name() string
// Description returns the category's description
Description() string
// Operations returns all available operations for this category
Operations() []Operation
// IsUIVisible returns whether this category should be visible in the UI
IsUIVisible() bool
}
Category interface defines methods that all service categories must implement
type CloudCategoryAdapter ¶
type CloudCategoryAdapter struct {
// contains filtered or unexported fields
}
CloudCategoryAdapter adapts a cloud.Category to a providers.Category.
func NewCloudCategoryAdapter ¶
func NewCloudCategoryAdapter(category cloud.Category) *CloudCategoryAdapter
NewCloudCategoryAdapter creates a new adapter for a cloud.Category.
func (*CloudCategoryAdapter) Description ¶
func (a *CloudCategoryAdapter) Description() string
Description returns the category's description.
func (*CloudCategoryAdapter) IsUIVisible ¶
func (a *CloudCategoryAdapter) IsUIVisible() bool
IsUIVisible returns whether this category should be visible in the UI.
func (*CloudCategoryAdapter) Name ¶
func (a *CloudCategoryAdapter) Name() string
Name returns the category's name.
func (*CloudCategoryAdapter) Operations ¶
func (a *CloudCategoryAdapter) Operations() []Operation
Operations returns all available operations for this category.
type CloudOperationAdapter ¶
type CloudOperationAdapter struct {
// contains filtered or unexported fields
}
CloudOperationAdapter adapts a cloud.Operation to a providers.Operation.
func NewCloudOperationAdapter ¶
func NewCloudOperationAdapter(operation cloud.Operation) *CloudOperationAdapter
NewCloudOperationAdapter creates a new adapter for a cloud.Operation.
func (*CloudOperationAdapter) Description ¶
func (a *CloudOperationAdapter) Description() string
Description returns the operation's description.
func (*CloudOperationAdapter) Execute ¶
func (a *CloudOperationAdapter) Execute(ctx context.Context, params map[string]interface{}) (interface{}, error)
Execute executes the operation with the given parameters.
func (*CloudOperationAdapter) IsUIVisible ¶
func (a *CloudOperationAdapter) IsUIVisible() bool
IsUIVisible returns whether this operation should be visible in the UI.
func (*CloudOperationAdapter) Name ¶
func (a *CloudOperationAdapter) Name() string
Name returns the operation's name.
type CloudProviderAdapter ¶
type CloudProviderAdapter struct {
// contains filtered or unexported fields
}
CloudProviderAdapter adapts a cloud.Provider to a providers.Provider.
func NewCloudProviderAdapter ¶
func NewCloudProviderAdapter(provider cloud.Provider) *CloudProviderAdapter
NewCloudProviderAdapter creates a new adapter for a cloud.Provider.
func (*CloudProviderAdapter) Authenticate ¶
func (a *CloudProviderAdapter) Authenticate(method string, authConfig map[string]string) error
Authenticate authenticates with the provider using the given method and configuration
func (*CloudProviderAdapter) Configure ¶
func (a *CloudProviderAdapter) Configure(config map[string]string) error
Configure configures the provider with the given configuration
func (*CloudProviderAdapter) Description ¶
func (a *CloudProviderAdapter) Description() string
Description returns the provider's description.
func (*CloudProviderAdapter) GetAuthConfigKeys ¶
func (a *CloudProviderAdapter) GetAuthConfigKeys(method string) []string
GetAuthConfigKeys returns the configuration keys required for an authentication method
func (*CloudProviderAdapter) GetAuthenticationMethods ¶
func (a *CloudProviderAdapter) GetAuthenticationMethods() []string
GetAuthenticationMethods returns the available authentication methods
func (*CloudProviderAdapter) GetConfigKeys ¶
func (a *CloudProviderAdapter) GetConfigKeys() []string
GetConfigKeys returns the configuration keys required by this provider
func (*CloudProviderAdapter) GetConfigOptions ¶
func (a *CloudProviderAdapter) GetConfigOptions(key string) ([]string, error)
GetConfigOptions returns the available options for a configuration key
func (*CloudProviderAdapter) GetProfiles ¶
func (a *CloudProviderAdapter) GetProfiles() ([]string, error)
GetProfiles returns all available profiles for this provider.
func (*CloudProviderAdapter) IsAuthenticated ¶
func (a *CloudProviderAdapter) IsAuthenticated() bool
IsAuthenticated returns whether the provider is authenticated
func (*CloudProviderAdapter) LoadConfig ¶
func (a *CloudProviderAdapter) LoadConfig(profile, region string) error
LoadConfig loads the provider configuration with the given profile and region.
func (*CloudProviderAdapter) Name ¶
func (a *CloudProviderAdapter) Name() string
Name returns the provider's name.
func (*CloudProviderAdapter) Services ¶
func (a *CloudProviderAdapter) Services() []Service
Services returns all available services for this provider.
type CloudServiceAdapter ¶
type CloudServiceAdapter struct {
// contains filtered or unexported fields
}
CloudServiceAdapter adapts a cloud.Service to a providers.Service.
func NewCloudServiceAdapter ¶
func NewCloudServiceAdapter(service cloud.Service) *CloudServiceAdapter
NewCloudServiceAdapter creates a new adapter for a cloud.Service.
func (*CloudServiceAdapter) Categories ¶
func (a *CloudServiceAdapter) Categories() []Category
Categories returns all available categories for this service.
func (*CloudServiceAdapter) Description ¶
func (a *CloudServiceAdapter) Description() string
Description returns the service's description.
func (*CloudServiceAdapter) Name ¶
func (a *CloudServiceAdapter) Name() string
Name returns the service's name.
type CodePipelineManualApprovalOperation ¶
type CodePipelineManualApprovalOperation interface {
UIOperation
// GetPendingApprovals returns all pending manual approval actions
GetPendingApprovals(ctx context.Context) ([]ApprovalAction, error)
// ApproveAction approves or rejects an approval action
ApproveAction(ctx context.Context, action ApprovalAction, approved bool, comment string) error
}
CodePipelineManualApprovalOperation represents a manual approval operation for AWS CodePipeline
type FunctionStatus ¶
type FunctionStatus struct {
Name string
Runtime string
Memory int32
Timeout int32
LastUpdate string
Role string
Handler string
Description string
FunctionArn string
CodeSize int64
Version string
PackageType string
Architecture string
LogGroup string
}
FunctionStatus represents the status of a Lambda function
type FunctionStatusOperation ¶
type FunctionStatusOperation interface {
UIOperation
// GetFunctionStatus returns the status of all Lambda functions
GetFunctionStatus(ctx context.Context) ([]FunctionStatus, error)
}
FunctionStatusOperation represents an operation to view Lambda function status
type Operation ¶
type Operation interface {
// Name returns the operation's name
Name() string
// Description returns the operation's description
Description() string
// Execute executes the operation with the given parameters
Execute(ctx context.Context, params map[string]interface{}) (interface{}, error)
// IsUIVisible returns whether this operation should be visible in the UI
IsUIVisible() bool
}
Operation interface defines methods that all service operations must implement
type PipelineStatus ¶
type PipelineStatus struct {
Name string
Stages []StageStatus
}
PipelineStatus represents the status of a pipeline and its stages
type PipelineStatusOperation ¶
type PipelineStatusOperation interface {
UIOperation
// GetPipelineStatus returns the status of all pipelines
GetPipelineStatus(ctx context.Context) ([]PipelineStatus, error)
}
PipelineStatusOperation represents an operation to view pipeline status
type Provider ¶
type Provider interface {
// Name returns the provider's name
Name() string
// Description returns the provider's description
Description() string
// Services returns all available services for this provider
Services() []Service
// GetProfiles returns all available profiles for this provider
GetProfiles() ([]string, error)
// LoadConfig loads the provider configuration with the given profile and region
LoadConfig(profile, region string) error
// GetAuthenticationMethods returns the available authentication methods
GetAuthenticationMethods() []string
// GetAuthConfigKeys returns the configuration keys required for an authentication method
GetAuthConfigKeys(method string) []string
// Authenticate authenticates with the provider using the given method and configuration
Authenticate(method string, authConfig map[string]string) error
// IsAuthenticated returns whether the provider is authenticated
IsAuthenticated() bool
// GetConfigKeys returns the configuration keys required by this provider
GetConfigKeys() []string
// GetConfigOptions returns the available options for a configuration key
GetConfigOptions(key string) ([]string, error)
// Configure configures the provider with the given configuration
Configure(config map[string]string) error
// GetApprovals returns all pending approvals for the provider
GetApprovals(ctx context.Context) ([]ApprovalAction, error)
// ApproveAction approves or rejects an approval action
ApproveAction(ctx context.Context, action ApprovalAction, approved bool, comment string) error
// GetStatus returns the status of all pipelines
GetStatus(ctx context.Context) ([]PipelineStatus, error)
// StartPipeline starts a pipeline execution
StartPipeline(ctx context.Context, pipelineName string, commitID string) error
// GetCodePipelineManualApprovalOperation returns the CodePipeline manual approval operation
GetCodePipelineManualApprovalOperation() (CodePipelineManualApprovalOperation, error)
// GetPipelineStatusOperation returns the pipeline status operation
GetPipelineStatusOperation() (PipelineStatusOperation, error)
// GetStartPipelineOperation returns the start pipeline operation
GetStartPipelineOperation() (StartPipelineOperation, error)
// GetFunctionStatusOperation returns the function status operation
GetFunctionStatusOperation() (FunctionStatusOperation, error)
}
Provider interface defines methods that all cloud providers must implement
func CreateProvider ¶
func CreateProvider(registry *ProviderRegistry, name, profile, region string) (Provider, error)
CreateProvider creates a provider with the given name, profile, and region.
type ProviderRegistry ¶
type ProviderRegistry struct {
// contains filtered or unexported fields
}
Registry for all providers
func NewProviderRegistry ¶
func NewProviderRegistry() *ProviderRegistry
NewProviderRegistry creates a new provider registry
func (*ProviderRegistry) Get ¶
func (r *ProviderRegistry) Get(name string) (Provider, error)
Get returns a provider by name with an error if not found
func (*ProviderRegistry) GetProvider ¶
func (r *ProviderRegistry) GetProvider(name string) (Provider, bool)
GetProvider returns a provider by name
func (*ProviderRegistry) GetProviderNames ¶
func (r *ProviderRegistry) GetProviderNames() []string
GetProviderNames returns the names of all registered providers
func (*ProviderRegistry) List ¶
func (r *ProviderRegistry) List() []Provider
List returns all registered providers (alias for Providers)
func (*ProviderRegistry) Providers ¶
func (r *ProviderRegistry) Providers() []Provider
Providers returns all registered providers
func (*ProviderRegistry) Register ¶
func (r *ProviderRegistry) Register(provider Provider)
Register registers a provider with the registry
type Service ¶
type Service interface {
// Name returns the service's name
Name() string
// Description returns the service's description
Description() string
// Categories returns all available categories for this service
Categories() []Category
}
Service interface defines methods that all cloud services must implement
type StageStatus ¶
StageStatus represents the status of a pipeline stage
type StartPipelineOperation ¶
type StartPipelineOperation interface {
UIOperation
// StartPipelineExecution starts a pipeline execution
StartPipelineExecution(ctx context.Context, pipelineName string, commitID string) error
}
StartPipelineOperation represents an operation to start a pipeline execution
type UIOperation ¶
type UIOperation interface {
// Name returns the operation's name
Name() string
// Description returns the operation's description
Description() string
// IsUIVisible returns whether this operation should be visible in the UI
IsUIVisible() bool
}
UIOperation represents a user-facing operation in the UI