Documentation
¶
Index ¶
- Constants
- func GroupByService(files map[string]File) map[string]map[string]File
- func GroupByServiceSlice(files map[string]File) map[string][]File
- func Save(file string, c Catalog) error
- type ByPath
- type Catalog
- type File
- func (f *File) AddTag(tag string)
- func (f *File) LookupState(context string) (State, error)
- func (f *File) Matches(filter Filter) bool
- func (f *File) RecordState(context string) error
- func (f *File) RemoveTag(tag string)
- func (f File) ToServiceModel(context, key string, remote service.IService, data []byte) (service.File, error)
- type Filter
- type InitDep
- type State
Constants ¶
View Source
const DefaultName = "stash.yml"
DefaultName is the default catalog name.
Variables ¶
This section is empty.
Functions ¶
func GroupByService ¶
GroupByService ...
func GroupByServiceSlice ¶
GroupByServiceSlice ...
Types ¶
type Catalog ¶
type Catalog struct { Version string `yaml:"version"` Context string `yaml:"context"` AutoClean bool `yaml:"clean" mapstructure:"clean"` Files map[string]File `yaml:"files"` }
Catalog is reference file for the stashed configuration files.
func (*Catalog) LookupService ¶
func (*Catalog) MergeResults ¶
MergeResults ...
type File ¶
type File struct { // Path is the local location. Path string `yaml:"path"` // Type is the local file type. (e.g. env,json,txt,etc.) Type string `yaml:"type,omitempty"` // Service specifies the remote service. Service string `yaml:"service,omitempty"` // Options allow services to persist user preferences locally. Options map[string]string `yaml:"opt,omitempty" mapstructure:"opt"` // Keys allows services to track which fields are stashed. Keys []string `yaml:"keys,omitempty"` // Tags allow files to be grouped; so, they can be listed, purged, // and restored in a single command. Tags []string `yaml:"tags,omitempty"` // Clean deletes the local files after changes have been pushed // to the remote service. Clean bool `yaml:"clean,omitempty"` }
File represents a configuration file that is remotely stashed. All fields in this model should be safe to be shared and checked into source control.
func (*File) LookupState ¶
LookupState ...
Click to show internal directories.
Click to hide internal directories.