secret

package
v0.0.70 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SecretEntityDesc = entity.NewEntityDescriptor[SecretEntity](
	"Secret",
	"Secrets",
	func(s *SecretEntity) string { return s.Name },
	func(s *SecretEntity) string { return s.GetCid() },
)

Functions

func AskForNewSecret

func AskForNewSecret(ctx context.Context, secrets []SecretEntity, name, key *string, keyPath string) error

func AskIfUseSecret

func AskIfUseSecret() (bool, error)

func DeleteSecretManager

func DeleteSecretManager(ctx context.Context, secret *SecretEntity) error

func SetSecret

func SetSecret(ctx context.Context, flagSecretId string) error

func SyncSecretIdFromFlagAndConfig

func SyncSecretIdFromFlagAndConfig(ctx context.Context, secretId string, workspaceConfig *workspace.WorkspaceConfig) (string, error)

Types

type SecretEntity

type SecretEntity = tensorleapapi.SecretManager

func CreateOrSelectIfSecretNotFound

func CreateOrSelectIfSecretNotFound(ctx context.Context, secretId string) (selectedSecret *SecretEntity, wasValid, wasCreateNew bool, err error)

func CreateOrSelectSecretIfInUse

func CreateOrSelectSecretIfInUse(ctx context.Context) (selectedSecret *SecretEntity, wasCreateNew bool, err error)

func CreateSecretManager

func CreateSecretManager(ctx context.Context, name, key string) (*SecretEntity, error)

func GetSecretList

func GetSecretList(ctx context.Context) ([]SecretEntity, error)

func SelectOrCreateSecret

func SelectOrCreateSecret(ctx context.Context, secrets []SecretEntity, askForNewFirst bool) (*SecretEntity, bool, error)

Jump to

Keyboard shortcuts

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