Documentation
¶
Index ¶
- Constants
- func BaseDir() string
- func LinkManPages() []error
- func ManDir() string
- func NewCoreManifest() (*model.Manifest, error)
- func NewManifest(name string) *model.Manifest
- func Parse(path string) (*model.Manifest, error)
- func SaveManifest(manifest *model.Manifest, backup bool) error
- func SaveSpaceport(s *model.Spaceport) error
- func SetVersion(v *version.Info)
- func UnlinkManPages() []error
- func WriteCompletion(sh, s string) error
- type Config
- func (c *Config) DeleteManifest(name string) error
- func (c *Config) Exists() bool
- func (c *Config) Get(key string) string
- func (c *Config) Save() error
- func (c *Config) Set(key, value string) error
- func (c *Config) Spaceport() *model.Spaceport
- func (c *Config) Sync(force, keep bool, sources []string) ([]*model.Manifest, error)
Constants ¶
const ( SystemPrefixDir = "/usr/local" DefaultBaseDir = "~/.nostromo" DefaultConfigFile = "%s.yaml" DefaultManifestsDir = "ships" DefaultBackupsDir = "cargo" DefaultDownloadsDir = "downloads" DefaultCompletionsDir = "completions" DefaultManDir = "man" )
Path for standard nostromo config
const (
FileURLScheme = "file://"
)
URL scheme constants
Variables ¶
This section is empty.
Functions ¶
func BaseDir ¶ added in v0.9.0
func BaseDir() string
BaseDir returns the base directory for nostromo files
func LinkManPages ¶ added in v0.10.0
func LinkManPages() []error
LinkManPages creates a symlink for man pages
func NewCoreManifest ¶ added in v0.9.0
NewCoreManifest creates a new core manifest
func NewManifest ¶ added in v0.9.1
NewManifest creates a new manifest with provided name
func SaveManifest ¶ added in v0.9.1
SaveManifest to nostromo config folder and backup optionally
func SaveSpaceport ¶ added in v0.9.1
SaveSpaceport to nostromo config folder
func SetVersion ¶ added in v0.8.0
SetVersion should be called before any task to ensure manifest is updated
func UnlinkManPages ¶ added in v0.10.0
func UnlinkManPages() []error
UnlinkManPages from system man dir
func WriteCompletion ¶ added in v0.9.0
WriteCompletion writes a file to the completions folder
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config manages working with nostromo configuration files The file format is YAML this just provides convenience around converting to a manifest
func LoadConfig ¶ added in v0.9.0
func (*Config) DeleteManifest ¶ added in v0.9.2
DeleteManifest from nostromo manfiests folder