Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileJSONStore ¶
type FileJSONStore struct {
// contains filtered or unexported fields
}
FileJSONStore represents a local metadata cache relying on raw JSON files as retrieved from the remote repository.
func NewFileJSONStore ¶
func NewFileJSONStore(baseDir string) (*FileJSONStore, error)
NewFileJSONStore returns a new metadata cache, implemented using raw JSON files, stored in a directory provided by the client. If the provided directory does not exist on disk, it will be created. The provided metadata cache is safe for concurrent access.
func (*FileJSONStore) Close ¶
func (f *FileJSONStore) Close() error
Close closes the metadata cache. This is a no-op.
func (*FileJSONStore) DeleteMeta ¶
func (f *FileJSONStore) DeleteMeta(name string) error
DeleteMeta deletes a metadata file from the cache. If the file does not exist, an *os.PathError is returned.
func (*FileJSONStore) GetMeta ¶
func (f *FileJSONStore) GetMeta() (map[string]json.RawMessage, error)
GetMeta returns the currently cached set of metadata files.
func (*FileJSONStore) SetMeta ¶
func (f *FileJSONStore) SetMeta(name string, meta json.RawMessage) error
SetMeta stores a metadata file in the cache. If the metadata file exist, it will be overwritten.