Documentation
¶
Index ¶
- Variables
- func ReadScopesByPermission(scope auth.CacheScope) []string
- func WriteScope(scope auth.CacheScope) (string, bool)
- type CreateUploadResult
- type MatchResult
- type Options
- type Service
- func (s *Service) CommitBlockList(ctx context.Context, uploadID int64, blockIDs []string) error
- func (s *Service) CompleteUpload(ctx context.Context, key, version string, scope auth.CacheScope) (int64, error)
- func (s *Service) CreateUpload(ctx context.Context, key, version string, scope auth.CacheScope) (*CreateUploadResult, error)
- func (s *Service) Download(ctx context.Context, cacheEntryID string) (io.ReadCloser, error)
- func (s *Service) GetCacheEntryWithDownloadURL(ctx context.Context, keys []string, version string, scope auth.CacheScope, ...) (*MatchResult, error)
- func (s *Service) MatchCacheEntry(ctx context.Context, keys []string, version string, scope auth.CacheScope) (*ent.CacheEntry, error)
- func (s *Service) StopAcceptingMerges()
- func (s *Service) UploadBlock(ctx context.Context, uploadID int64, blockID string, stream io.Reader) error
- func (s *Service) UploadPart(ctx context.Context, uploadID int64, partIndex int, stream io.Reader) error
- func (s *Service) WaitForMerges(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoWriteScope = errors.New("no scope with write permission found") ErrUploadAlreadyExists = errors.New("upload already exists") ErrUploadNotFound = errors.New("upload not found") ErrNoPartsUploaded = errors.New("no parts have been uploaded") ErrPartsStillUploading = errors.New("not all parts have been uploaded") ErrPartCountMismatch = errors.New("uploaded part count does not match actual part count in storage") ErrCacheNotFound = errors.New("cache not found") )
Functions ¶
func ReadScopesByPermission ¶
func ReadScopesByPermission(scope auth.CacheScope) []string
func WriteScope ¶
func WriteScope(scope auth.CacheScope) (string, bool)
Types ¶
type CreateUploadResult ¶
type CreateUploadResult struct {
UploadID int64
}
type MatchResult ¶
type MatchResult struct {
CacheEntry *ent.CacheEntry
DownloadURL string
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) CommitBlockList ¶
func (*Service) CompleteUpload ¶
func (*Service) CreateUpload ¶
func (s *Service) CreateUpload(ctx context.Context, key, version string, scope auth.CacheScope) (*CreateUploadResult, error)
func (*Service) GetCacheEntryWithDownloadURL ¶
func (*Service) MatchCacheEntry ¶
func (s *Service) MatchCacheEntry(ctx context.Context, keys []string, version string, scope auth.CacheScope) (*ent.CacheEntry, error)
func (*Service) StopAcceptingMerges ¶
func (s *Service) StopAcceptingMerges()
func (*Service) UploadBlock ¶
func (*Service) UploadPart ¶
Click to show internal directories.
Click to hide internal directories.