v1.7.8 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2020 License: Apache-2.0 Imports: 8 Imported by: 32




This section is empty.


This section is empty.


func BuildBlobURL

func BuildBlobURL(endpoint, repository, digest string) string

BuildBlobURL ...

func GetClient added in v1.7.0

func GetClient() (*http.Client, error)

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

func GetTokenForRepo(repository, secret, internalTokenServiceURL string) (string, error)

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


type UserAgentModifier

type UserAgentModifier struct {
	UserAgent string

UserAgentModifier adds the "User-Agent" header to the request

func (*UserAgentModifier) Modify

func (u *UserAgentModifier) Modify(req *http.Request) error

Modify adds user-agent header to the request

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL