types

package
v0.0.0-...-e7c744b Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FieldAmazonRegion          = "AWS_REGION"
	FieldAmazonAccessKeyId     = "AWS_ACCESS_KEY_ID"
	FieldAmazonSecretAccessKey = "AWS_SECRET_ACCESS_KEY"
)
View Source
const (
	FieldAzureClientID       = "AZURE_CLIENT_ID"
	FieldAzureClientSecret   = "AZURE_CLIENT_SECRET"
	FieldAzureTenantID       = "AZURE_TENANT_ID"
	FieldAzureSubscriptionID = "AZURE_SUBSCRIPTION_ID"
)
View Source
const (
	FieldAzureStorageAccount          = "storageAccount"
	FieldAzureStorageAccountAccessKey = "accessKey"
)
View Source
const (
	FieldCloudflareApiKey   = "CF_API_KEY"
	FieldCloudflareApiEmail = "CF_API_EMAIL"
)
View Source
const (
	FieldGoogleType          = "type"
	FieldGoogleProjectId     = "project_id"
	FieldGooglePrivateKeyId  = "private_key_id"
	FieldGooglePrivateKey    = "private_key"
	FieldGoogleClientEmail   = "client_email"
	FieldGoogleClientId      = "client_id"
	FieldGoogleAuthUri       = "auth_uri"
	FieldGoogleTokenUri      = "token_uri"
	FieldGoogleAuthX509Url   = "auth_provider_x509_cert_url"
	FieldGoogleClientX509Url = "client_x509_cert_url"
)
View Source
const (
	FieldHtpasswdUsername = "username"
	FieldHtpasswdPassword = "password"
	FieldHtpasswdFile     = "htpasswd"
)
View Source
const (
	FieldPasswordUsername = "username"
	FieldPasswordPassword = "password"
)
View Source
const (
	FieldPKECACert           = "caCert"
	FieldPKECAKey            = "caKey"
	FieldPKEKubernetesCACert = "kubernetesCaCert"
	FieldPKEKubernetesCAKey  = "kubernetesCaKey"
	FieldPKEEtcdCACert       = "etcdCaCert"
	FieldPKEEtcdCAKey        = "etcdCaKey"
	FieldPKEFrontProxyCACert = "frontProxyCaCert"
	FieldPKEFrontProxyCAKey  = "frontProxyCaKey"
	FieldPKESAPub            = "saPub"
	FieldPKESAKey            = "saKey"
)
View Source
const (
	FieldSSHUser                 = "user"
	FieldSSHIdentifier           = "identifier"
	FieldSSHPublicKeyData        = "public_key_data"
	FieldSSHPublicKeyFingerprint = "public_key_fingerprint"
	FieldSSHPrivateKeyData       = "private_key_data"
)
View Source
const (
	FieldTLSHosts      = "hosts"
	FieldTLSValidity   = "validity"
	FieldTLSCACert     = "caCert"
	FieldTLSCAKey      = "caKey"
	FieldTLSServerKey  = "serverKey"
	FieldTLSServerCert = "serverCert"
	FieldTLSClientKey  = "clientKey"
	FieldTLSClientCert = "clientCert"
	FieldTLSPeerKey    = "peerKey"
	FieldTLSPeerCert   = "peerCert"
)
View Source
const (
	FieldVsphereURL                 = "url"
	FieldVsphereUser                = "user"
	FieldVspherePassword            = "password"
	FieldVsphereFingerprint         = "fingerprint"
	FieldVsphereDatacenter          = "datacenter"
	FieldVsphereDatastore           = "datastore"
	FieldVsphereResourcePool        = "resourcePool"
	FieldVsphereFolder              = "folder"
	FieldVsphereDefaultNodeTemplate = "defaultNodeTemplate"
)
View Source
const Amazon = "amazon"
View Source
const Azure = "azure"
View Source
const Cloudflare = "cloudflare"
View Source
const DigitalOcean = "digitalocean"
View Source
const (
	FieldDigitalOceanToken = "DO_TOKEN"
)
View Source
const (
	FieldFnMasterToken = "master_token"
)
View Source
const (
	FieldKubernetesConfig = "K8Sconfig"
)
View Source
const (
	FieldPagerDutyIntegrationKey = "integrationKey"
)
View Source
const (
	FieldSlackApiUrl = "apiUrl"
)
View Source
const (
	FieldVaultToken = "token"
)
View Source
const Fn = "fn"
View Source
const Generic = "generic"
View Source
const Google = "google"
View Source
const Htpasswd = "htpasswd"
View Source
const Kubernetes = "kubernetes"
View Source
const PKE = "pkecert"
View Source
const PagerDuty = "pagerduty"
View Source
const Password = "password"
View Source
const SSH = "ssh"
View Source
const Slack = "slack"
View Source
const TLS = "tls"
View Source
const Vault = "vault"
View Source
const Vsphere = "vsphere"

