Documentation
¶
Index ¶
- Variables
- type Store
- func (s *Store) DeleteNar(ctx context.Context, narURL nar.URL) error
- func (s *Store) DeleteNarInfo(ctx context.Context, hash string) error
- func (s *Store) DeleteSecretKey(ctx context.Context) error
- func (s *Store) GetNar(ctx context.Context, narURL nar.URL) (int64, io.ReadCloser, error)
- func (s *Store) GetNarInfo(ctx context.Context, hash string) (*narinfo.NarInfo, error)
- func (s *Store) GetSecretKey(ctx context.Context) (signature.SecretKey, error)
- func (s *Store) HasNar(ctx context.Context, narURL nar.URL) bool
- func (s *Store) HasNarInfo(ctx context.Context, hash string) bool
- func (s *Store) PutNar(ctx context.Context, narURL nar.URL, body io.Reader) (int64, error)
- func (s *Store) PutNarInfo(ctx context.Context, hash string, narInfo *narinfo.NarInfo) error
- func (s *Store) PutSecretKey(ctx context.Context, sk signature.SecretKey) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrPathMustBeAbsolute is returned if the given path to New was not absolute. ErrPathMustBeAbsolute = errors.New("path must be absolute") // ErrPathMustExist is returned if the given path to New did not exist. ErrPathMustExist = errors.New("path must exist") // ErrPathMustBeADirectory is returned if the given path to New is not a directory. ErrPathMustBeADirectory = errors.New("path must be a directory") // ErrPathMustBeWritable is returned if the given path to New is not writable. ErrPathMustBeWritable = errors.New("path must be writable") )
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store represents a local store and implements storage.Store.
func (*Store) DeleteNarInfo ¶
DeleteNarInfo deletes the narinfo from the store.
func (*Store) DeleteSecretKey ¶
DeleteSecretKey deletes the secret key in the store.
func (*Store) GetNar ¶
GetNar returns nar from the store. NOTE: The caller must close the returned io.ReadCloser!
func (*Store) GetNarInfo ¶
GetNarInfo returns narinfo from the store.
func (*Store) GetSecretKey ¶
GetSecretKey returns secret key from the store.
func (*Store) HasNarInfo ¶
HasNarInfo returns true if the store has the narinfo.
func (*Store) PutNarInfo ¶
PutNarInfo puts the narinfo in the store.
Click to show internal directories.
Click to hide internal directories.