secret

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Credstore = "credstore"
)

Variables

This section is empty.

Functions

func Export added in v0.11.0

func Export(ctx context.Context, docker docker.Client, serverNames []string) (map[string]string, error)

func GetHelper

func GetHelper() credentials.Helper

func IsValidProvider added in v0.11.0

func IsValidProvider(provider string) bool

func List added in v0.11.0

func List(ctx context.Context, opts ListOptions) error

func Remove added in v0.11.0

func Remove(ctx context.Context, names []string, opts RmOpts) error

func Set added in v0.11.0

func Set(ctx context.Context, s Secret, opts SetOpts) error

Types

type CredStoreProvider

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

func NewCredStoreProvider

func NewCredStoreProvider() *CredStoreProvider

func (*CredStoreProvider) DeleteSecret

func (store *CredStoreProvider) DeleteSecret(id string) error

func (*CredStoreProvider) GetSecret

func (store *CredStoreProvider) GetSecret(id string) (string, error)

func (*CredStoreProvider) SetSecret

func (store *CredStoreProvider) SetSecret(id string, value string) error

type Helper

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

Helper wraps credential helper program.

func (Helper) Add

func (h Helper) Add(creds *credentials.Credentials) error

Add stores new credentials.

func (Helper) Delete

func (h Helper) Delete(serverURL string) error

Delete removes credentials.

func (Helper) Get

func (h Helper) Get(serverURL string) (string, string, error)

Get returns the username and secret to use for a given registry server URL.

func (Helper) List

func (h Helper) List() (map[string]string, error)

type ListOptions added in v0.11.0

type ListOptions struct {
	JSON bool
}

type RmOpts added in v0.11.0

type RmOpts struct {
	All bool
}

type Secret added in v0.11.0

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

func MappingFromSTDIN added in v0.11.0

func MappingFromSTDIN(ctx context.Context, key string) (*Secret, error)

func ParseArg added in v0.11.0

func ParseArg(arg string, opts SetOpts) (*Secret, error)

type SetOpts added in v0.11.0

type SetOpts struct {
	Provider string
}

Jump to

Keyboard shortcuts

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