Documentation ¶
Overview ¶
Package app provides functionality for application configurations.
Index ¶
Constants ¶
View Source
const ( // ErrNoSuchConfig indicates that an application configuration was not found in the store. ErrNoSuchConfig = wErr.ErrString("no such configuration") // ErrEmptyName indicates that an application name is empty. ErrEmptyName = wErr.ErrString("application name is empty") // ErrPathNotRelative indicates that an application path is not relative. ErrPathNotRelative = wErr.ErrString("path is not relative") // ErrNonProjectRootSubDir indicates that an application path is not a subdirectory of the project root directory. ErrNonProjectRootSubDir = wErr.ErrString("path is not a subdirectory of the project root directory") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // BaseOutputDir is the base output directory for an application. BaseOutputDir string // DisplayName is the display name of an application. DisplayName string // Name is the name of an application. Name string // PathRel is the relative path to an application root directory. PathRel string // PkgImportPath is the import path of an application package. PkgImportPath string }
Config holds information and metadata of an application.
type ErrApp ¶
ErrApp represents a application error.
type Store ¶
type Store interface { // Add adds a application configuration. Add(*Config) // Get returns the application configuration for the given name or nil along with an error when not stored. Get(string) (*Config, error) }
Store is a storage that provides methods to record application configurations.
Click to show internal directories.
Click to hide internal directories.