Documentation
¶
Index ¶
- Variables
- func DeleteTemporaryDir(path string) error
- func DeleteTemporaryFile(path string) error
- func DeregisterInternalURL(path string)
- func Download(url URL, temporaryPathPattern string) (*os.File, error)
- func DownloadTo(url URL, path string) error
- func GetFormat(path string) string
- func GetPath(url URL) (string, error)
- func IsNotFound(err error) bool
- func IsValidTarballArchiveFormat(archiveFormat string) bool
- func ReadARD(url URL, locate bool) (ard.Value, ard.Locator, error)
- func ReadBytes(url URL) ([]byte, error)
- func ReadString(url URL) (string, error)
- func RegisterInternalURL(path string, content any) error
- func Size(url URL) (int64, error)
- func ToNetURL(url URL) (*neturl.URL, error)
- func UpdateInternalURL(path string, content any)
- type ContainerImageLayerDecoder
- type Context
- func (self *Context) GetCredentials(host string) *Credentials
- func (self *Context) GetHTTPRoundTripper(host string) http.RoundTripper
- func (self *Context) GetLocalPath(url URL) (string, error)
- func (self *Context) GetMapping(fromUrl string) (string, bool)
- func (self *Context) Map(fromUrl string, toUrl string)
- func (self *Context) OpenFile(url URL) (*os.File, error)
- func (self *Context) Release() error
- func (self *Context) SetCredentials(host string, username string, password string, token string)
- func (self *Context) SetHTTPRoundTripper(host string, httpRoundTripper http.RoundTripper)
- type Credentials
- type DockerURL
- func (self *DockerURL) Context() *Context
- func (self *DockerURL) Format() string
- func (self *DockerURL) Key() string
- func (self *DockerURL) Open() (io.ReadCloser, error)
- func (self *DockerURL) Origin() URL
- func (self *DockerURL) Relative(path string) URL
- func (self *DockerURL) RemoteOptions() []remote.Option
- func (self *DockerURL) String() string
- func (self *DockerURL) WriteLayer(writer io.Writer) error
- func (self *DockerURL) WriteTarball(writer io.Writer) error
- type FileFileProvider
- type FileProvider
- type FileProviders
- type FileURL
- type GitURL
- func NewGitURL(path string, repositoryUrl string, context *Context) *GitURL
- func NewValidGitURL(path string, repositoryUrl string, context *Context) (*GitURL, error)
- func NewValidRelativeGitURL(path string, origin *GitURL) (*GitURL, error)
- func ParseGitURL(url string, context *Context) (*GitURL, error)
- func ParseValidGitURL(url string, context *Context) (*GitURL, error)
- func (self *GitURL) Context() *Context
- func (self *GitURL) Format() string
- func (self *GitURL) Key() string
- func (self *GitURL) Open() (io.ReadCloser, error)
- func (self *GitURL) OpenRepository() (*git.Repository, error)
- func (self *GitURL) Origin() URL
- func (self *GitURL) Relative(path string) URL
- func (self *GitURL) String() string
- type InternalURL
- func NewInternalURL(path string, context *Context) *InternalURL
- func NewValidInternalURL(path string, context *Context) (*InternalURL, error)
- func NewValidRelativeInternalURL(path string, origin *InternalURL) (*InternalURL, error)
- func ReadToInternalURL(path string, reader io.Reader, context *Context) (*InternalURL, error)
- func ReadToInternalURLFromStdin(format string, context *Context) (*InternalURL, error)
- func (self *InternalURL) Context() *Context
- func (self *InternalURL) Format() string
- func (self *InternalURL) Key() string
- func (self *InternalURL) Open() (io.ReadCloser, error)
- func (self *InternalURL) Origin() URL
- func (self *InternalURL) Relative(path string) URL
- func (self *InternalURL) SetContent(content any)
- func (self *InternalURL) String() string
- type NetworkURL
- func (self *NetworkURL) Context() *Context
- func (self *NetworkURL) Format() string
- func (self *NetworkURL) Key() string
- func (self *NetworkURL) Open() (io.ReadCloser, error)
- func (self *NetworkURL) Origin() URL
- func (self *NetworkURL) Relative(path string) URL
- func (self *NetworkURL) String() string
- type NotFound
- type StaticFileProviders
- type TarFileProvider
- type TarFileProviders
- type TarGZipFileProviders
- type TarballEntryReader
- type TarballReader
- type TarballURL
- func NewTarballURL(path string, archiveUrl URL, archiveFormat string) *TarballURL
- func NewValidRelativeTarballURL(path string, origin *TarballURL) (*TarballURL, error)
- func NewValidTarballURL(path string, archiveUrl URL, archiveFormat string) (*TarballURL, error)
- func ParseTarballURL(url string, context *Context) (*TarballURL, error)
- func ParseValidTarballURL(url string, context *Context) (*TarballURL, error)
- func (self *TarballURL) Context() *Context
- func (self *TarballURL) Format() string
- func (self *TarballURL) Key() string
- func (self *TarballURL) Open() (io.ReadCloser, error)
- func (self *TarballURL) OpenArchive() (*TarballReader, error)
- func (self *TarballURL) Origin() URL
- func (self *TarballURL) Relative(path string) URL
- func (self *TarballURL) String() string
- type URL
- type URLFileProvider
- type ZipEntryReader
- type ZipFileProvider
- type ZipFileProviders
- type ZipReader
- type ZipURL
- func NewValidRelativeZipURL(path string, origin *ZipURL) (*ZipURL, error)
- func NewValidZipURL(path string, archiveUrl URL) (*ZipURL, error)
- func NewZipURL(path string, archiveUrl URL) *ZipURL
- func ParseValidZipURL(url string, context *Context) (*ZipURL, error)
- func ParseZipURL(url string, context *Context) (*ZipURL, error)
- func (self *ZipURL) Context() *Context
- func (self *ZipURL) Format() string
- func (self *ZipURL) Key() string
- func (self *ZipURL) Open() (io.ReadCloser, error)
- func (self *ZipURL) OpenArchive() (*ZipReader, error)
- func (self *ZipURL) Origin() URL
- func (self *ZipURL) Relative(path string) URL
- func (self *ZipURL) String() string
Constants ¶
This section is empty.
Variables ¶
var TARBALL_ARCHIVE_FORMATS = []string{"tar", "tar.gz"}
Functions ¶
func DeleteTemporaryDir ¶ added in v0.1.46
func DeleteTemporaryFile ¶
func DeregisterInternalURL ¶ added in v0.1.15
func DeregisterInternalURL(path string)
func DownloadTo ¶
func IsNotFound ¶ added in v0.1.66
func IsValidTarballArchiveFormat ¶ added in v0.1.66
func ReadString ¶
func RegisterInternalURL ¶
`content` must be []byte or string
func UpdateInternalURL ¶ added in v0.1.15
Types ¶
type ContainerImageLayerDecoder ¶
type ContainerImageLayerDecoder struct {
// contains filtered or unexported fields
}
func NewContainerImageLayerDecoder ¶
func NewContainerImageLayerDecoder(reader io.Reader) *ContainerImageLayerDecoder
func (*ContainerImageLayerDecoder) Decode ¶
func (self *ContainerImageLayerDecoder) Decode() io.Reader
func (*ContainerImageLayerDecoder) Drain ¶
func (self *ContainerImageLayerDecoder) Drain()
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func NewContext ¶
func NewContext() *Context
func (*Context) GetCredentials ¶ added in v0.1.6
func (self *Context) GetCredentials(host string) *Credentials
Not thread-safe
func (*Context) GetHTTPRoundTripper ¶ added in v0.1.4
func (self *Context) GetHTTPRoundTripper(host string) http.RoundTripper
Not thread-safe
func (*Context) GetLocalPath ¶ added in v0.1.61
Will download the file to the local temporary directory if not already locally available
func (*Context) GetMapping ¶ added in v0.1.65
func (*Context) SetCredentials ¶ added in v0.1.6
Not thread-safe
func (*Context) SetHTTPRoundTripper ¶ added in v0.1.4
func (self *Context) SetHTTPRoundTripper(host string, httpRoundTripper http.RoundTripper)
Not thread-safe
type Credentials ¶ added in v0.1.6
type DockerURL ¶
func NewValidDockerURL ¶
func (*DockerURL) RemoteOptions ¶ added in v0.1.6
type FileFileProvider ¶ added in v0.1.61
type FileFileProvider struct {
// contains filtered or unexported fields
}
func NewFileFileProvider ¶ added in v0.1.61
func NewFileFileProvider(localPath string, providedPath string) *FileFileProvider
func (*FileFileProvider) Close ¶ added in v0.1.61
func (self *FileFileProvider) Close() error
FileReader interface
type FileProvider ¶ added in v0.1.61
type FileProviders ¶ added in v0.1.61
type FileProviders interface { Next() (FileProvider, error) Close() error }
func NewDirFileProviders ¶ added in v0.1.61
func NewDirFileProviders(path string) (FileProviders, error)
func NewFileProviders ¶ added in v0.1.61
func NewFileProviders(url URL, unpack string) (FileProviders, error)
`unpack` can be "tgz" or "zip"
type FileURL ¶
type FileURL struct { Path string // contains filtered or unexported fields }
func NewFileURL ¶
func NewValidRelativeFileURL ¶
type GitURL ¶ added in v0.1.46
type GitURL struct { Path string RepositoryURL string Reference string Username string Password string // contains filtered or unexported fields }
func NewValidGitURL ¶ added in v0.1.46
func NewValidRelativeGitURL ¶ added in v0.1.46
func ParseValidGitURL ¶ added in v0.1.46
func (*GitURL) Open ¶ added in v0.1.46
func (self *GitURL) Open() (io.ReadCloser, error)
URL interface
func (*GitURL) OpenRepository ¶ added in v0.1.46
type InternalURL ¶
func NewInternalURL ¶
func NewInternalURL(path string, context *Context) *InternalURL
func NewValidInternalURL ¶
func NewValidInternalURL(path string, context *Context) (*InternalURL, error)
func NewValidRelativeInternalURL ¶
func NewValidRelativeInternalURL(path string, origin *InternalURL) (*InternalURL, error)
func ReadToInternalURL ¶
func ReadToInternalURLFromStdin ¶
func ReadToInternalURLFromStdin(format string, context *Context) (*InternalURL, error)
func (*InternalURL) SetContent ¶ added in v0.1.61
func (self *InternalURL) SetContent(content any)
func (*InternalURL) String ¶
func (self *InternalURL) String() string
URL interface fmt.Stringer interface
type NetworkURL ¶
func NewNetworkURL ¶
func NewNetworkURL(neturl *neturlpkg.URL, context *Context) *NetworkURL
func NewValidNetworkURL ¶
func NewValidNetworkURL(neturl *neturlpkg.URL, context *Context) (*NetworkURL, error)
func NewValidRelativeNetworkURL ¶
func NewValidRelativeNetworkURL(path string, origin *NetworkURL) (*NetworkURL, error)
func (*NetworkURL) String ¶
func (self *NetworkURL) String() string
URL interface fmt.Stringer interface
type NotFound ¶ added in v0.1.66
type NotFound struct {
Message string
}
func NewNotFound ¶ added in v0.1.66
func NewNotFoundf ¶ added in v0.1.66
type StaticFileProviders ¶ added in v0.1.61
type StaticFileProviders struct {
// contains filtered or unexported fields
}
func NewStaticFileProviders ¶ added in v0.1.61
func NewStaticFileProviders(sources ...FileProvider) *StaticFileProviders
func (*StaticFileProviders) Close ¶ added in v0.1.61
func (self *StaticFileProviders) Close() error
FileProviders interface
func (*StaticFileProviders) Next ¶ added in v0.1.61
func (self *StaticFileProviders) Next() (FileProvider, error)
FileProviders interface
type TarFileProvider ¶ added in v0.1.61
type TarFileProvider struct {
// contains filtered or unexported fields
}
func NewTarFileReader ¶ added in v0.1.61
func NewTarFileReader(header *tar.Header, tarReader *tar.Reader) *TarFileProvider
func (*TarFileProvider) Close ¶ added in v0.1.61
func (self *TarFileProvider) Close() error
FileReader interface
type TarFileProviders ¶ added in v0.1.61
type TarFileProviders struct {
// contains filtered or unexported fields
}
func NewTarFileProviders ¶ added in v0.1.61
func NewTarFileProviders(url URL) (*TarFileProviders, error)
func (*TarFileProviders) Close ¶ added in v0.1.61
func (self *TarFileProviders) Close() error
FileProviders interface
func (*TarFileProviders) Next ¶ added in v0.1.61
func (self *TarFileProviders) Next() (FileProvider, error)
FileProviders interface
type TarGZipFileProviders ¶ added in v0.1.61
type TarGZipFileProviders struct {
// contains filtered or unexported fields
}
func NewTarGZipFileProviders ¶ added in v0.1.61
func NewTarGZipFileProviders(url URL) (*TarGZipFileProviders, error)
func (*TarGZipFileProviders) Close ¶ added in v0.1.61
func (self *TarGZipFileProviders) Close() error
FileProviders interface
func (*TarGZipFileProviders) Next ¶ added in v0.1.61
func (self *TarGZipFileProviders) Next() (FileProvider, error)
FileProviders interface
type TarballEntryReader ¶ added in v0.1.66
type TarballEntryReader struct {
TarballReader *TarballReader
}
func NewTarballEntryReader ¶ added in v0.1.66
func NewTarballEntryReader(tarballReader *TarballReader) *TarballEntryReader
func (*TarballEntryReader) Close ¶ added in v0.1.66
func (self *TarballEntryReader) Close() error
io.Closer interface
type TarballReader ¶ added in v0.1.66
type TarballReader struct { TarReader *tar.Reader ArchiveReader io.ReadCloser CompressionReader io.ReadCloser }
func NewTarballReader ¶ added in v0.1.66
func NewTarballReader(reader *tar.Reader, archiveReader io.ReadCloser, compressionReader io.ReadCloser) *TarballReader
func OpenTarballFromFile ¶ added in v0.1.66
func OpenTarballFromFile(file *os.File) (*TarballReader, error)
func (*TarballReader) Close ¶ added in v0.1.66
func (self *TarballReader) Close() error
io.Closer interface
func (*TarballReader) Has ¶ added in v0.1.66
func (self *TarballReader) Has(path string) (bool, error)
func (*TarballReader) Iterate ¶ added in v0.1.66
func (self *TarballReader) Iterate(f func(*tar.Header) bool) error
func (*TarballReader) Open ¶ added in v0.1.66
func (self *TarballReader) Open(path string) (*TarballEntryReader, error)
type TarballURL ¶ added in v0.1.66
func NewTarballURL ¶ added in v0.1.66
func NewTarballURL(path string, archiveUrl URL, archiveFormat string) *TarballURL
func NewValidRelativeTarballURL ¶ added in v0.1.66
func NewValidRelativeTarballURL(path string, origin *TarballURL) (*TarballURL, error)
func NewValidTarballURL ¶ added in v0.1.66
func NewValidTarballURL(path string, archiveUrl URL, archiveFormat string) (*TarballURL, error)
func ParseTarballURL ¶ added in v0.1.66
func ParseTarballURL(url string, context *Context) (*TarballURL, error)
func ParseValidTarballURL ¶ added in v0.1.66
func ParseValidTarballURL(url string, context *Context) (*TarballURL, error)
func (*TarballURL) Context ¶ added in v0.1.66
func (self *TarballURL) Context() *Context
URL interface
func (*TarballURL) Open ¶ added in v0.1.66
func (self *TarballURL) Open() (io.ReadCloser, error)
URL interface
func (*TarballURL) OpenArchive ¶ added in v0.1.66
func (self *TarballURL) OpenArchive() (*TarballReader, error)
func (*TarballURL) Relative ¶ added in v0.1.66
func (self *TarballURL) Relative(path string) URL
URL interface
func (*TarballURL) String ¶ added in v0.1.66
func (self *TarballURL) String() string
URL interface fmt.Stringer interface
type URL ¶
type URLFileProvider ¶ added in v0.1.61
type URLFileProvider struct {
// contains filtered or unexported fields
}
func NewURLFileProvider ¶ added in v0.1.61
func NewURLFileProvider(url URL) *URLFileProvider
func (*URLFileProvider) Close ¶ added in v0.1.61
func (self *URLFileProvider) Close() error
FileReader interface
type ZipEntryReader ¶
type ZipEntryReader struct { EntryReader io.ReadCloser ZipReader *ZipReader }
func NewZipEntryReader ¶
func NewZipEntryReader(entryReader io.ReadCloser, zipReader *ZipReader) *ZipEntryReader
type ZipFileProvider ¶ added in v0.1.61
type ZipFileProvider struct {
// contains filtered or unexported fields
}
func NewZipFileProvider ¶ added in v0.1.61
func NewZipFileProvider(file *zip.File) *ZipFileProvider
func (*ZipFileProvider) Close ¶ added in v0.1.61
func (self *ZipFileProvider) Close() error
FileReader interface
type ZipFileProviders ¶ added in v0.1.61
type ZipFileProviders struct {
// contains filtered or unexported fields
}
func NewZipFileProviders ¶ added in v0.1.61
func NewZipFileProviders(path string) (*ZipFileProviders, error)
func (*ZipFileProviders) Close ¶ added in v0.1.61
func (self *ZipFileProviders) Close() error
FileProviders interface
func (*ZipFileProviders) Next ¶ added in v0.1.61
func (self *ZipFileProviders) Next() (FileProvider, error)
FileProviders interface