Documentation
¶
Overview ¶
Package config handles the interactions with C3PM's various configuration files. It handles interaction with both the c3pm.yml file (see package manifest), and the storage of authentication tokens in the global C3PM directory as found by GlobalC3PMDirPath.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthFilePath ¶
func AuthFilePath() string
AuthFilePath returns the path to the global auth file.
func GlobalC3PMDirPath ¶ added in v0.1.0
func GlobalC3PMDirPath() string
GlobalC3PMDirPath finds the path to the global C3PM directory.
func LibCachePath ¶
LibCachePath returns the path to the global C3PM cache
func TokenStrict ¶
TokenStrict gets the authentication token from the auth file.
Types ¶
type ProjectConfig ¶
type ProjectConfig struct { //Manifest is the representation of the contents of the c3pm.yml file. Manifest manifest.Manifest //ProjectRoot stores the absolute path to the C3PM project. ProjectRoot string }
ProjectConfig represents the configuration of a C3PM project.
func Load ¶
func Load(projectPath string) (*ProjectConfig, error)
Load takes the path of a project and creates the ProjectConfig object that represents the configuration of this project.
func (*ProjectConfig) LocalC3PMDirPath ¶ added in v0.1.0
func (pc *ProjectConfig) LocalC3PMDirPath() string
LocalC3PMDirPath returns the path to the local C3PM directory.
func (*ProjectConfig) Save ¶
func (pc *ProjectConfig) Save() error
Save writes the current configuration and writes it to the project directory.