gitcredential

package
v0.25.1 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrLegacyCredential = errors.New("failed to reveal legacy Git credential")

Functions

func Configured

func Configured(ctx context.Context, gatewayClient *gclient.Client, credentialID string) (bool, error)

Configured reports whether the identified Git credential has a stored token.

func Delete

func Delete(ctx context.Context, gatewayClient *gclient.Client, credentialID string) error

Delete removes the stored token for the identified Git credential.

func NormalizeHost

func NormalizeHost(value string) (string, error)

NormalizeHost validates and canonicalizes a Git credential host.

func References

func References(ctx context.Context, storageClient client.Client, namespace, credentialID string) (v1.GitCredentialReferences, error)

References lists resources in the namespace that use the identified Git credential.

func Resolve

func Resolve(ctx context.Context, storageClient client.Client, gatewayClient *gclient.Client, namespace, credentialID, sourceURL string) (string, error)

Resolve validates a Git credential for a source URL and returns its stored token.

func ResolveOrReveal

func ResolveOrReveal(ctx context.Context, storageClient client.Client, gatewayClient *gclient.Client, namespace, credentialID, sourceURL, legacyCredentialContext, legacyToolName string) (string, error)

ResolveOrReveal resolves a shared Git credential or falls back to a legacy source-specific token.

func Store

func Store(ctx context.Context, gatewayClient *gclient.Client, credentialID, token string) error

Store saves the token for the identified Git credential.

Types

This section is empty.

Jump to

Keyboard shortcuts

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