Documentation
¶
Index ¶
- func NewDefaultDeployParams() []string
- func NewDefaultLaunchParams(appName string, orgSlug string) []string
- type AppConfig
- type AppDeployFailure
- type AppDeploySuccess
- type AppNode
- type Concurrency
- type DeployConfig
- type DeployResult
- type GitRef
- type HttpService
- type Mount
- type Port
- type ProjectConfig
- type ProjectNode
- type ProjectProcessingFailure
- type Service
- type SingleAppDeploySuccessType
- type Source
- type SourceType
- type SpecNode
- func (s SpecNode) Apps() []AppNode
- func (s SpecNode) Flatten() []SpecNode
- func (s SpecNode) HasAppNode() bool
- func (s SpecNode) HasProjectNode() bool
- func (s SpecNode) IsAppSyntaxValid() bool
- func (s SpecNode) IsValidApp() bool
- func (s SpecNode) Projects() []ProjectNode
- func (s SpecNode) Traverse(t func(node SpecNode) error) error
- func (s SpecNode) TraverseNoErr(t func(node SpecNode))
- type TraversalStepAnalysis
- type TraverseAppTreeOptions
- type ValidateAppConfigOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDefaultDeployParams ¶
func NewDefaultDeployParams() []string
func NewDefaultLaunchParams ¶
Types ¶
type AppConfig ¶
type AppConfig struct { App string `yaml:"app" toml:"app"` Org string `yaml:"org" toml:"org,omitempty"` PrimaryRegion string `yaml:"primary_region" toml:"primary_region,omitempty"` Source Source `yaml:"source,omitempty" toml:"source"` Services []Service `yaml:"services" toml:"services,omitempty"` HttpService HttpService `yaml:"http_service" toml:"http_service,omitempty"` // deprecated LaunchParams []string `yaml:"launch_params" toml:"launch_params,omitempty"` DeployParams []string `yaml:"deploy_params" toml:"deploy_params"` Env map[string]string `yaml:"env" toml:"env,omitempty"` Build map[string]any `yaml:"build" toml:"build,omitempty"` Mounts []Mount `yaml:"mounts" toml:"mounts,omitempty"` // fly.io only supports one mount :S }
func (*AppConfig) Validate ¶
func (a *AppConfig) Validate(options ...ValidateAppConfigOptions) error
type AppDeployFailure ¶ added in v0.0.18
type AppDeploySuccess ¶ added in v0.0.18
type AppDeploySuccess struct { Spec AppNode SuccessType SingleAppDeploySuccessType }
type AppNode ¶ added in v0.0.18
type AppNode struct { Path string AppYaml string AppConfig AppConfig AppConfigSyntaxErr error AppConfigSemErr error }
func (AppNode) IsAppSyntaxValid ¶ added in v0.0.18
func (AppNode) IsValidApp ¶ added in v0.0.18
type Concurrency ¶
type DeployConfig ¶ added in v0.0.18
type DeployConfig struct { Force bool Retries int AttemptTimeout time.Duration AbortOnFirstError bool }
func NewDeployConfig ¶ added in v0.0.18
func NewDeployConfig() DeployConfig
func (DeployConfig) WithAbortOnFirstError ¶ added in v0.0.18
func (c DeployConfig) WithAbortOnFirstError(state ...bool) DeployConfig
func (DeployConfig) WithAttemptTimeout ¶ added in v0.0.18
func (c DeployConfig) WithAttemptTimeout(timeout ...time.Duration) DeployConfig
func (DeployConfig) WithForce ¶ added in v0.0.18
func (c DeployConfig) WithForce(force ...bool) DeployConfig
func (DeployConfig) WithRetries ¶ added in v0.0.18
func (c DeployConfig) WithRetries(retries ...int) DeployConfig
type DeployResult ¶ added in v0.0.18
type DeployResult struct { SucceededApps []AppDeploySuccess FailedApps []AppDeployFailure ProcessedProjects []ProjectNode FailedProjects []ProjectProcessingFailure }
func NewEmptyDeployResult ¶ added in v0.0.18
func NewEmptyDeployResult() DeployResult
func (DeployResult) HasErrors ¶ added in v0.0.18
func (r DeployResult) HasErrors() bool
func (DeployResult) Plus ¶ added in v0.0.18
func (r DeployResult) Plus(other DeployResult) DeployResult
func (DeployResult) Success ¶ added in v0.0.18
func (r DeployResult) Success() bool
type GitRef ¶
type HttpService ¶ added in v0.0.19
type HttpService struct { InternalPort int `yaml:"internal_port" toml:"internal_port"` ForceHttps bool `yaml:"force_https" toml:"force_https"` AutoStopMachines bool `yaml:"auto_stop_machines" toml:"auto_stop_machines"` AutoStartMachines bool `yaml:"auto_start_machines" toml:"auto_start_machines"` MinMachinesRunning int `yaml:"min_machines_running" toml:"min_machines_running"` Concurrency Concurrency `yaml:"concurrency" toml:"concurrency,omitempty"` Processes []string `yaml:"processes" toml:"processes,omitempty"` }
type ProjectConfig ¶
type ProjectConfig struct { // Name Required. Name of the project Project string `yaml:"project" toml:"project"` // Source Required. Where the app configs of the project are located Source Source `yaml:"source" toml:"source"` }
func (*ProjectConfig) Validate ¶
func (cfg *ProjectConfig) Validate() error
type ProjectNode ¶ added in v0.0.18
type ProjectNode struct { Path string ProjectYaml string ProjectConfig ProjectConfig ProjectConfigSyntaxErr error ProjectConfigSemErr error }
func (ProjectNode) ErrCause ¶ added in v0.0.19
func (s ProjectNode) ErrCause() error
func (ProjectNode) IsProjectNode ¶ added in v0.0.18
func (s ProjectNode) IsProjectNode() bool
func (ProjectNode) IsProjectSyntaxValid ¶ added in v0.0.18
func (s ProjectNode) IsProjectSyntaxValid() bool
func (ProjectNode) IsValidProject ¶ added in v0.0.18
func (s ProjectNode) IsValidProject() bool
type ProjectProcessingFailure ¶ added in v0.0.18
type ProjectProcessingFailure struct { Spec ProjectNode Cause error }
type Service ¶
type Service struct { InternalPort int `yaml:"internal_port" toml:"internal_port"` Protocol string `yaml:"protocol" toml:"protocol"` ForceHttps bool `yaml:"force_https" toml:"force_https"` AutoStopMachines bool `yaml:"auto_stop_machines" toml:"auto_stop_machines"` AutoStartMachines bool `yaml:"auto_start_machines" toml:"auto_start_machines"` MinMachinesRunning int `yaml:"min_machines_running" toml:"min_machines_running"` Concurrency Concurrency `yaml:"concurrency" toml:"concurrency,omitempty"` Ports []Port `yaml:"ports" toml:"ports,omitempty"` Processes []string `yaml:"processes" toml:"processes,omitempty"` }
func NewDefaultServiceConfig ¶
func NewDefaultServiceConfig() Service
type SingleAppDeploySuccessType ¶ added in v0.0.18
type SingleAppDeploySuccessType string
const ( SingleAppDeployCreated SingleAppDeploySuccessType = "created" SingleAppDeployUpdated SingleAppDeploySuccessType = "updated" SingleAppDeployNoChange SingleAppDeploySuccessType = "no-change" )
type Source ¶
type Source struct { Repo string `yaml:"repo,omitempty" toml:"repo" json:"repo,omitempty"` Path string `yaml:"path,omitempty" toml:"path" json:"path,omitempty"` Ref GitRef `yaml:"ref,omitempty" toml:"ref" json:"ref,omitempty"` Type SourceType `yaml:"type,omitempty" toml:"type" json:"type,omitempty"` Inline string `yaml:"inline,omitempty" toml:"inline" json:"inline,omitempty"` }
func NewLocalFolderSource ¶
type SourceType ¶
type SourceType string
const ( SourceTypeGit SourceType = "git" SourceTypeLocal SourceType = "local" SourceTypeDocker SourceType = "docker" SourceTypeInlineDockerFile SourceType = "inline-docker-file" )
type SpecNode ¶ added in v0.0.18
type SpecNode struct { Path string App *AppNode Project *ProjectNode Children []SpecNode }
func (SpecNode) HasAppNode ¶ added in v0.0.21
func (SpecNode) HasProjectNode ¶ added in v0.0.21
func (SpecNode) IsAppSyntaxValid ¶ added in v0.0.18
func (SpecNode) IsValidApp ¶ added in v0.0.18
func (SpecNode) Projects ¶ added in v0.0.18
func (s SpecNode) Projects() []ProjectNode
func (SpecNode) TraverseNoErr ¶ added in v0.0.18
type TraversalStepAnalysis ¶ added in v0.0.18
type TraverseAppTreeOptions ¶ added in v0.0.22
type TraverseAppTreeOptions struct { ValidAppCb func(AppNode) error InvalidAppCb func(AppNode) error SkippedAppCb func(AppNode) error BeginProjectCb func(ProjectNode) error EndProjectCb func(ProjectNode) error SkippedProjectCb func(ProjectNode) error }
type ValidateAppConfigOptions ¶
type ValidateAppConfigOptions struct {
ValidateSource bool
}
func NewValidateAppConfigOptions ¶
func NewValidateAppConfigOptions() ValidateAppConfigOptions
func (ValidateAppConfigOptions) WithValidateSource ¶
func (opts ValidateAppConfigOptions) WithValidateSource(validateSource ...bool) ValidateAppConfigOptions
Click to show internal directories.
Click to hide internal directories.