Documentation
¶
Index ¶
- Constants
- Variables
- func ApplicationName() string
- func IsMetaFileEqual(a, b *FileMeta) bool
- func IsMetaValid(cachePath string, chunkSize, totalSize int64) bool
- func SaveFileMeta(cachePath string, meta *FileMeta) error
- func Version() string
- type AutorizationError
- type Config
- func (c *Config) AllowInsecure() bool
- func (c *Config) BindToFlags(flags *flag.FlagSet)
- func (c *Config) Credentials() auth.RegistryCredentials
- func (c *Config) FastChannel() bool
- func (c *Config) FastChannelTokenProvider() auth.FastChannelTokenProvider
- func (c *Config) HttpClient() *http.Client
- func (c *Config) LoadCredentialsFromDockerConfig()
- func (c *Config) MaxConcurrentRequests() uint
- func (c *Config) PageSize() uint
- func (c *Config) RegistryUrl() *url.URL
- func (c *Config) SetAllowInsecure(allowInsecure bool)
- func (c *Config) SetCredentials(credentials RegistryCredentials)
- func (c *Config) SetFastChannel(fastChannel bool)
- func (c *Config) SetFastChannelTokenProvider(tokenProvider auth.FastChannelTokenProvider)
- func (c *Config) SetHttpClient(client *http.Client)
- func (c *Config) SetMaxConcurrentRequests(maxRequests uint)
- func (c *Config) SetPagesize(pageSize uint)
- func (c *Config) SetUrl(url url.URL)
- func (c *Config) SetUseBasicAuth(basicAuth bool)
- func (c *Config) SetUserAgent(userAgent string)
- func (c *Config) UseBasicAuth() bool
- func (c *Config) UserAgent() string
- func (c *Config) Validate() error
- type FileMeta
- type InvalidRequestError
- type InvalidStatusCodeError
- type LayerDetails
- type MalformedResponseError
- type NotFoundError
- type NotImplementedByRemoteError
- type Refspec
- type RegistryApi
- type RegistryCredentials
- func (c *RegistryCredentials) BindToFlags(flags *flag.FlagSet)
- func (r *RegistryCredentials) IdentityToken() string
- func (r *RegistryCredentials) IsBlank() bool
- func (r *RegistryCredentials) LoadCredentialsFromDockerConfig(url url.URL)
- func (r *RegistryCredentials) Password() string
- func (r *RegistryCredentials) SetPassword(password string)
- func (r *RegistryCredentials) SetUser(user string)
- func (r *RegistryCredentials) User() string
- type Repository
- type RepositoryListResponse
- type Tag
- type TagDetails
- type TagListResponse
Constants ¶
View Source
const APPLICATION_NAME = "docker-ls"
Variables ¶
View Source
var DEFAULT_REGISTRY_URL url.URL
Functions ¶
func ApplicationName ¶
func ApplicationName() string
func IsMetaFileEqual ¶
func IsMetaValid ¶
func SaveFileMeta ¶
Types ¶
type AutorizationError ¶
type AutorizationError string
func (AutorizationError) Error ¶
func (e AutorizationError) Error() string
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) AllowInsecure ¶
func (*Config) BindToFlags ¶
func (*Config) Credentials ¶
func (c *Config) Credentials() auth.RegistryCredentials
func (*Config) FastChannel ¶
func (*Config) FastChannelTokenProvider ¶
func (c *Config) FastChannelTokenProvider() auth.FastChannelTokenProvider
func (*Config) HttpClient ¶
func (*Config) LoadCredentialsFromDockerConfig ¶
func (c *Config) LoadCredentialsFromDockerConfig()
func (*Config) MaxConcurrentRequests ¶
func (*Config) RegistryUrl ¶
func (*Config) SetAllowInsecure ¶
func (*Config) SetCredentials ¶
func (c *Config) SetCredentials(credentials RegistryCredentials)
func (*Config) SetFastChannel ¶
func (*Config) SetFastChannelTokenProvider ¶
func (c *Config) SetFastChannelTokenProvider(tokenProvider auth.FastChannelTokenProvider)
func (*Config) SetHttpClient ¶
func (*Config) SetMaxConcurrentRequests ¶
func (*Config) SetPagesize ¶
func (*Config) SetUseBasicAuth ¶
func (*Config) SetUserAgent ¶
func (*Config) UseBasicAuth ¶
type FileMeta ¶
type FileMeta struct {
Size int64 `json:"size"`
ChunkSize int64 `json:"chunk_size"`
ModTime int64 `json:"mod_time"`
}
func ReadFileMeta ¶
type InvalidRequestError ¶
type InvalidRequestError string
func (InvalidRequestError) Error ¶
func (e InvalidRequestError) Error() string
type InvalidStatusCodeError ¶
type InvalidStatusCodeError string
func (InvalidStatusCodeError) Error ¶
func (e InvalidStatusCodeError) Error() string
type LayerDetails ¶
type LayerDetails interface {
ContentDigest() string
}
type MalformedResponseError ¶
type MalformedResponseError string
func (MalformedResponseError) Error ¶
func (e MalformedResponseError) Error() string
type NotFoundError ¶
type NotFoundError string
func (NotFoundError) Error ¶
func (e NotFoundError) Error() string
type NotImplementedByRemoteError ¶
type NotImplementedByRemoteError string
func (NotImplementedByRemoteError) Error ¶
func (e NotImplementedByRemoteError) Error() string
type RegistryApi ¶
type RegistryApi interface {
ListRepositories() RepositoryListResponse
ListTags(repositoryName string) TagListResponse
GetTagDetails(ctx context.Context, ref Refspec, manifestVersion uint) (TagDetails, error)
DeleteTag(ref Refspec) error
GetStatistics() connector.Statistics
GetBlobs(ctx context.Context, ref Refspec, manifestVersion uint, digest string) (io.ReadCloser, error)
BlobInfo(ctx context.Context, ref Refspec, manifestVersion uint, digest string, extraHeaders map[string]string) (int64, time.Time, http.Header, error)
RangeBlobs(ctx context.Context, ref Refspec, manifestVersion uint, digest string, start, end int64, extraHeaders map[string]string) (*http.Response, error)
Manifests(ctx context.Context, head bool, ref Refspec, manifestVersion uint, extraHeaders map[string]string) (*http.Response, error)
}
func NewRegistryApi ¶
func NewRegistryApi(cfg Config) (api RegistryApi, err error)
type RegistryCredentials ¶
type RegistryCredentials struct {
// contains filtered or unexported fields
}
func NewRegistryCredentials ¶
func NewRegistryCredentials(user, password string) RegistryCredentials
func (*RegistryCredentials) BindToFlags ¶
func (c *RegistryCredentials) BindToFlags(flags *flag.FlagSet)
func (*RegistryCredentials) IdentityToken ¶
func (r *RegistryCredentials) IdentityToken() string
func (*RegistryCredentials) IsBlank ¶
func (r *RegistryCredentials) IsBlank() bool
func (*RegistryCredentials) LoadCredentialsFromDockerConfig ¶
func (r *RegistryCredentials) LoadCredentialsFromDockerConfig(url url.URL)
func (*RegistryCredentials) Password ¶
func (r *RegistryCredentials) Password() string
func (*RegistryCredentials) SetPassword ¶
func (r *RegistryCredentials) SetPassword(password string)
func (*RegistryCredentials) SetUser ¶
func (r *RegistryCredentials) SetUser(user string)
func (*RegistryCredentials) User ¶
func (r *RegistryCredentials) User() string
type Repository ¶
type Repository interface {
Name() string
}
type RepositoryListResponse ¶
type RepositoryListResponse interface {
Repositories() <-chan Repository
LastError() error
}
type TagDetails ¶
type TagDetails interface {
RawManifest() interface{}
ContentDigest() string
RepositoryName() string
TagName() string
Layers() []LayerDetails
}
type TagListResponse ¶
Source Files
¶
- api_delete_tag.go
- api_errors.go
- api_interface.go
- api_manifests.go
- api_paginated_request.go
- api_repository_list.go
- api_tag_blob.go
- api_tag_details.go
- api_tag_list.go
- cache_hints.go
- config.go
- connector_factory.go
- file_meta.go
- link_to_next_header.go
- parsed_manifest.go
- refspec.go
- registry_api.go
- registry_credentials.go
- repository.go
- tag.go
- version.go
Click to show internal directories.
Click to hide internal directories.