Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //ErrFailedOpen is when the template failed building ErrFailedOpen = errors.NewError("could not open the config file", 1) //ErrFailedParse is for a failure moving the static folder ErrFailedParse = errors.NewError("could not parse the config file", 2) //ErrFailedWrite is for a failure in gathering files. ErrFailedWrite = errors.NewError("could not write the config file", 3) //ErrNoTemplateFolder is for a failure in gathering files. ErrNoTemplateFolder = errors.NewError("template folder not set", 4) //ErrNoOutputFolder is for a failure in gathering files. ErrNoOutputFolder = errors.NewError("output folder not set", 5) //ErrFailedCreateLog is for a failure in gathering files. ErrFailedCreateLog = errors.NewError("could not open log file", 6) //ErrDependencyWrongFormat means a wrong format for a dependency ErrDependencyWrongFormat = errors.NewError("dependency must be in the format 'json' or 'json@1.0.0'", 101) )
Functions ¶
func LoadDefaultGlobal ¶ added in v0.13.0
func LoadDefaultGlobal() error
LoadDefaultGlobal config file
func SaveConfig ¶
SaveConfig saves the config file
func SaveDefaultGlobal ¶ added in v0.13.0
func SaveDefaultGlobal() error
SaveDefaultGlobal config file
Types ¶
type Config ¶
type Config struct { LogConfig log `json:"logging"` Folders Folder `json:"folders"` Modules Modules `json:"modules"` Pages *site.ConfigSite `json:"pages"` ModuleHost map[string]*host.ModuleHost `json:"-"` UILogger UIlogger `json:"-"` }
Config is the config struct
func CleanConfig ¶ added in v0.7.0
CleanConfig does everything for you
type Folder ¶
type Folder struct { Templates string `json:"templates"` Static string `json:"static"` Output string `json:"output"` Modules string `json:"modules"` }
Folder is the part of the config file that handles folders
type GlobalConfig ¶ added in v0.13.0
type GlobalConfig struct {
Repositories []string `json:"repositories"`
}
GlobalConfig is a global antibuild configuration
var DefaultGlobalConfig *GlobalConfig
DefaultGlobalConfig that gets auto opened
func OpenGlobalConfig ¶ added in v0.13.0
func OpenGlobalConfig(path string) (*GlobalConfig, error)
OpenGlobalConfig opens and parses a global config file
func (*GlobalConfig) Save ¶ added in v0.13.0
func (c *GlobalConfig) Save(path string) error
Save the global config
type Logger ¶ added in v0.6.0
type Logger interface { Info(string) Infof(string, ...interface{}) Error(string) Errorf(string, ...interface{}) Fatal(string) Fatalf(string, ...interface{}) Debug(string) Debugf(string, ...interface{}) ShouldEnableDebug(bool) }
Logger is the logger we use
type Module ¶ added in v0.13.0
Module with info about the path and version
func ParseModuleString ¶ added in v0.13.0
ParseModuleString for config and cli
func (*Module) MarshalJSON ¶ added in v0.13.0
MarshalJSON on a module
func (*Module) UnmarshalJSON ¶ added in v0.13.0
UnmarshalJSON on a module
Click to show internal directories.
Click to hide internal directories.