Documentation
¶
Index ¶
- Variables
- func GenerateNewPublicOnlyPAT(ctx context.Context, label string) (string, string, error)
- func GetDockerHubCredentials(ctx context.Context) (string, string, error)
- func IsDockerHubImage(image string) bool
- func ValidateCredsWithRepo(ctx context.Context, user, pass string, repo string) error
- type CreateAccessTokenRequest
- type CreateAccessTokenResponse
- type CreatePATRequest
- type CreatePATResponse
- type DockerHubClient
- type Image
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidCredential = errors.New("invalid Docker Hub credentials")
View Source
var ErrNoCredentials = errors.New("no Docker Hub credentials found in Docker config")
View Source
var IMG_RE = regexp.MustCompile(`^((?:((?:[0-9a-z](?:[0-9a-z-]{0,61}[0-9a-z])?\.)+[a-z]{2,63})\/)?(.{1,127}?))(?::(\w[\w.-]{0,127}))?(?:@(sha256:[0-9a-f]{64}))?$`)
Copied from defang-mvp/pulumi/shared/utils.ts
Functions ¶
func GetDockerHubCredentials ¶
func IsDockerHubImage ¶
Types ¶
type CreateAccessTokenResponse ¶
type CreateAccessTokenResponse struct {
AccessToken string `json:"access_token"`
}
type CreatePATRequest ¶
type CreatePATResponse ¶
Click to show internal directories.
Click to hide internal directories.