Documentation ¶
Index ¶
- func EnsureParentDir(subdir string) (string, error)
- type GithubStorage
- func (g GithubStorage) Download(checksum string) (io.ReadCloser, error)
- func (g GithubStorage) EnsureRepo() (*github.Repository, error)
- func (g GithubStorage) FindBinary() (*github.RepositoryContent, error)
- func (g GithubStorage) Path(checksum string) (string, error)
- func (g GithubStorage) Upload(reader io.ReadCloser) (string, error)
- type LocalStorage
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureParentDir ¶
Types ¶
type GithubStorage ¶
type GithubStorage struct { Owner string RepositoryName string Repository *github.Repository Client *github.Client // contains filtered or unexported fields }
func NewGithubStorage ¶
func NewGithubStorage(owner, repo, apiKey string) (GithubStorage, error)
func (GithubStorage) Download ¶
func (g GithubStorage) Download(checksum string) (io.ReadCloser, error)
func (GithubStorage) EnsureRepo ¶
func (g GithubStorage) EnsureRepo() (*github.Repository, error)
func (GithubStorage) FindBinary ¶
func (g GithubStorage) FindBinary() (*github.RepositoryContent, error)
func (GithubStorage) Upload ¶
func (g GithubStorage) Upload(reader io.ReadCloser) (string, error)
type LocalStorage ¶
type LocalStorage struct {
// contains filtered or unexported fields
}
func NewLocalStorage ¶
func NewLocalStorage() (LocalStorage, error)
func (LocalStorage) Download ¶
func (l LocalStorage) Download(checksum string) (io.ReadCloser, error)
func (LocalStorage) Upload ¶
func (l LocalStorage) Upload(reader io.ReadCloser) (string, error)
Click to show internal directories.
Click to hide internal directories.