Documentation
¶
Overview ¶
Package toolchain implements the private storage layout for Go releases.
Index ¶
- Constants
- type Objects
- type Store
- func (s *Store) Archive(ctx context.Context, source, filename string) (storage.ArchiveInfo, storage.SizeReadCloser, error)
- func (s *Store) DeleteArchive(ctx context.Context, source, filename string) error
- func (s *Store) ListArchives(ctx context.Context, source string) ([]storage.ArchiveInfo, error)
- func (s *Store) Releases(ctx context.Context, source string) (*storage.ReleaseList, error)
- func (s *Store) SaveArchive(ctx context.Context, source string, info storage.ArchiveInfo, body io.Reader) error
- func (s *Store) SaveReleases(ctx context.Context, source string, list *storage.ReleaseList) error
Constants ¶
View Source
const Prefix = ".athens/toolchains/v1/"
Prefix is reserved for release objects, never module catalog entries.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Objects ¶
type Objects interface {
Open(ctx context.Context, key string) (storage.SizeReadCloser, error)
Create(ctx context.Context, key string, body io.ReadSeeker, size int64) error
Keys(ctx context.Context, prefix string) ([]string, error)
Delete(ctx context.Context, key string) error
}
Objects is private backend plumbing. Create atomically publishes a complete object and returns KindAlreadyExists if the key already exists. Bodies passed to Create are seekable, with a known length.
type Store ¶
type Store struct{ Objects Objects }
Store implements the public release contracts using atomic backend objects.
func (*Store) Archive ¶
func (s *Store) Archive(ctx context.Context, source, filename string) (storage.ArchiveInfo, storage.SizeReadCloser, error)
func (*Store) DeleteArchive ¶
func (*Store) ListArchives ¶
func (*Store) SaveArchive ¶
func (*Store) SaveReleases ¶
Click to show internal directories.
Click to hide internal directories.