secret

package
v0.1.430 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2025 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type Client

type Client interface {
	contract.SecretOperator
}

func NewClient

func NewClient(d Dependencies, opts ClientOptions) (Client, error)

type ClientOption

type ClientOption func(*ClientOptions)

func WithProjectID added in v0.1.110

func WithProjectID(x string) ClientOption

type ClientOptions

type ClientOptions struct {
	ProjectID string
}

func ApplyClientOptions

func ApplyClientOptions(opts *ClientOptions, modifiers ...ClientOption) ClientOptions

type DefaultTool added in v0.1.24

type DefaultTool struct {
	T *contract.Tool[Client]
}

func NewTool

func NewTool(c Client, opts contract.ToolOptions[Client]) *DefaultTool

func (*DefaultTool) Close added in v0.1.24

func (d *DefaultTool) Close(ctx context.Context) error

Close closes the underlying client.

func (*DefaultTool) GetSecret added in v0.1.24

func (d *DefaultTool) GetSecret(ctx context.Context, s contract.SecretInfo) ([]byte, error)

GetSecret retrieves a secret from Google Secret Manager by its info.

type Dependencies

type Dependencies struct {
	C contract.SecretManagerClient
}

type SecretManagerClientDependencies added in v0.1.29

type SecretManagerClientDependencies struct {
	F contract.FSysFileReader
}

type SecretManagerClientOptions

type SecretManagerClientOptions struct {
	FS              fs.ReadFileFS
	CredentialsPath string
}

type Tool added in v0.1.245

type Tool interface {
	Client
}

Jump to

Keyboard shortcuts

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