secret

package
v0.0.0-...-b73c172 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSecrets

func GetSecrets(pid int, from int, to int) (map[string]*Secret, error)

GetSecrets returns secrets available within the range given

func PutSecret

func PutSecret(pid int, key string, secret *Secret) error

PutSecret handles creation of a secret if the secret key exists, throw error

func RemoveSecret

func RemoveSecret(pid int, key string) error

RemoveSecret is different than deletion, our "deletion" is defined as simply 'update' the value of secret to be nil RemoveSecret delete the entire entry from the data

func UpdateSecret

func UpdateSecret(pid int, key string, secret *Secret) error

UpdateSecret updates an existing secret or delete a secret (update it to null)

Types

type Secret

type Secret struct {
	Alias string `json:"Alias"` // Alias of secret (identifier)
	Value string `json:"Value"` // Value of secret
	Role  int    `json:"Role"`  // Int to identify role (clearance level)
}

func GetAllNodeSecrets

func GetAllNodeSecrets(pid int, role int) ([]*Secret, error)

Get all the secrets from the physical node Look through all secrets to see if they are >= the role in secret

func GetSecret

func GetSecret(pid int, id string) (*Secret, error)

GetSecret returns the secret that is referenced by the specific id

Jump to

Keyboard shortcuts

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