Documentation ¶
Overview ¶
Package cfg provides configuration structs and types
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetProperty ¶ added in v0.5.0
SetProperty takes a struct pointer and searches for its "toml" tag with a search key and set property value with the tag
Types ¶
type Build ¶ added in v0.6.0
type Build struct { Type BuildType `toml:"type"` BuildFilePath string `toml:"buildfile"` IntermediaryContainers []string `toml:"intermediary_containers"` }
Build denotes build configuration
type BuildType ¶ added in v0.6.0
type BuildType string
BuildType represents supported build types
func AsBuildType ¶ added in v0.6.0
AsBuildType casts given string as a BuildType, or returns an error
type Daemon ¶ added in v0.6.0
type Daemon struct { Port string `toml:"port"` Token string `toml:"token"` User string `toml:"user,omitempty"` WebHookSecret string `toml:"webhook-secret"` VerifySSL bool `toml:"verify-ssl"` }
Daemon contains parameters for the Daemon
type Notifiers ¶ added in v0.6.0
type Notifiers struct {
SlackNotificationURL string `toml:"slack_notification_url"`
}
Notifiers defines options for notifications on a profile
type Profile ¶ added in v0.6.0
type Profile struct { Name string `toml:"name"` Branch string `toml:"branch"` Build *Build `toml:"build"` Notifiers *Notifiers `toml:"notifiers"` }
Profile denotes a deployment configuration
func (*Profile) Identifier ¶ added in v0.6.0
Identifier implements identity.Identifier
type Project ¶ added in v0.6.0
type Project struct { // InertiaMinVersion declares a minimum inertia version InertiaMinVersion string `toml:"version"` Name string `toml:"name"` URL string `toml:"url"` // Profiles tracks configured project profiles. It is a list instead of a map // to better align with TOML best practices Profiles []*Profile `toml:"profile"` }
Project represents the current project's configuration.
func NewProject ¶ added in v0.6.0
NewProject sets up Inertia configuration with given properties
func (*Project) GetProfile ¶ added in v0.6.0
GetProfile retrieves the named profile
func (*Project) RemoveProfile ¶ added in v0.6.0
RemoveProfile removes a configured profile
func (*Project) SetProfile ¶ added in v0.6.0
SetProfile assigns a profile to project configuration
type Remote ¶ added in v0.6.0
type Remote struct { Version string `toml:"version"` Name string `toml:"name"` IP string `toml:"ip"` SSH *SSH `toml:"ssh"` Daemon *Daemon `toml:"daemon"` Profiles map[string]string `toml:"profiles"` }
Remote contains parameters for the VPS
func (*Remote) ApplyProfile ¶ added in v0.6.0
ApplyProfile associates the given profile name with the given project and saves it in Profiles
func (*Remote) DaemonAddr ¶ added in v0.6.0
DaemonAddr creates the IP:Port string for making requests to the Daemon
func (*Remote) GetProfile ¶ added in v0.6.0
GetProfile retrieves the configured profile for the named project. If no profile is found, `default` is returned
func (*Remote) Identifier ¶ added in v0.6.0
Identifier implements identity.Identifier
type Remotes ¶ added in v0.6.0
type Remotes struct { // Remotes tracks globally configured remotes. It is a list instead of a map // to better align with TOML best practices Remotes []*Remote `toml:"remote"` }
Remotes denotes global Inertia configuration
func NewRemotesConfig ¶ added in v0.6.0
func NewRemotesConfig() *Remotes
NewRemotesConfig instantiates a new Inertia configuration
func (*Remotes) RemoveRemote ¶ added in v0.6.0
RemoveRemote removes remote with given name