azureblob

package
v0.14.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2024 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

Storage implements (github.com/gomods/athens/pkg/storage).Saver and also provides a function to fetch the location of a module.

func New

func New(conf *config.AzureBlobConfig, timeout time.Duration) (*Storage, error)

New creates a new azure blobs storage.

func (*Storage) Catalog added in v0.6.0

func (s *Storage) Catalog(ctx context.Context, token string, pageSize int) ([]paths.AllPathParams, string, error)

Catalog implements the (./pkg/storage).Catalog interface. It returns a list of versions, if any, for a given module.

func (*Storage) Delete

func (s *Storage) Delete(ctx context.Context, module, version string) error

Delete implements the (./pkg/storage).Deleter interface and removes a version of a module from storage. Returning ErrNotFound if the version does not exist.

func (*Storage) Exists

func (s *Storage) Exists(ctx context.Context, module, version string) (bool, error)

Exists implements the (./pkg/storage).Checker interface returning true if the module at version exists in storage.

func (*Storage) GoMod

func (s *Storage) GoMod(ctx context.Context, module, version string) ([]byte, error)

GoMod implements the (./pkg/storage).Getter interface.

func (*Storage) Info

func (s *Storage) Info(ctx context.Context, module, version string) ([]byte, error)

Info implements the (./pkg/storage).Getter interface.

func (*Storage) List

func (s *Storage) List(ctx context.Context, module string) ([]string, error)

List implements the (./pkg/storage).Lister interface. It returns a list of versions, if any, for a given module.

func (*Storage) Save

func (s *Storage) Save(ctx context.Context, module, version string, mod []byte, zip io.Reader, info []byte) error

Save implements the (./pkg/storage).Saver interface.

func (*Storage) Zip

func (s *Storage) Zip(ctx context.Context, module, version string) (storage.SizeReadCloser, error)

Zip implements the (./pkg/storage).Getter interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL