Documentation
¶
Index ¶
- Constants
- func Generate(teamName string, spaceName string, spaceDNSLabel string, ...) error
- type CommandCronjobDef
- type CronjobDef
- type CronjobDefList
- type ErrSpacefileNotFound
- type SoftwareDef
- type SoftwareDefList
- type SpaceDef
- type Spacefile
- type StageDef
- type SyntaxError
- type TLSVirtualHostDef
- type VirtualHostDef
- type VirtualHostDefList
Constants ¶
View Source
const DefaultFilename = ".spacefile.hcl"
View Source
const SpacefileTemplate = `` /* 1388-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CommandCronjobDef ¶ added in v1.1.0
type CronjobDef ¶ added in v1.1.0
type CronjobDef struct {
Identifier string `hcl:",key"`
Schedule string `hcl:"schedule"`
AllowParallel bool `hcl:"allowParallel"`
Command *CommandCronjobDef `hcl:"command"`
Timezone string `hcl:"timezone"`
}
func (CronjobDef) ToDeclaration ¶ added in v1.1.0
func (c CronjobDef) ToDeclaration() spaces.Cronjob
type CronjobDefList ¶ added in v1.1.0
type CronjobDefList []CronjobDef
type ErrSpacefileNotFound ¶
type ErrSpacefileNotFound struct {
Path string
}
func (ErrSpacefileNotFound) Error ¶
func (n ErrSpacefileNotFound) Error() string
type SoftwareDef ¶
type SoftwareDef struct {
Identifier string `hcl:",key"`
Version string `hcl:"version"`
UserData interface{} `hcl:"userData"`
}
func (SoftwareDef) Validate ¶ added in v1.6.0
func (s SoftwareDef) Validate(offline bool) error
Validate performs (optional) online validation of software version and name
type SoftwareDefList ¶ added in v1.1.0
type SoftwareDefList []SoftwareDef
func (SoftwareDefList) Merge ¶ added in v1.1.0
func (l SoftwareDefList) Merge(other SoftwareDefList) (SoftwareDefList, error)
type SpaceDef ¶
type SpaceDef struct {
DNSLabel string `hcl:",key"`
Name string `hcl:"name"`
TeamID string `hcl:"team"`
Plan string `hcl:"plan"`
Stages []StageDef `hcl:"stage"`
// contains filtered or unexported fields
}
func (*SpaceDef) GetStageByName ¶ added in v1.7.0
func (*SpaceDef) ToSpaceDeclaration ¶
func (s *SpaceDef) ToSpaceDeclaration() (*spaces.SpaceDeclaration, error)
ToSpaceDeclaration converts the SpaceDef object used in the Spacefile to a SpaceDeclaration used for the Spaces API calls
type StageDef ¶
type StageDef struct {
Name string `hcl:",key"`
Inherit string `hcl:"inherit"`
Applications SoftwareDefList `hcl:"application"`
Databases SoftwareDefList `hcl:"database"`
Cronjobs CronjobDefList `hcl:"cron"`
VirtualHosts VirtualHostDefList `hcl:"virtualHost"`
// contains filtered or unexported fields
}
func (*StageDef) Application ¶ added in v1.1.0
func (d *StageDef) Application() *SoftwareDef
Application returns a reference to the one application defined for this stage
type SyntaxError ¶
func (SyntaxError) Error ¶
func (s SyntaxError) Error() string
type TLSVirtualHostDef ¶ added in v1.7.0
type VirtualHostDef ¶ added in v1.7.0
type VirtualHostDef struct {
Hostname string `hcl:",key"`
TLS *TLSVirtualHostDef `hcl:"tls"`
}
func (VirtualHostDef) ToDeclaration ¶ added in v1.7.0
func (v VirtualHostDef) ToDeclaration() spaces.VirtualHost
type VirtualHostDefList ¶ added in v1.7.0
type VirtualHostDefList []VirtualHostDef
Click to show internal directories.
Click to hide internal directories.