Documentation
¶
Overview ¶
Package credential consists of definition of service structures and methods related to credential management
Index ¶
- type CredentialCache
- type CredentialService
- func (s *CredentialService) GenerateBuildID() (string, error)
- func (s *CredentialService) GetCredentials(ctx context.Context, buildID string, serverAddr string) (dockertypes.AuthConfig, error)
- func (s *CredentialService) RemoveCredentials(buildID string) error
- func (s *CredentialService) StoreAuthConfigs(ctx context.Context, buildID string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CredentialCache ¶
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.