Variables

This section is empty.

Functions

func NewDefaultTypeList

func NewDefaultTypeList(config DefaultTypeListConfig) secret.TypeList

NewDefaultTypeList returns a TypeList with all default types.

Types

type AmazonType

type AmazonType struct {
	// Region is used for secret verification.
	Region string
}

func (AmazonType) Definition

func (AmazonType) Definition() secret.TypeDefinition

func (AmazonType) Name

func (AmazonType) Name() string

func (AmazonType) Validate

func (t AmazonType) Validate(data map[string]string) error

func (AmazonType) Verify

func (t AmazonType) Verify(data map[string]string) error

TODO: rewrite this function!

type AzureStorageAccountType

type AzureStorageAccountType struct{}

func (AzureStorageAccountType) Definition

func (AzureStorageAccountType) Name

func (AzureStorageAccountType) Public

func (AzureStorageAccountType) Public() bool

func (AzureStorageAccountType) Validate

func (t AzureStorageAccountType) Validate(data map[string]string) error

type AzureType

type AzureType struct{}

func (AzureType) Definition

func (AzureType) Definition() secret.TypeDefinition

func (AzureType) Name

func (AzureType) Name() string

func (AzureType) Validate

func (t AzureType) Validate(data map[string]string) error

func (AzureType) Verify

func (AzureType) Verify(data map[string]string) error

TODO: rewrite this function!

type CloudflareType

type CloudflareType struct{}

func (CloudflareType) Definition

func (CloudflareType) Definition() secret.TypeDefinition

func (CloudflareType) Name

func (CloudflareType) Name() string

func (CloudflareType) Validate

func (t CloudflareType) Validate(data map[string]string) error

type DefaultTypeListConfig

type DefaultTypeListConfig struct {
	AmazonRegion       string
	TLSDefaultValidity time.Duration
	PkeSecreter        PkeSecreter
}

DefaultTypeListConfig contains the required configuration for the default type list.

type DigitalOceanType

type DigitalOceanType struct{}

func (DigitalOceanType) Definition

func (DigitalOceanType) Definition() secret.TypeDefinition

func (DigitalOceanType) Name

func (DigitalOceanType) Name() string

func (DigitalOceanType) Validate

func (t DigitalOceanType) Validate(data map[string]string) error

type FnType

type FnType struct{}

func (FnType) Definition

func (FnType) Definition() secret.TypeDefinition

func (FnType) Name

func (FnType) Name() string

func (FnType) Validate

func (t FnType) Validate(data map[string]string) error

type GenericType

type GenericType struct{}

func (GenericType) Definition

func (GenericType) Definition() secret.TypeDefinition

func (GenericType) Name

func (GenericType) Name() string

func (GenericType) Validate

func (t GenericType) Validate(_ map[string]string) error

type GoogleType

type GoogleType struct{}

func (GoogleType) Definition

func (GoogleType) Definition() secret.TypeDefinition

func (GoogleType) Name

func (GoogleType) Name() string

func (GoogleType) Validate

func (t GoogleType) Validate(data map[string]string) error

func (GoogleType) Verify

func (GoogleType) Verify(data map[string]string) error

TODO: rewrite this function!

type HtpasswdType

type HtpasswdType struct{}

func (HtpasswdType) Definition

func (HtpasswdType) Definition() secret.TypeDefinition

func (HtpasswdType) Generate

func (t HtpasswdType) Generate(_ uint, _ string, data map[string]string, _ []string) (map[string]string, error)

func (HtpasswdType) Name

func (HtpasswdType) Name() string

func (HtpasswdType) Process

func (t HtpasswdType) Process(data map[string]string) (map[string]string, error)

func (HtpasswdType) Validate

func (t HtpasswdType) Validate(data map[string]string) error

Note: this will only require the username field.

