credential

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package credential consists of definition of service structures and methods related to credential management

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CredentialCache

type CredentialCache struct {
	Entries map[string]credentialEntry
	Mutex   sync.RWMutex
}

No constants needed as we're removing TTL-based expiration.

func NewCredentialCache

func NewCredentialCache() *CredentialCache

NewCredentialCache creates a new shared credential cache.

type CredentialService

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

service implements the credential.Service interface. The service uses a shared cache that is passed in from main.

func NewCredentialService

func NewCredentialService(logger flog.Logger, cache *CredentialCache) *CredentialService

NewCredentialService creates a new credential service with a shared cache.

func (*CredentialService) GenerateBuildID

func (s *CredentialService) GenerateBuildID() (string, error)

GenerateBuildID creates a cryptographically secure random build ID using crypto/rand.

func (*CredentialService) GetCredentials

func (s *CredentialService) GetCredentials(ctx context.Context, buildID string, serverAddr string) (dockertypes.AuthConfig, error)

GetCredentials retrieves credentials for a build ID and server address.

func (*CredentialService) RemoveCredentials

func (s *CredentialService) RemoveCredentials(buildID string) error

RemoveCredentials removes credentials for a build ID.

func (*CredentialService) StoreAuthConfigs

func (s *CredentialService) StoreAuthConfigs(ctx context.Context, buildID string, authConfigs map[string]dockertypes.AuthConfig) error

StoreAuthConfigs stores AuthConfig objects for a build ID.

Jump to

Keyboard shortcuts

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