Documentation ¶
Index ¶
- func BuildBlobURL(endpoint, repository, digest string) string
- func GetClient() (*http.Client, error)
- func GetTokenForRepo(repository, secret, internalTokenServiceURL string) (string, error)
- func NewRepositoryClient(endpoint string, insecure bool, credential auth.Credential, ...) (*registry.Repository, error)
- func NewRepositoryClientForJobservice(repository, internalRegistryURL, secret, internalTokenServiceURL string) (*registry.Repository, error)
- type UserAgentModifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClient ¶
GetClient returns the HTTP client that will attach jobservce secret to the request, which can be used for accessing Harbor's Core Service. This function returns error if the secret of Job service is not set.
func GetTokenForRepo ¶
GetTokenForRepo is used for job handler to get a token for clair.
func NewRepositoryClient ¶
func NewRepositoryClient(endpoint string, insecure bool, credential auth.Credential, tokenServiceEndpoint, repository string) (*registry.Repository, error)
NewRepositoryClient creates a repository client with standard token authorizer
func NewRepositoryClientForJobservice ¶
func NewRepositoryClientForJobservice(repository, internalRegistryURL, secret, internalTokenServiceURL string) (*registry.Repository, error)
NewRepositoryClientForJobservice creates a repository client that can only be used to access the internal registry
Types ¶
type UserAgentModifier ¶
type UserAgentModifier struct {
UserAgent string
}
UserAgentModifier adds the "User-Agent" header to the request
Click to show internal directories.
Click to hide internal directories.