variables

package
v0.0.0-...-3a2f251 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateLocalSecretKey

func CreateLocalSecretKey()

func DecryptValue

func DecryptValue(storage SecretKeyStorage, value string) string

func EncryptValue

func EncryptValue(storage SecretKeyStorage, value string) string

func GenerateAESKey

func GenerateAESKey(bitSize int) ([]byte, error)

func GenerateRoutes

func GenerateRoutes(relativePath string, r *gin.Engine, handler *Handler)

Types

type Handler

type Handler struct {
	Config     *apiConfig.Config
	MongoDB    *database.MongoDB
	KeyStorage SecretKeyStorage
}

func NewVariablesHandler

func NewVariablesHandler(config *apiConfig.Config, mongo *database.MongoDB, keyStorage SecretKeyStorage) *Handler

func (*Handler) CreateVariable

func (h *Handler) CreateVariable(c *gin.Context)

func (*Handler) DeleteVariable

func (h *Handler) DeleteVariable(c *gin.Context)

func (*Handler) ListComponentVariables

func (h *Handler) ListComponentVariables(c *gin.Context)

func (*Handler) ListEnvironmentVariables

func (h *Handler) ListEnvironmentVariables(c *gin.Context)

func (*Handler) ListOrganizationVariables

func (h *Handler) ListOrganizationVariables(c *gin.Context)

type K8sSecretKeyStorage

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

func (*K8sSecretKeyStorage) Generate

func (l *K8sSecretKeyStorage) Generate() error

func (*K8sSecretKeyStorage) Load

func (l *K8sSecretKeyStorage) Load() ([]byte, error)

func (*K8sSecretKeyStorage) Save

func (l *K8sSecretKeyStorage) Save(key []byte) error

type LocalSecretKeyStorage

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

func (*LocalSecretKeyStorage) Generate

func (l *LocalSecretKeyStorage) Generate() error

func (*LocalSecretKeyStorage) Load

func (l *LocalSecretKeyStorage) Load() ([]byte, error)

func (*LocalSecretKeyStorage) Save

func (l *LocalSecretKeyStorage) Save(key []byte) error

type SecretKeyStorage

type SecretKeyStorage interface {
	Generate() error
	Save(key []byte) error
	Load() ([]byte, error)
}

func NewK8sSecretKey

func NewK8sSecretKey(namespace string) SecretKeyStorage

func NewLocalSecretKey

func NewLocalSecretKey(filepath string) SecretKeyStorage

Jump to

Keyboard shortcuts

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