credentials

package
v0.8.2-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: Apache-2.0 Imports: 11 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHelper

func NewHelper(c *config.CLIConfig, helper string) (credentials.Store, error)

Types

type Credential

type Credential struct {
	Context  string            `json:"context"`
	ToolName string            `json:"toolName"`
	Type     CredentialType    `json:"type"`
	Env      map[string]string `json:"env"`
}

type CredentialHelperDirs added in v0.8.2

type CredentialHelperDirs struct {
	RevisionFile, BinDir, RepoDir string
}

func GetCredentialHelperDirs added in v0.8.2

func GetCredentialHelperDirs(cacheDir string) CredentialHelperDirs

type CredentialStore added in v0.8.2

type CredentialStore interface {
	Get(toolName string) (*Credential, bool, error)
	Add(cred Credential) error
	Remove(toolName string) error
	List() ([]Credential, error)
}

func NewStore

func NewStore(cfg *config.CLIConfig, credCtx, cacheDir string) (CredentialStore, error)

type CredentialType added in v0.8.0

type CredentialType string
const (
	CredentialTypeTool          CredentialType = "tool"
	CredentialTypeModelProvider CredentialType = "modelProvider"
)

type HelperStore

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

func (*HelperStore) Erase

func (h *HelperStore) Erase(serverAddress string) error

func (*HelperStore) Get

func (h *HelperStore) Get(serverAddress string) (types.AuthConfig, error)

func (*HelperStore) GetAll

func (h *HelperStore) GetAll() (map[string]types.AuthConfig, error)

func (*HelperStore) Store

func (h *HelperStore) Store(authConfig types.AuthConfig) error

type NoopStore added in v0.8.2

type NoopStore struct{}

func (NoopStore) Add added in v0.8.2

func (s NoopStore) Add(_ Credential) error

func (NoopStore) Get added in v0.8.2

func (s NoopStore) Get(_ string) (*Credential, bool, error)

func (NoopStore) List added in v0.8.2

func (s NoopStore) List() ([]Credential, error)

func (NoopStore) Remove added in v0.8.2

func (s NoopStore) Remove(_ string) error

type Store

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

func (Store) Add

func (s Store) Add(cred Credential) error

func (Store) Get

func (s Store) Get(toolName string) (*Credential, bool, error)

func (Store) List

func (s Store) List() ([]Credential, error)

func (Store) Remove

func (s Store) Remove(toolName string) error

Jump to

Keyboard shortcuts

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