Documentation
¶
Index ¶
- Variables
- func ExistsApp(ctx context.Context, name string) (bool, error)
- func GetDeployedAppConfig(ctx context.Context, name string) (model.AppConfig, error)
- func HandleGithubWebhook(payload github.PushWebhookPayload, path string) error
- func TraverseDeepAppTree(ctx context.Context, path string, opts TraverseAppTreeOptions) error
- type AppDeployFailure
- type AppDeploySuccess
- type AppNode
- type DeployConfig
- type DeployResult
- type FetchedProject
- type ProjectNode
- type ProjectProcessingFailure
- type SingleAppDeploySuccessType
- type SpecNode
- func (s SpecNode) Apps(followProjects ...bool) ([]AppNode, error)
- func (s SpecNode) Flatten() ([]SpecNode, error)
- func (s SpecNode) IsAppNode() bool
- func (s SpecNode) IsAppSyntaxValid() bool
- func (s SpecNode) IsProjectNode() bool
- func (s SpecNode) IsValidApp() bool
- func (s SpecNode) Projects() ([]ProjectNode, error)
- func (s SpecNode) Traverse(t func(node SpecNode) error) error
- type TraversalStepAnalysis
- type TraverseAppTreeOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var SkippedAbortedEarlier = fmt.Errorf("skipped: job aborted earlier")
View Source
var SkippedNotValid = fmt.Errorf("skipped: not a valid app")
Functions ¶
func GetDeployedAppConfig ¶
func HandleGithubWebhook ¶
func HandleGithubWebhook(payload github.PushWebhookPayload, path string) error
func TraverseDeepAppTree ¶ added in v0.0.17
func TraverseDeepAppTree( ctx context.Context, path string, opts TraverseAppTreeOptions, ) error
Types ¶
type AppDeployFailure ¶ added in v0.0.15
type AppDeploySuccess ¶ added in v0.0.15
type AppDeploySuccess struct { Spec AppNode SuccessType SingleAppDeploySuccessType }
type AppNode ¶ added in v0.0.15
type AppNode struct { Path string AppYaml string AppConfig model.AppConfig AppConfigSyntaxErr error AppConfigSemErr error }
func (AppNode) IsAppSyntaxValid ¶ added in v0.0.15
func (AppNode) IsValidApp ¶ added in v0.0.15
type DeployConfig ¶
type DeployConfig struct { Force bool Retries int AttemptTimeout time.Duration AbortOnFirstError bool }
func NewDeployConfig ¶
func NewDeployConfig() DeployConfig
func (DeployConfig) WithAbortOnFirstError ¶
func (c DeployConfig) WithAbortOnFirstError(state ...bool) DeployConfig
func (DeployConfig) WithAttemptTimeout ¶
func (c DeployConfig) WithAttemptTimeout(timeout ...time.Duration) DeployConfig
func (DeployConfig) WithForce ¶
func (c DeployConfig) WithForce(force ...bool) DeployConfig
func (DeployConfig) WithRetries ¶
func (c DeployConfig) WithRetries(retries ...int) DeployConfig
type DeployResult ¶
type DeployResult struct { SucceededApps []AppDeploySuccess FailedApps []AppDeployFailure ProcessedProjects []ProjectNode FailedProjects []ProjectProcessingFailure }
func DeployAll ¶
func DeployAll( ctx context.Context, path string, deployCfg DeployConfig, ) (DeployResult, error)
func NewEmptyDeployResult ¶ added in v0.0.17
func NewEmptyDeployResult() DeployResult
func (DeployResult) HasErrors ¶ added in v0.0.15
func (r DeployResult) HasErrors() bool
func (DeployResult) Plus ¶ added in v0.0.15
func (r DeployResult) Plus(other DeployResult) DeployResult
func (DeployResult) Success ¶
func (r DeployResult) Success() bool
type FetchedProject ¶ added in v0.0.15
type FetchedProject struct { ProjectConfig model.ProjectConfig WorkDir util_work_dir.WorkDir IsTempDir bool }
type ProjectNode ¶ added in v0.0.15
type ProjectNode struct { Path string ProjectYaml string ProjectConfig model.ProjectConfig ProjectConfigSyntaxErr error ProjectConfigSemErr error }
func (ProjectNode) IsProjectNode ¶ added in v0.0.15
func (s ProjectNode) IsProjectNode() bool
func (ProjectNode) IsProjectSyntaxValid ¶ added in v0.0.15
func (s ProjectNode) IsProjectSyntaxValid() bool
func (ProjectNode) IsValidProject ¶ added in v0.0.15
func (s ProjectNode) IsValidProject() bool
type ProjectProcessingFailure ¶ added in v0.0.17
type ProjectProcessingFailure struct { Spec ProjectNode Cause error }
type SingleAppDeploySuccessType ¶ added in v0.0.15
type SingleAppDeploySuccessType string
const ( SingleAppDeployCreated SingleAppDeploySuccessType = "created" SingleAppDeployUpdated SingleAppDeploySuccessType = "updated" SingleAppDeployNoChange SingleAppDeploySuccessType = "no-change" )
func DeployAppFromInlineConfig ¶
func DeployAppFromInlineConfig(ctx context.Context, deployCfg DeployConfig, cfg model.AppConfig) (SingleAppDeploySuccessType, error)
func DeploySingleAppFromFolder ¶
func DeploySingleAppFromFolder(ctx context.Context, path string, deployCfg DeployConfig) (SingleAppDeploySuccessType, error)
type SpecNode ¶
type SpecNode struct { Path string App *AppNode Project *ProjectNode Children []SpecNode }
func (SpecNode) IsAppSyntaxValid ¶
func (SpecNode) IsProjectNode ¶ added in v0.0.15
func (SpecNode) IsValidApp ¶
func (SpecNode) Projects ¶ added in v0.0.15
func (s SpecNode) Projects() ([]ProjectNode, error)
type TraversalStepAnalysis ¶
type TraverseAppTreeOptions ¶ added in v0.0.17
type TraverseAppTreeOptions struct { ValidAppCb func(AppNode) error InvalidAppCb func(AppNode) error ValidProjectCb func(ProjectNode) error InvalidProjectCb func(ProjectNode) error }
Click to show internal directories.
Click to hide internal directories.