func (HtpasswdType) ValidateNew

func (t HtpasswdType) ValidateNew(data map[string]string) (bool, error)

type KubernetesType

type KubernetesType struct{}

func (KubernetesType) Definition

func (KubernetesType) Definition() secret.TypeDefinition

func (KubernetesType) Name

func (KubernetesType) Name() string

func (KubernetesType) Process

func (t KubernetesType) Process(data map[string]string) (map[string]string, error)

func (KubernetesType) Validate

func (t KubernetesType) Validate(data map[string]string) error

func (KubernetesType) Verify

func (KubernetesType) Verify(data map[string]string) error

TODO: rewrite this function!

type PKEType

type PKEType struct {
	PkeSecreter PkeSecreter
}

func (PKEType) Cleanup

func (t PKEType) Cleanup(organizationID uint, _ map[string]string, tags []string) error

func (PKEType) Definition

func (PKEType) Definition() secret.TypeDefinition

func (PKEType) Generate

func (t PKEType) Generate(organizationID uint, _ string, _ map[string]string, tags []string) (map[string]string, error)

func (PKEType) Name

func (PKEType) Name() string

func (PKEType) Validate

func (t PKEType) Validate(_ map[string]string) error

PKE secret is always generated. It's always valid.

func (PKEType) ValidateNew

func (PKEType) ValidateNew(_ map[string]string) (bool, error)

PKE secret is always generated. It's always valid and incomplete.

type PagerDutyType

type PagerDutyType struct{}

func (PagerDutyType) Definition

func (PagerDutyType) Definition() secret.TypeDefinition

func (PagerDutyType) Name

func (PagerDutyType) Name() string

func (PagerDutyType) Validate

func (t PagerDutyType) Validate(data map[string]string) error

type PasswordType

type PasswordType struct{}

func (PasswordType) Definition

func (PasswordType) Definition() secret.TypeDefinition

func (PasswordType) Generate

func (t PasswordType) Generate(_ uint, _ string, data map[string]string, _ []string) (map[string]string, error)

func (PasswordType) Name

func (PasswordType) Name() string

func (PasswordType) Validate

func (t PasswordType) Validate(data map[string]string) error

Note: this will only require the username field.

func (PasswordType) ValidateNew

func (t PasswordType) ValidateNew(data map[string]string) (bool, error)

type PkeSecreter

type PkeSecreter interface {
	GeneratePkeSecret(organizationID uint, tags []string) (map[string]string, error)
	DeletePkeSecret(organizationID uint, tags []string) error
}

PkeSecreter is a temporary interface for splitting the PKE secret generation/deletion code from the legacy secret store.

type SSHType

type SSHType struct{}

func (SSHType) Definition

func (SSHType) Definition() secret.TypeDefinition

func (SSHType) Name

func (SSHType) Name() string

func (SSHType) Validate

func (t SSHType) Validate(data map[string]string) error

type SlackType

type SlackType struct{}

func (SlackType) Definition

func (SlackType) Definition() secret.TypeDefinition

func (SlackType) Name

func (SlackType) Name() string

func (SlackType) Validate

func (t SlackType) Validate(data map[string]string) error

type TLSType

type TLSType struct {
	DefaultValidity time.Duration
}

func (TLSType) Definition

func (TLSType) Definition() secret.TypeDefinition

func (TLSType) Generate

func (t TLSType) Generate(_ uint, _ string, data map[string]string, _ []string) (map[string]string, error)

func (TLSType) Name

func (TLSType) Name() string

func (TLSType) Validate

func (t TLSType) Validate(data map[string]string) error

Note: this will only require the TLS host field.

func (TLSType) ValidateNew

func (t TLSType) ValidateNew(data map[string]string) (bool, error)

TODO: this should determine incompleteness more reliably.

type VaultType

type VaultType struct{}

func (VaultType) Definition

func (VaultType) Definition() secret.TypeDefinition

func (VaultType) Name

func (VaultType) Name() string

func (VaultType) Validate

func (t VaultType) Validate(data map[string]string) error

type VsphereType

type VsphereType struct{}

func (VsphereType) Definition

func (VsphereType) Definition() secret.TypeDefinition

func (VsphereType) Name

func (VsphereType) Name() string

func (VsphereType) Validate

func (t VsphereType) Validate(data map[string]string) error

Jump to

Keyboard shortcuts

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