secrets

package
v0.0.0-...-f7767dd Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByProject

func ByProject(secretsClient *secretsapi.Client, owner string, projectName string, auth *authentication.Auth) ([]*secretsModels.UserSecret, error)

ByProject fetches the secrets for the current user relevant to the given project

func DefsByProject

func DefsByProject(secretsClient *secretsapi.Client, owner string, projectName string) ([]*secretsModels.SecretDefinition, error)

DefsByProject fetches the secret definitions for the current user relevant to the given project

func LoadKeypairFromConfigDir

func LoadKeypairFromConfigDir(cfg keypairs.Configurable) (keypairs.Keypair, error)

func Save

func Save(secretsClient *secretsapi.Client, encrypter keypairs.Encrypter, org *mono_models.Organization, project *mono_models.Project,
	isUser bool, secretName, secretValue string, auth *authentication.Auth) error

Save will add a new secret for this user or update an existing one.

func ShareFromDiff

func ShareFromDiff(sourceKeypair keypairs.Keypair, diff *secretsModels.UserSecretDiff) ([]*secretsModels.UserSecretShare, error)

ShareFromDiff decrypts a source user's secrets that they are sharing and re-encrypts those secrets using the public key of a target user provided in the UserSecretDiff struct. This is effectively "copying" a set of secrets for use by another user.

func ShareWithOrgUsers

func ShareWithOrgUsers(secretsClient *secretsapi.Client, org *mono_models.Organization, project *mono_models.Project, secretName, secretValue string, auth *authentication.Auth) error

ShareWithOrgUsers will share the provided secret with all other users in the organization who have a valid public-key available.

Types

This section is empty.

Jump to

Keyboard shortcuts

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