Documentation
¶
Index ¶
Constants ¶
View Source
const GCP_TOKEN_URL = "http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token"
GCP_TOKEN_URL is the default GCP metadata endpoint used for authentication.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a GCP GCR client which can log into the registry and return authorization information.
func NewClient ¶
func NewClient() *Client
NewClient creates a new GCR client with default configurations.
func (*Client) Login ¶
func (c *Client) Login(ctx context.Context, autoLogin bool, image string, ref name.Reference) (authn.Authenticator, error)
Login attempts to get the authentication material for GCR. The caller can ensure that the passed image is a valid GCR image using ValidHost().
func (*Client) WithTokenURL ¶
WithTokenURL sets the token URL used by the GCR client.
Click to show internal directories.
Click to hide internal directories.