Documentation ¶
Index ¶
- func ByProject(secretsClient *secretsapi.Client, owner string, projectName string, ...) ([]*secretsModels.UserSecret, error)
- func DefsByProject(secretsClient *secretsapi.Client, owner string, projectName string) ([]*secretsModels.SecretDefinition, error)
- func LoadKeypairFromConfigDir(cfg keypairs.Configurable) (keypairs.Keypair, error)
- func Save(secretsClient *secretsapi.Client, encrypter keypairs.Encrypter, ...) error
- func ShareFromDiff(sourceKeypair keypairs.Keypair, diff *secretsModels.UserSecretDiff) ([]*secretsModels.UserSecretShare, error)
- func ShareWithOrgUsers(secretsClient *secretsapi.Client, org *mono_models.Organization, ...) error
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.
Click to show internal directories.
Click to hide internal directories.