Documentation
¶
Overview ¶
Package registrytoken is the GET /v2/token response shape (ADR-0031). The token-minting flow and JWT access-claim parsing stay in consumers — only the response type is contract.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Response ¶
type Response struct {
Token string `json:"token"`
AccessToken string `json:"access_token"`
ExpiresIn int `json:"expires_in,omitempty"`
IssuedAt string `json:"issued_at,omitempty"`
}
Response is the hub's Distribution bearer-token response. The Distribution spec splits the field — some responses carry token, some access_token — so use BearerToken to read it rather than picking a field by hand.
func (Response) BearerToken ¶
BearerToken returns the registry bearer token, preferring Token and falling back to AccessToken. Empty only if the hub returned neither.
Click to show internal directories.
Click to hide internal directories.