Documentation ¶
Index ¶
- func ExistsKeystoneFile(wd string) bool
- type CiService
- type EnvKey
- type FileKey
- type KeystoneFile
- func (file *KeystoneFile) AddCiService(ciService CiService) *KeystoneFile
- func (file *KeystoneFile) AddFile(filekey FileKey) *KeystoneFile
- func (file *KeystoneFile) Err() error
- func (file *KeystoneFile) GetCiService(serviceName string) CiService
- func (file *KeystoneFile) HasEnv(varname string) (hasIt bool, strict bool)
- func (file *KeystoneFile) Load(wd string) *KeystoneFile
- func (file *KeystoneFile) Remove() *KeystoneFile
- func (file *KeystoneFile) RemoveCiService(serviceName string) *KeystoneFile
- func (file *KeystoneFile) RemoveFile(filepath string) *KeystoneFile
- func (file *KeystoneFile) Save() *KeystoneFile
- func (file *KeystoneFile) SetEnv(varname string, strict bool) *KeystoneFile
- func (file *KeystoneFile) SetFileRequired(filepath string, required bool) *KeystoneFile
- func (file *KeystoneFile) UnsetEnv(varname string) *KeystoneFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExistsKeystoneFile ¶
Checks if current execution context contains a keystone.yaml
Types ¶
type KeystoneFile ¶
type KeystoneFile struct { Path string `yaml:"-"` ProjectId string `yaml:"project_id"` ProjectName string `yaml:"name"` Env []EnvKey Files []FileKey Options keystoneFileOptions CiServices []CiService `yaml:"ci_services"` // contains filtered or unexported fields }
Represents the contents of the keystone.yaml file
func LoadKeystoneFile ¶
func LoadKeystoneFile(wd string) *KeystoneFile
func NewKeystoneFile ¶
func NewKeystoneFile(wd string, project models.Project) *KeystoneFile
NewKeystoneFile function returns a new instance of a KeyatoneFile
func (*KeystoneFile) AddCiService ¶
func (file *KeystoneFile) AddCiService(ciService CiService) *KeystoneFile
AddCiService method adds a CI service to the keystone file
func (*KeystoneFile) AddFile ¶
func (file *KeystoneFile) AddFile(filekey FileKey) *KeystoneFile
AddFile method adds a tracked file to the keystone file
func (*KeystoneFile) Err ¶
func (file *KeystoneFile) Err() error
Accessor for the KeystoneFile's err field use for error management
func (*KeystoneFile) GetCiService ¶
func (file *KeystoneFile) GetCiService(serviceName string) CiService
GetCiService method returns the CI service named `serviceName`
func (*KeystoneFile) HasEnv ¶
func (file *KeystoneFile) HasEnv(varname string) (hasIt bool, strict bool)
HasEnv method returns true the environment variable `varname` exists in the keystone file
func (*KeystoneFile) Load ¶
func (file *KeystoneFile) Load(wd string) *KeystoneFile
Loads a Keystone from disk
func (*KeystoneFile) Remove ¶
func (file *KeystoneFile) Remove() *KeystoneFile
Removes the keystone file from disk
func (*KeystoneFile) RemoveCiService ¶
func (file *KeystoneFile) RemoveCiService(serviceName string) *KeystoneFile
RemoveCiService method removes a CI service from the keystone file
func (*KeystoneFile) RemoveFile ¶
func (file *KeystoneFile) RemoveFile(filepath string) *KeystoneFile
RemoveFile method removes a file from the keysotne file
func (*KeystoneFile) Save ¶
func (file *KeystoneFile) Save() *KeystoneFile
Writes the Keystone File to disk
func (*KeystoneFile) SetEnv ¶
func (file *KeystoneFile) SetEnv(varname string, strict bool) *KeystoneFile
Adds a variable to the project set strict to true if you want to throw an error when it is missing
func (*KeystoneFile) SetFileRequired ¶
func (file *KeystoneFile) SetFileRequired( filepath string, required bool, ) *KeystoneFile
SetFileRequired method marks a file a required in the keystone file
func (*KeystoneFile) UnsetEnv ¶
func (file *KeystoneFile) UnsetEnv(varname string) *KeystoneFile
Removes a variable from the project