utils

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildBlobURL

func BuildBlobURL(endpoint, repository, digest string) string

BuildBlobURL ...

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

Types

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