Documentation ¶
Index ¶
- Constants
- Variables
- func BuildOptions(dryrun bool) *engineapi.APIOptions
- func GetWorkDirFromSource(ctx context.Context, stack *entity.Stack, project *entity.Project) (string, string, error)
- func NewBackendFromEntity(backendEntity entity.Backend) (backend.Backend, error)
- func ProcessChanges(ctx context.Context, w http.ResponseWriter, changes *models.Changes, ...) (string, error)
- type StackManager
- func (m *StackManager) ApplyStack(ctx context.Context, id uint, workspaceName, format string, ...) (err error)
- func (m *StackManager) CreateStack(ctx context.Context, requestPayload request.CreateStackRequest) (*entity.Stack, error)
- func (m *StackManager) DeleteStackByID(ctx context.Context, id uint) error
- func (m *StackManager) DestroyStack(ctx context.Context, id uint, workspaceName string, detail, dryrun bool, ...) (err error)
- func (m *StackManager) GenerateStack(ctx context.Context, id uint, workspaceName string) (*v1.Spec, error)
- func (m *StackManager) GetStackByID(ctx context.Context, id uint) (*entity.Stack, error)
- func (m *StackManager) ListStacks(ctx context.Context) ([]*entity.Stack, error)
- func (m *StackManager) PreviewStack(ctx context.Context, id uint, workspaceName string) (*models.Changes, error)
- func (m *StackManager) UpdateStackByID(ctx context.Context, id uint, requestPayload request.UpdateStackRequest) (*entity.Stack, error)
Constants ¶
View Source
const ( Stdout = "stdout" NoDiffFound = "All resources are reconciled. No diff found" )
Variables ¶
View Source
var ( ErrGettingNonExistingStack = errors.New("the stack does not exist") ErrUpdatingNonExistingStack = errors.New("the stack to update does not exist") ErrSourceNotFound = errors.New("the specified source does not exist") ErrWorkspaceNotFound = errors.New("the specified workspace does not exist") ErrProjectNotFound = errors.New("the specified project does not exist") ErrInvalidStackID = errors.New("the stack ID should be a uuid") ErrGettingNonExistingStateForStack = errors.New("can not find State in this stack") ErrNoManagedResourceToDestroy = errors.New("no managed resources to destroy") ErrDryrunDestroy = errors.New("dryrun-mode is enabled, no resources will be destroyed") )
Functions ¶
func BuildOptions ¶
func BuildOptions(dryrun bool) *engineapi.APIOptions
func GetWorkDirFromSource ¶
func GetWorkDirFromSource(ctx context.Context, stack *entity.Stack, project *entity.Project) (string, string, error)
getWorkDirFromSource returns the workdir based on the source if the source type is local, it will return the path as an absolute path on the local filesystem if the source type is remote (git for example), it will pull the source and return the path to the pulled source
func NewBackendFromEntity ¶
Types ¶
type StackManager ¶
type StackManager struct {
// contains filtered or unexported fields
}
func NewStackManager ¶
func NewStackManager(stackRepo repository.StackRepository, projectRepo repository.ProjectRepository, workspaceRepo repository.WorkspaceRepository) *StackManager
func (*StackManager) ApplyStack ¶
func (m *StackManager) ApplyStack(ctx context.Context, id uint, workspaceName, format string, detail, dryrun bool, w http.ResponseWriter) (err error)
func (*StackManager) CreateStack ¶
func (m *StackManager) CreateStack(ctx context.Context, requestPayload request.CreateStackRequest) (*entity.Stack, error)
func (*StackManager) DeleteStackByID ¶
func (m *StackManager) DeleteStackByID(ctx context.Context, id uint) error
func (*StackManager) DestroyStack ¶
func (m *StackManager) DestroyStack(ctx context.Context, id uint, workspaceName string, detail, dryrun bool, w http.ResponseWriter) (err error)
func (*StackManager) GenerateStack ¶
func (*StackManager) GetStackByID ¶
func (*StackManager) ListStacks ¶
func (*StackManager) PreviewStack ¶
func (*StackManager) UpdateStackByID ¶
func (m *StackManager) UpdateStackByID(ctx context.Context, id uint, requestPayload request.UpdateStackRequest) (*entity.Stack, error)
Click to show internal directories.
Click to hide internal directories.