secrets

package
v0.0.0-...-6dcaeb9 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Package secrets provides the backend implementation for the secrets facade.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(registry facade.FacadeRegistry)

Register is called to expose a package of facades onto a given registry.

Types

type SecretsAPI

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

SecretsAPI is the backend for the Secrets facade.

func (*SecretsAPI) CreateSecrets

func (s *SecretsAPI) CreateSecrets(args params.CreateSecretArgs) (params.StringResults, error)

CreateSecrets creates new secrets.

func (*SecretsAPI) GrantSecret

GrantSecret grants access to a user secret.

func (*SecretsAPI) ListSecrets

ListSecrets lists available secrets.

func (*SecretsAPI) RemoveSecrets

func (s *SecretsAPI) RemoveSecrets(args params.DeleteSecretArgs) (params.ErrorResults, error)

RemoveSecrets remove user secret.

func (*SecretsAPI) RevokeSecret

RevokeSecret revokes access to a user secret.

func (*SecretsAPI) UpdateSecrets

func (s *SecretsAPI) UpdateSecrets(args params.UpdateUserSecretArgs) (params.ErrorResults, error)

UpdateSecrets creates new secrets.

type SecretsAPIV1

type SecretsAPIV1 struct {
	*SecretsAPI
}

SecretsAPIV1 is the backend for the Secrets facade v1.

func (*SecretsAPIV1) CreateSecrets

func (s *SecretsAPIV1) CreateSecrets(_ struct{})

CreateSecrets isn't on the v1 API.

func (*SecretsAPIV1) GrantSecret

func (s *SecretsAPIV1) GrantSecret(_ struct{})

GrantSecret isn't on the v1 API.

func (*SecretsAPIV1) RemoveSecrets

func (s *SecretsAPIV1) RemoveSecrets(_ struct{})

RemoveSecrets isn't on the v1 API.

func (*SecretsAPIV1) RevokeSecret

func (s *SecretsAPIV1) RevokeSecret(_ struct{})

RevokeSecret isn't on the v1 API.

func (*SecretsAPIV1) UpdateSecrets

func (s *SecretsAPIV1) UpdateSecrets(_ struct{})

UpdateSecrets isn't on the v1 API.

type SecretsConsumer

type SecretsConsumer interface {
	GrantSecretAccess(*secrets.URI, state.SecretAccessParams) error
	RevokeSecretAccess(*secrets.URI, state.SecretAccessParams) error
	SecretAccess(uri *secrets.URI, subject names.Tag) (secrets.SecretRole, error)
}

SecretsConsumer instances provide secret consumer apis.

type SecretsState

type SecretsState interface {
	CreateSecret(*secrets.URI, state.CreateSecretParams) (*secrets.SecretMetadata, error)
	UpdateSecret(*secrets.URI, state.UpdateSecretParams) (*secrets.SecretMetadata, error)
	GetSecret(uri *secrets.URI) (*secrets.SecretMetadata, error)
	GetSecretValue(*secrets.URI, int) (secrets.SecretValue, *secrets.ValueRef, error)
	GetSecretRevision(uri *secrets.URI, revision int) (*secrets.SecretRevisionMetadata, error)
	DeleteSecret(*secrets.URI, ...int) ([]secrets.ValueRef, error)
	ListSecrets(state.SecretsFilter) ([]*secrets.SecretMetadata, error)
	ListSecretRevisions(uri *secrets.URI) ([]*secrets.SecretRevisionMetadata, error)
	ListUnusedSecretRevisions(uri *secrets.URI) ([]int, error)
	SecretGrants(uri *secrets.URI, role secrets.SecretRole) ([]secrets.AccessInfo, error)
}

SecretsState instances provide secret apis.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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