Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
BasePath string
}
func Create ¶
func Create(inPath string) (*Controller, error)
Create a new hitch db. Makes a dir; the name itself is the sigil.
func LoadByCwd ¶
func LoadByCwd() (*Controller, error)
func LoadByPath ¶
func LoadByPath(startPath string) (*Controller, error)
func (*Controller) LoadCatalog ¶
func (dbctrl *Controller) LoadCatalog(catalogName api.CatalogName) (api.Catalog, error)
Load a catalog object from the db.
This only loads the core catalog data -- names, releases, items, metadata. The replay info is *null* -- the replay info is not loaded by default, because that stuff may be much larger than many callers need; use the other db methods to ask for it explicitly.
func (*Controller) SaveCatalog ¶
func (dbctrl *Controller) SaveCatalog(catalog api.Catalog) error
Save a catalog object into the db.
If the extended fields (e.g. replay) are set, they will also be saved; if absent, those components on disk will not be modified.
type ErrorCategory ¶
type ErrorCategory string
const ( ErrNotFound ErrorCategory = "ErrNotFound" ErrIO ErrorCategory = "ErrIO" ErrStorageCorrupt ErrorCategory = "ErrStorageCorrupt" )
Click to show internal directories.
Click to hide internal directories.