Documentation ¶
Index ¶
- func FormatKey(filePath string) string
- func GroupByStore(files map[string]File) map[string]map[string]File
- func GroupByStoreSlice(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) CatalogKey() string
- func (f *File) ClearState(context string) error
- 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) ToStoreModel(context, key string, remote store.IStore, data []byte) (store.File, error)
- type Filter
- type InitDep
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GroupByStore ¶
GroupByStore ...
func GroupByStoreSlice ¶
GroupByStoreSlice ...
Types ¶
type Catalog ¶
type Catalog struct { Version string `yaml:"version"` Context string `yaml:"context"` Files map[string]File `yaml:"files"` }
Catalog is reference file for the remotely stored configuration files.
func (*Catalog) LookupStore ¶
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"` // Store is the remote location. Store string `yaml:"store,omitempty"` // Options allow stores to persist user preferences locally. Options map[string]string `yaml:"opt,omitempty" mapstructure:"opt"` // Keys allows stores to track which fields are stored remotely. 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 store. Clean bool `yaml:"clean,omitempty"` }
File represents a configuration file that is remotely stored. All fields in this model should be safe to be shared and checked into source control.
func (*File) LookupState ¶
LookupState ...
type Filter ¶
Filter ...
func NewPullFilter ¶
NewPullFilter ...
func NewPushFilter ¶
NewPushFilter ...
Click to show internal directories.
Click to hide internal directories.