credentials

package
v0.4.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PullImageWithAuth

func PullImageWithAuth(imageName string, cred *models.RegistryCredential) error

Types

type AuthConfig added in v0.2.0

type AuthConfig struct {
	// contains filtered or unexported fields
}

func (AuthConfig) Close added in v0.2.0

func (a AuthConfig) Close()

func (AuthConfig) Dir added in v0.2.0

func (a AuthConfig) Dir() string

type AuthEntry added in v0.2.0

type AuthEntry struct {
	Registry string
	Username string
	Password string
}

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(deploymentsPath string) *Manager

func (*Manager) BuildAuthConfig added in v0.2.0

func (m *Manager) BuildAuthConfig(credentialIDs []string, extras ...AuthEntry) (AuthConfig, error)

func (*Manager) CreateCredential

func (m *Manager) CreateCredential(name, registryTypeSlug, registryURL, username, password, email string, isDefault bool) (*models.RegistryCredential, error)

func (*Manager) CreateGenericCredential

func (m *Manager) CreateGenericCredential(name string, kind models.CredentialKind, data map[string]string) (*models.Credential, error)

func (*Manager) CreateRegistryType

func (m *Manager) CreateRegistryType(name string, urlPatterns []string, authType models.AuthType, loginURL, docsURL string) (*models.RegistryType, error)

func (*Manager) DeleteCredential

func (m *Manager) DeleteCredential(id string) error

func (*Manager) DeleteGenericCredential

func (m *Manager) DeleteGenericCredential(id string) error

func (*Manager) DeleteRegistryType

func (m *Manager) DeleteRegistryType(slug string) error

func (*Manager) FindCredentialForImage

func (m *Manager) FindCredentialForImage(imageName string) *models.RegistryCredential

func (*Manager) GetCredential

func (m *Manager) GetCredential(id string) (*models.RegistryCredential, error)

func (*Manager) GetCredentialForRegistry

func (m *Manager) GetCredentialForRegistry(registryTypeSlug string) *models.RegistryCredential

func (*Manager) GetGenericCredential

func (m *Manager) GetGenericCredential(id string) (*models.Credential, error)

GetGenericCredential returns the raw credential, including secret values, for internal use. API handlers marshal it to JSON, which masks secrets.

func (*Manager) GetRegistryType

func (m *Manager) GetRegistryType(slug string) (*models.RegistryType, error)

func (*Manager) ListCredentials

func (m *Manager) ListCredentials() []models.RegistryCredentialWithType

func (*Manager) ListGenericCredentials

func (m *Manager) ListGenericCredentials(kind models.CredentialKind) []models.Credential

ListGenericCredentials returns generic credentials, optionally filtered by kind. Pass an empty kind to list all.

func (*Manager) ListRegistryTypes

func (m *Manager) ListRegistryTypes() []models.RegistryType

func (*Manager) RegistryForCredential added in v0.2.0

func (m *Manager) RegistryForCredential(credentialID string) string

func (*Manager) RegistryTypeForImage added in v0.2.0

func (m *Manager) RegistryTypeForImage(imageName string) string

func (*Manager) TestCredential

func (m *Manager) TestCredential(id string) error

func (*Manager) UpdateCredential

func (m *Manager) UpdateCredential(id, name, registryURL, username, password, email string, isDefault *bool) (*models.RegistryCredential, error)

func (*Manager) UpdateGenericCredential

func (m *Manager) UpdateGenericCredential(id, name string, data map[string]string) (*models.Credential, error)

UpdateGenericCredential merges provided fields. A data value that is empty or equal to the mask sentinel leaves the stored value untouched, so a secret can be kept without the caller ever having to resend it.

func (*Manager) UpdateRegistryType

func (m *Manager) UpdateRegistryType(slug, name string, urlPatterns []string, authType models.AuthType, loginURL, docsURL string) (*models.RegistryType, error)

Jump to

Keyboard shortcuts

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