gsm

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parameter

type Parameter interface {
	// contains filtered or unexported methods
}

Parameter is the interface for service parameters.

func WithCredentialsPath

func WithCredentialsPath(credentialsPath string) Parameter

WithCredentialsPath sets the path for the Google service account file.

func WithLogLevel

func WithLogLevel(logLevel zerolog.Level) Parameter

WithLogLevel sets the log level for the module.

func WithProject

func WithProject(project string) Parameter

WithProject sets the default project ID for accessing Google secrets manager.

type Service

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

Service returns values from Google secrets manager. This service handles URLs with the scheme "gsm". A full URL is of the form "gsm://id@project/secret". ID can be supplied at creation time if preferred. project can also be supplied at creation time if preferred. If both are supplied URLs are of the form "gsm:///secret". Any provision of ID or of project will override the defaults. N.B. the project value is the project _ID_ not the project name.

func New

func New(ctx context.Context, params ...Parameter) (*Service, error)

New creates a new Google secrets manager confidant.

func (*Service) Fetch

func (s *Service) Fetch(ctx context.Context, url *url.URL) ([]byte, error)

Fetch fetches a value given its key.

func (*Service) SupportedURLSchemes

func (s *Service) SupportedURLSchemes(ctx context.Context) ([]string, error)

SupportedURLSchemes provides the list of schemes supported by this confidant.

Jump to

Keyboard shortcuts

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