secrets

package
v0.0.0-...-51a0f74 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package secrets provides the api client for the secrets facade.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	base.ClientFacade
	// contains filtered or unexported fields
}

Client is the api client for the Secrets facade.

func NewClient

func NewClient(caller base.APICallCloser) *Client

NewClient creates a secrets api client.

func (*Client) CreateSecret

func (c *Client) CreateSecret(name, description string, data map[string]string) (string, error)

func (*Client) GrantSecret

func (c *Client) GrantSecret(uri *secrets.URI, name string, apps []string) ([]error, error)

GrantSecret grants access to a secret to the specified applications.

func (*Client) ListSecrets

func (api *Client) ListSecrets(reveal bool, filter secrets.Filter) ([]SecretDetails, error)

ListSecrets lists the available secrets.

func (*Client) RemoveSecret

func (c *Client) RemoveSecret(uri *secrets.URI, name string, revision *int) error

func (*Client) RevokeSecret

func (c *Client) RevokeSecret(uri *secrets.URI, name string, apps []string) ([]error, error)

RevokeSecret revokes access to a secret from the specified applications.

func (*Client) UpdateSecret

func (c *Client) UpdateSecret(
	uri *secrets.URI, name string, autoPrune *bool,
	newName string, description string, data map[string]string,
) error

UpdateSecret updates an existing secret.

type SecretDetails

type SecretDetails struct {
	Metadata  secrets.SecretMetadata
	Access    []secrets.AccessInfo
	Revisions []secrets.SecretRevisionMetadata
	Value     secrets.SecretValue
	Error     string
}

SecretDetails holds a secret metadata and value.

Jump to

Keyboard shortcuts

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