Documentation ¶
Index ¶
- Variables
- func Authorize(req *http.Request, ctx cpi.ContextProvider, repoUrl string, pkgName string) error
- func BasicAuth(req *http.Request, ctx cpi.ContextProvider, repoUrl string, pkgName string) error
- func BasicAuthForCreds(req *http.Request, creds cpi.Credentials) error
- func BearerToken(ctx cpi.ContextProvider, repoUrl string, pkgName string) (string, error)
- func GetCredentials(ctx cpi.ContextProvider, repoUrl string, pkgName string) (string, string, error)
- func Login(registry string, username string, password string, email string) (string, error)
- type Dist
- type Project
- type Version
Constants ¶
This section is empty.
Variables ¶
View Source
var REALM = identity.REALM
Functions ¶
func Authorize ¶
Authorize the given request with the bearer token for the given repository URL and package name. If the token is empty (login failed or credentials not found), it will not be set.
func BasicAuthForCreds ¶ added in v0.15.0
func BasicAuthForCreds(req *http.Request, creds cpi.Credentials) error
func BearerToken ¶
BearerToken retrieves the bearer token for the given repository URL and package name. Either it's setup in the credentials or it will login to the registry and retrieve it.
func GetCredentials ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.