Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAccessDenied = errors.New("access denied")
ErrAccessDenied is returned when the service denies access. Either due to insufficient rights or wrong credentials.
View Source
var ErrFileNotFound = errors.New("file not found")
ErrFileNotFound is returned when the requested file does not exist.
View Source
var ErrTooManyRequest = errors.New("too many requests, please try again later")
ErrTooManyRequest is returned when the request number is exceeding rate limit.
Functions ¶
This section is empty.
Types ¶
type AppService ¶ added in v0.107.0
type AppService interface { // UploadStream uploads the contents of reader and stores them under the given file info. UploadStream(ctx context.Context, fileInfo FileInfo, reader io.Reader) (Item, error) Download(ctx context.Context, id string) (io.ReadCloser, int64, error) Delete(ctx context.Context, id string) error DownloadURL(ctx context.Context, url string) (io.ReadCloser, int64, error) List(ctx context.Context, opts ListOptions) (List, error) }
AppService is the interface for interacting with the Sauce application storage.
type Item ¶ added in v0.107.0
type Item struct { ID string `json:"id"` Name string `json:"name"` Size int `json:"size"` Uploaded time.Time `json:"uploaded"` }
Item represents the file in storage.
type ListOptions ¶ added in v0.107.0
type ListOptions struct { // Q is any search term (such as app name, file name, description, build number or version) by which you want to filter. Q string // Name is the filename (case-insensitive) by which you want to filter. Name string // SHA256 is the checksum of the file by which you want to filter. SHA256 string // Limits the number of results returned. MaxResults int Tags []string }
ListOptions represents parameters that modify the file list behavior.
type ServerError ¶ added in v0.107.0
ServerError represents any server side error that isn't already covered by other types of errors in this package.
func (*ServerError) Error ¶ added in v0.107.0
func (s *ServerError) Error() string
Click to show internal directories.
Click to hide internal directories.