Documentation ¶
Index ¶
- Constants
- type Client
- type ClientImpl
- func (c *ClientImpl) Close() error
- func (c *ClientImpl) Describe(ctx context.Context, project, name string) (*secretmanagerpb.Secret, error)
- func (c *ClientImpl) Get(ctx context.Context, project, secret, version string) (string, error)
- func (c *ClientImpl) Update(ctx context.Context, project, name, value string) (string, error)
Constants ¶
View Source
const ( // VersionLatest can be provided to Get() in order to retrieve the most recent // version of a secret. VersionLatest = "latest" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // Get the value of the given secret at the given version. Use "latest" to // retrieve the most recent version. Get(ctx context.Context, project, secret, version string) (string, error) // Update the given secret with a new version. Returns the resulting version. Update(ctx context.Context, project, name, value string) (string, error) // Describe returns metadata about the secret. Describe(ctx context.Context, project, name string) (*secretmanagerpb.Secret, error) // Close cleans up resources used by the Client. Close() error }
Client provides functionality for working with GCP Secrets.
type ClientImpl ¶
type ClientImpl struct {
// contains filtered or unexported fields
}
ClientImpl implements Client.
func NewClient ¶
func NewClient(ctx context.Context) (*ClientImpl, error)
NewClient returns a Client instance.
func (*ClientImpl) Close ¶
func (c *ClientImpl) Close() error
Close implements the Client interface.
func (*ClientImpl) Describe ¶
func (c *ClientImpl) Describe(ctx context.Context, project, name string) (*secretmanagerpb.Secret, error)
Describe implements the Client interface.
Click to show internal directories.
Click to hide internal directories.