secret

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseSecretData

func ParseSecretData(s *Secret) error

func UnmarshalSecretJSON

func UnmarshalSecretJSON(b []byte, s *Secret) error

TODO: Extend the go-converter to generate this method for JOI schemas that use the "alternatives" option.

Types

type AwsKey

type AwsKey struct {
	AccessKey  string `json:"accessKey,omitempty"`
	SecretKey  string `json:"secretKey,omitempty"`
	RoleArn    string `json:"roleArn,omitempty"`
	ExternalId string `json:"externalId,omitempty"`
}

type AzureConnector

type AzureConnector struct {
	Url  string `json:"url,omitempty"`
	Code string `json:"code,omitempty"`
}

type Dictionary

type Dictionary map[string]string

type DockerSecret

type DockerSecret struct {
	Auths map[string]DockerSecretAuth `json:"auths"`
}

type DockerSecretAuth

type DockerSecretAuth struct {
	Username string `json:"username"`
	Password string `json:"password"`
	Auth     string `json:"auth"`
}

type EcrPull

type EcrPull struct {
	AccessKey  string   `json:"accessKey,omitempty"`
	SecretKey  string   `json:"secretKey,omitempty"`
	RoleArn    string   `json:"roleArn,omitempty"`
	ExternalId string   `json:"externalId,omitempty"`
	Repos      []string `json:"repos,omitempty"`
}

type GcrSecret

type GcrSecret struct {
	Type                    string `json:"type"`
	ProjectId               string `json:"project_id"`
	PrivateKeyId            string `json:"private_key_id"`
	PrivateKey              string `json:"private_key"`
	ClientEmail             string `json:"client_email"`
	ClientId                string `json:"client_id"`
	AuthUri                 string `json:"auth_uri"`
	TokenUri                string `json:"token_uri"`
	AuthProviderX509CertUrl string `json:"auth_provider_x509_cert_url"`
	ClientX509CertUrl       string `json:"client_x509_cert_url"`
}

type KeyPair

type KeyPair struct {
	SecretKey  string `json:"secretKey,omitempty"`
	PublicKey  string `json:"publicKey,omitempty"`
	Passphrase string `json:"passphrase,omitempty"`
}

type NatsAccount

type NatsAccount struct {
	AccountId  string `json:"accountId,omitempty"`
	PrivateKey string `json:"privateKey,omitempty"`
}

type Opaque

type Opaque struct {
	Payload  any            `json:"payload,omitempty"`
	Encoding OpaqueEncoding `json:"encoding,omitempty"`
}

type OpaqueEncoding

type OpaqueEncoding string
const (
	OpaqueEncodingPlain  OpaqueEncoding = "plain"
	OpaqueEncodingBase64 OpaqueEncoding = "base64"
)

type Secret

type Secret struct {
	Id           string     `json:"id,omitempty"`
	Name         base.Name  `json:"name,omitempty"`
	Kind         base.Kind  `json:"kind,omitempty"`
	Version      float32    `json:"version"`
	Description  string     `json:"description,omitempty"`
	Tags         base.Tags  `json:"tags,omitempty"`
	Created      string     `json:"created,omitempty"`
	LastModified string     `json:"lastModified,omitempty"`
	Links        base.Links `json:"links,omitempty"`
	Type         SecretType `json:"type,omitempty"`
	Data         SecretData `json:"data,omitempty"`
}

type SecretData

type SecretData any /* TODO: [object Object]*/

type SecretType

type SecretType string
const (
	SecretTypeOpaque         SecretType = "opaque"
	SecretTypeTls            SecretType = "tls"
	SecretTypeGcp            SecretType = "gcp"
	SecretTypeAws            SecretType = "aws"
	SecretTypeEcr            SecretType = "ecr"
	SecretTypeUserpass       SecretType = "userpass"
	SecretTypeKeypair        SecretType = "keypair"
	SecretTypeAzureSdk       SecretType = "azure-sdk"
	SecretTypeAzureConnector SecretType = "azure-connector"
	SecretTypeDocker         SecretType = "docker"
	SecretTypeDictionary     SecretType = "dictionary"
	SecretTypeNatsAccount    SecretType = "nats-account"
)

type Tls

type Tls struct {
	Key   string `json:"key,omitempty"`
	Cert  string `json:"cert,omitempty"`
	Chain string `json:"chain,omitempty"`
}

type UsernamePassword

type UsernamePassword struct {
	Username string                   `json:"username,omitempty"`
	Password string                   `json:"password,omitempty"`
	Encoding UsernamePasswordEncoding `json:"encoding,omitempty"`
}

type UsernamePasswordEncoding

type UsernamePasswordEncoding string
const (
	UsernamePasswordEncodingPlain  UsernamePasswordEncoding = "plain"
	UsernamePasswordEncodingBase64 UsernamePasswordEncoding = "base64"
)

Jump to

Keyboard shortcuts

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