Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAuthorizer ¶
func NewAuthorizer() lib.Authorizer
NewAuthorizer returns an instance of the authorizer
Types ¶
type Manager ¶
type Manager interface { // Generate generates a secret for the given repository, sample value for repository: "library/ubuntu" Generate(repository string) string // Verify verifies the secret against repo name, after the verification the secret should be invalid Verify(secret, repository string) bool }
Manager generates and verifies the secret for repositories under proxy project The secret normally is used for authorizing a request trying to push artifact to a project A secret can be used only once and expires in a short period of time. As the request will be sent to 127.0.0.1 so the secret will live in one process.
func GetManager ¶
func GetManager() Manager
GetManager returns the default manager which is a singleton in the package
Click to show internal directories.
Click to hide internal directories.