authprovider

package
v0.0.0-...-2dfab7d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

README

This package is mostly copy pasted from buildkit main branch https://github.com/moby/buildkit/tree/master/session/auth/authprovider We need it for 2 reasons:

  • Pass a custom config (instead of loading the default one)
  • AuthProvider takes a struct instead of an interface which makes it challenging to customize even if we pulled the main branch as a dependency.

Changes:

  • NewDockerAuthProvider takes interface instead of struct
  • Seed is hard coded to temp directory instead of config file path
  • Everything in config.go is our code (not from docker)
  • Added some error handling in tokenseed to satisfy GolangCI linter

From Docker:

  • All logic in tokenseed
  • Everything in authprovider.go except the Config interface and NewDockerAuthProvider changes mentioned above

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfig

func NewConfig(host, username, password string) *config

func NewDockerAuthProvider

func NewDockerAuthProvider(cfg Config) session.Attachable

Types

type Config

type Config interface {
	GetAuthConfig(host string) (types.AuthConfig, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL