Documentation ¶
Index ¶
- Constants
- type Backend
- type Filesystem
- func (fsb *Filesystem) CopyObject(srcURL, destURL string) error
- func (fsb *Filesystem) GetObjectHash(objectURL string) (hashes map[string]string, err error)
- func (fsb *Filesystem) PathExists(path string) (bool, error)
- func (fsb *Filesystem) Prefixes() []string
- func (fsb *Filesystem) URLPrefix() string
- type ObjectBackendGit
- func (g *ObjectBackendGit) CopyObject(srcURL, destURL string) error
- func (g *ObjectBackendGit) GetObjectHash(objectURL string) (hashes map[string]string, err error)
- func (g *ObjectBackendGit) PathExists(nodeURL string) (bool, error)
- func (g *ObjectBackendGit) Prefixes() []string
- func (g *ObjectBackendGit) URLPrefix() string
- type ObjectBackendHTTP
- func (h *ObjectBackendHTTP) CopyObject(srcURL, destURL string) (err error)
- func (h *ObjectBackendHTTP) GetObjectHash(objectURL string) (hashes map[string]string, err error)
- func (h *ObjectBackendHTTP) PathExists(objectURL string) (bool, error)
- func (h *ObjectBackendHTTP) Prefixes() []string
- func (h *ObjectBackendHTTP) URLPrefix() string
- type ObjectBackendS3
- func (s3 *ObjectBackendS3) CopyObject(srcURL, destURL string) error
- func (s3 *ObjectBackendS3) GetObjectHash(objectURL string) (hashes map[string]string, err error)
- func (s3 *ObjectBackendS3) PathExists(nodeURL string) (bool, error)
- func (s3 *ObjectBackendS3) Prefixes() []string
- func (s3 *ObjectBackendS3) URLPrefix() string
- type Options
Constants ¶
View Source
const ( URLPrefixHTTP = "http://" URLPrefixHTTPS = "https://" )
View Source
const URLPrefixFilesystem = "file://"
View Source
const URLPrefixGit = "git+"
View Source
const URLPrefixS3 = "s3://"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filesystem ¶
type Filesystem struct{}
func NewFilesystemWithOptions ¶
func NewFilesystemWithOptions(opts *Options) *Filesystem
func (*Filesystem) CopyObject ¶
func (fsb *Filesystem) CopyObject(srcURL, destURL string) error
func (*Filesystem) GetObjectHash ¶
func (fsb *Filesystem) GetObjectHash(objectURL string) (hashes map[string]string, err error)
GetObjectHash returns the hashes of the specified file
func (*Filesystem) PathExists ¶
func (fsb *Filesystem) PathExists(path string) (bool, error)
func (*Filesystem) Prefixes ¶
func (fsb *Filesystem) Prefixes() []string
func (*Filesystem) URLPrefix ¶
func (fsb *Filesystem) URLPrefix() string
type ObjectBackendGit ¶
type ObjectBackendGit struct{}
func NewGitWithOptions ¶
func NewGitWithOptions(opts *Options) *ObjectBackendGit
func (*ObjectBackendGit) CopyObject ¶
func (g *ObjectBackendGit) CopyObject(srcURL, destURL string) error
func (*ObjectBackendGit) GetObjectHash ¶
func (g *ObjectBackendGit) GetObjectHash(objectURL string) (hashes map[string]string, err error)
GetObjectHash returns the hash of an object. In the case of data stored in a git repo, all artifacts return the hash of the repo commit
func (*ObjectBackendGit) PathExists ¶
func (g *ObjectBackendGit) PathExists(nodeURL string) (bool, error)
PathExists checks if a path exosts in the filesystem
func (*ObjectBackendGit) Prefixes ¶
func (g *ObjectBackendGit) Prefixes() []string
func (*ObjectBackendGit) URLPrefix ¶
func (g *ObjectBackendGit) URLPrefix() string
type ObjectBackendHTTP ¶
type ObjectBackendHTTP struct{}
func NewHTTPWithOptions ¶
func NewHTTPWithOptions(opts *Options) *ObjectBackendHTTP
func (*ObjectBackendHTTP) CopyObject ¶
func (h *ObjectBackendHTTP) CopyObject(srcURL, destURL string) (err error)
func (*ObjectBackendHTTP) GetObjectHash ¶
func (h *ObjectBackendHTTP) GetObjectHash(objectURL string) (hashes map[string]string, err error)
func (*ObjectBackendHTTP) PathExists ¶
func (h *ObjectBackendHTTP) PathExists(objectURL string) (bool, error)
func (*ObjectBackendHTTP) Prefixes ¶
func (h *ObjectBackendHTTP) Prefixes() []string
func (*ObjectBackendHTTP) URLPrefix ¶
func (h *ObjectBackendHTTP) URLPrefix() string
type ObjectBackendS3 ¶
type ObjectBackendS3 struct {
// contains filtered or unexported fields
}
func NewS3WithOptions ¶
func NewS3WithOptions(opts *Options) *ObjectBackendS3
func (*ObjectBackendS3) CopyObject ¶
func (s3 *ObjectBackendS3) CopyObject(srcURL, destURL string) error
func (*ObjectBackendS3) GetObjectHash ¶
func (s3 *ObjectBackendS3) GetObjectHash(objectURL string) (hashes map[string]string, err error)
GetObjectHash returns a hash of a remote object. In S3, there are no APIs to get the file hash so we have to download and sum.
func (*ObjectBackendS3) PathExists ¶
func (s3 *ObjectBackendS3) PathExists(nodeURL string) (bool, error)
PathExists checks if a path exosts in the filesystem
func (*ObjectBackendS3) Prefixes ¶
func (s3 *ObjectBackendS3) Prefixes() []string
func (*ObjectBackendS3) URLPrefix ¶
func (s3 *ObjectBackendS3) URLPrefix() string
Click to show internal directories.
Click to hide internal directories.