secrets

package
v0.3.138 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2025 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SECRETKEY_TYPE_HS256          = fly.SECRETKEY_TYPE_HS256
	SECRETKEY_TYPE_HS384          = fly.SECRETKEY_TYPE_HS384
	SECRETKEY_TYPE_HS512          = fly.SECRETKEY_TYPE_HS512
	SECRETKEY_TYPE_XAES256GCM     = fly.SECRETKEY_TYPE_XAES256GCM
	SECRETKEY_TYPE_NACL_AUTH      = fly.SECRETKEY_TYPE_NACL_AUTH
	SECRETKEY_TYPE_NACL_BOX       = fly.SECRETKEY_TYPE_NACL_BOX
	SECRETKEY_TYPE_NACL_SECRETBOX = fly.SECRETKEY_TYPE_NACL_SECRETBOX
	SECRETKEY_TYPE_NACL_SIGN      = fly.SECRETKEY_TYPE_NACL_SIGN
)
View Source
const (
	SemTypeSigning    = SemanticType("signing")
	SemTypeEncrypting = SemanticType("encrypting")
)

Variables

View Source
var SupportedSecretTypes = GetSupportedSecretTypes()

SupportedSecretTypes is a list of the SecretTypes for supported key types.

View Source
var SupportedSemanticTypes = GetSupportedSemanticTypes()

SupportedSecretTypes is a list of the SemanticTypes for supported key types.

Functions

func CompareKeyver added in v0.3.4

func CompareKeyver(a, b Keyver) int

func DeploySecrets added in v0.1.71

func DeploySecrets(ctx context.Context, app *fly.AppCompact, stage bool, detach bool) error

func JoinLabelVersion added in v0.3.4

func JoinLabelVersion(ver Keyver, prefix string) string

JoinLabelVersion adds a keyversion to a key label.

func New

func New() *cobra.Command

func SetSecretsAndDeploy added in v0.0.536

func SetSecretsAndDeploy(ctx context.Context, app *fly.AppCompact, secrets map[string]string, stage bool, detach bool) error

func UnsetSecretsAndDeploy added in v0.0.536

func UnsetSecretsAndDeploy(ctx context.Context, app *fly.AppCompact, secrets []string, stage bool, detach bool) error

func ValidKeyLabel added in v0.3.4

func ValidKeyLabel(label string) error

validKeyLabel determines if a key label is valid or not.

Types

type KeyTypeInfo added in v0.3.4

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

type Keyver added in v0.3.4

type Keyver int64

Keyver is a key version.

const (
	KeyverUnspec Keyver = -1
	KeyverZero   Keyver = 0
	KeyverMax    Keyver = 0x7fff_ffff_ffff_ffff // 9223372036854775807, 19 digits.
)

func SplitLabelKeyver added in v0.3.4

func SplitLabelKeyver(label string) (Keyver, string, error)

splitLabelKeyver splits a label into an integer version and the remaining label. It returns a version of KeyverUnspec if no label is present or if it would be out of range.

func (Keyver) Incr added in v0.3.4

func (v Keyver) Incr() (Keyver, error)

func (Keyver) String added in v0.3.4

func (v Keyver) String() string

type SecretType added in v0.3.4

type SecretType = string

func GetSupportedSecretTypes added in v0.3.4

func GetSupportedSecretTypes() []SecretType

func SemanticTypeToSecretType added in v0.3.4

func SemanticTypeToSecretType(st SemanticType) (SecretType, error)

type SemanticType added in v0.3.4

type SemanticType string

func GetSupportedSemanticTypes added in v0.3.4

func GetSupportedSemanticTypes() []SemanticType

func SecretTypeToSemanticType added in v0.3.4

func SecretTypeToSemanticType(st SecretType) (SemanticType, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