Documentation
¶
Index ¶
- Variables
- func Example()
- func ExampleMinIO()
- 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) (*narinfopkg.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) HasNarinfoDir(ctx context.Context) (bool, error)
- 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 *narinfopkg.NarInfo) error
- func (s *Store) PutSecretKey(ctx context.Context, sk signature.SecretKey) error
- func (s *Store) WalkNarInfos(ctx context.Context, fn func(hash string) error) error
- func (s *Store) WalkNars(ctx context.Context, fn func(narURL nar.URL) error) error
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalidConfig is returned if the S3 configuration is invalid. ErrInvalidConfig = errors.New("invalid S3 configuration") // ErrBucketNotFound is returned if the specified bucket does not exist. ErrBucketNotFound = errors.New("bucket not found") // ErrS3EndpointMissingScheme is returned if the S3 endpoint does not include a scheme. ErrS3EndpointMissingScheme = errors.New("S3 endpoint must include scheme (http:// or https://)") )
Functions ¶
func Example ¶
func Example()
Example demonstrates how to use the S3 storage implementation with AWS S3.
func ExampleMinIO ¶
func ExampleMinIO()
ExampleMinIO demonstrates how to use the S3 storage with MinIO.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store represents an S3 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) HasNarinfoDir ¶ added in v0.9.1
HasNarinfoDir checks if any objects exist under the given prefix.
func (*Store) PutNarInfo ¶
PutNarInfo puts the narinfo in the store.
func (*Store) PutSecretKey ¶
PutSecretKey stores the secret key in the store.
func (*Store) WalkNarInfos ¶ added in v0.8.0
WalkNarInfos walks all narinfos in the store and calls fn for each one.