credential

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2020 License: Apache-2.0 Imports: 11 Imported by: 13

Documentation

Index

Constants

View Source
const (
	AWSRegion            = "region"
	AWSAccessKeyID       = "accessKeyID"
	AWSSecretAccessKey   = "secretAccessKey"
	AzureClientID        = "clientID"
	AzureClientSecret    = "clientSecret"
	AzureStorageAccount  = "account"
	AzureStorageKey      = "key"
	AzureSubscriptionID  = "subscriptionID"
	AzureTenantID        = "tenantID"
	DigitalOceanToken    = "token"
	GCEServiceAccount    = "serviceAccount"
	GCEProjectID         = "projectID"
	HertznerPassword     = "password"
	HertznerUsername     = "username"
	LinodeAPIToken       = "token"
	PacketAPIKey         = "apiKey"
	PacketProjectID      = "projectID"
	ScalewayOrganization = "organization"
	ScalewayToken        = "token"
	SoftlayerAPIKey      = "apiKey"
	SoftlayerUsername    = "username"
	SwiftUsername        = "username"
	SwiftKey             = "key"
	SwiftTenantName      = "tenantName"
	SwiftTenantAuthURL   = "tenantAuthURL"
	SwiftDomain          = "domain"
	SwiftRegion          = "region"
	SwiftTenantId        = "tenantID"
	SwiftTenantDomain    = "tenantDomain"
	SwiftTrustId         = "trustID"
	SwiftStorageURL      = "storageURL"
	SwiftAuthToken       = "authToken"
	VultrAPIToken        = "token"
	OvhUsername          = "username"
	OvhPassword          = "password"
	OvhTenantID          = "tenantID"
)

Variables

This section is empty.

Functions

func GetFormat

func GetFormat(provider string) v1.CredentialFormat

Types

type AWS

type AWS struct {
	CommonSpec
	// contains filtered or unexported fields
}

func NewAWS

func NewAWS() *AWS

func (AWS) AccessKeyID

func (c AWS) AccessKeyID() string

func (*AWS) AddFlags

func (c *AWS) AddFlags(fs *pflag.FlagSet)

func (AWS) Format

func (c AWS) Format() v1.CredentialFormat

func (AWS) IsValid

func (c AWS) IsValid() (bool, error)

func (*AWS) Load

func (c *AWS) Load(filename string) error

func (*AWS) LoadFromEnv

func (c *AWS) LoadFromEnv()

func (AWS) Region

func (c AWS) Region() string

func (AWS) RequiredFlags

func (c AWS) RequiredFlags() []string

func (AWS) SecretAccessKey

func (c AWS) SecretAccessKey() string

type Azure

type Azure struct {
	CommonSpec
	// contains filtered or unexported fields
}

func (*Azure) AddFlags

func (c *Azure) AddFlags(fs *pflag.FlagSet)

func (Azure) ClientID

func (c Azure) ClientID() string

func (Azure) ClientSecret

func (c Azure) ClientSecret() string

func (Azure) Format

func (_ Azure) Format() v1.CredentialFormat

func (Azure) IsValid

func (c Azure) IsValid() (bool, error)

func (*Azure) LoadFromEnv

func (c *Azure) LoadFromEnv()

func (Azure) RequiredFlags

func (_ Azure) RequiredFlags() []string

func (Azure) SubscriptionID

func (c Azure) SubscriptionID() string

func (Azure) TenantID

func (c Azure) TenantID() string

type AzureStorage

type AzureStorage struct {
	CommonSpec
	// contains filtered or unexported fields
}

func (AzureStorage) Account

func (c AzureStorage) Account() string

func (*AzureStorage) AddFlags

func (c *AzureStorage) AddFlags(fs *pflag.FlagSet)

func (AzureStorage) Format

func (_ AzureStorage) Format() v1.CredentialFormat

func (AzureStorage) Key

func (c AzureStorage) Key() string

func (AzureStorage) RequiredFlags

func (_ AzureStorage) RequiredFlags() []string

type CommonSpec

type CommonSpec api.CredentialSpec

func LoadCredentialDataFromJson

func LoadCredentialDataFromJson(provider string, fileName string) (CommonSpec, error)

func (CommonSpec) IsValid

func (c CommonSpec) IsValid(cf v1.CredentialFormat) (bool, error)

func (*CommonSpec) Load

func (c *CommonSpec) Load(filename string) error

func (*CommonSpec) LoadFromEnv

func (c *CommonSpec) LoadFromEnv(cf v1.CredentialFormat)

func (*CommonSpec) LoadFromJSON

func (c *CommonSpec) LoadFromJSON(filename string) error

func (CommonSpec) String

func (c CommonSpec) String() string

func (CommonSpec) ToMaskedMap

func (c CommonSpec) ToMaskedMap() map[string]string

func (CommonSpec) ToRawMap

func (c CommonSpec) ToRawMap() map[string]string

type DigitalOcean

type DigitalOcean struct {
	CommonSpec
	// contains filtered or unexported fields
}

func (*DigitalOcean) AddFlags

func (c *DigitalOcean) AddFlags(fs *pflag.FlagSet)

func (DigitalOcean) Format

func (_ DigitalOcean) Format() v1.CredentialFormat

func (DigitalOcean) IsValid

func (c DigitalOcean) IsValid() (bool, error)

func (*DigitalOcean) LoadFromEnv

func (c *DigitalOcean) LoadFromEnv()

func (DigitalOcean) RequiredFlags

func (c DigitalOcean) RequiredFlags() []string

func (DigitalOcean) Token

func (c DigitalOcean) Token() string

type GCE

type GCE struct {
	CommonSpec
	// contains filtered or unexported fields
}

func NewGCE

func NewGCE() *GCE

func (*GCE) AddFlags

func (c *GCE) AddFlags(fs *pflag.FlagSet)

func (GCE) Format

func (_ GCE) Format() v1.CredentialFormat

func (GCE) IsValid

func (c GCE) IsValid() (bool, error)

func (*GCE) Load

func (c *GCE) Load(filename string) error

func (*GCE) LoadFromEnv

func (c *GCE) LoadFromEnv()

func (GCE) ProjectID

func (c GCE) ProjectID() string

func (GCE) RequiredFlags

func (_ GCE) RequiredFlags() []string

func (GCE) ServiceAccount

func (c GCE) ServiceAccount() string

type Hetzner

type Hetzner struct {
	CommonSpec
}

func (Hetzner) Password

func (c Hetzner) Password() string

func (Hetzner) Username

func (c Hetzner) Username() string

type Linode

type Linode struct {
	CommonSpec
	// contains filtered or unexported fields
}

func (Linode) APIToken

func (c Linode) APIToken() string

func (*Linode) AddFlags

func (c *Linode) AddFlags(fs *pflag.FlagSet)

func (Linode) Format

func (_ Linode) Format() v1.CredentialFormat

func (Linode) IsValid

func (c Linode) IsValid() (bool, error)

func (*Linode) LoadFromEnv

func (c *Linode) LoadFromEnv()

func (Linode) RequiredFlags

func (_ Linode) RequiredFlags() []string

type Ovh

type Ovh struct {
	CommonSpec
}

func (Ovh) Password

func (c Ovh) Password() string

func (Ovh) TenantID

func (c Ovh) TenantID() string

func (Ovh) Username

func (c Ovh) Username() string

type Packet

type Packet struct {
	CommonSpec
	// contains filtered or unexported fields
}

func (Packet) APIKey

func (c Packet) APIKey() string

func (*Packet) AddFlags

func (c *Packet) AddFlags(fs *pflag.FlagSet)

func (Packet) Format

func (_ Packet) Format() v1.CredentialFormat

func (Packet) IsValid

func (c Packet) IsValid() (bool, error)

func (*Packet) LoadFromEnv

func (c *Packet) LoadFromEnv()

func (Packet) ProjectID

func (c Packet) ProjectID() string

func (Packet) RequiredFlags

func (_ Packet) RequiredFlags() []string

type Scaleway

type Scaleway struct {
	CommonSpec
	// contains filtered or unexported fields
}

func (*Scaleway) AddFlags

func (c *Scaleway) AddFlags(fs *pflag.FlagSet)

func (Scaleway) Format

func (_ Scaleway) Format() v1.CredentialFormat

func (Scaleway) IsValid

func (c Scaleway) IsValid() (bool, error)

func (*Scaleway) LoadFromEnv

func (c *Scaleway) LoadFromEnv()

func (Scaleway) Organization

func (c Scaleway) Organization() string

func (Scaleway) RequiredFlags

func (_ Scaleway) RequiredFlags() []string

func (Scaleway) Token

func (c Scaleway) Token() string

type Softlayer

type Softlayer struct {
	CommonSpec
}

func (Softlayer) APIKey

func (c Softlayer) APIKey() string

func (Softlayer) Username

func (c Softlayer) Username() string

type Swift

type Swift struct {
	CommonSpec
}

func (Swift) AuthToken

func (c Swift) AuthToken() string

func (Swift) Domain

func (c Swift) Domain() string

func (Swift) Key

func (c Swift) Key() string

func (Swift) Region

func (c Swift) Region() string

func (Swift) StorageURL

func (c Swift) StorageURL() string

func (Swift) TenantAuthURL

func (c Swift) TenantAuthURL() string

func (Swift) TenantDomain

func (c Swift) TenantDomain() string

func (Swift) TenantId

func (c Swift) TenantId() string

func (Swift) TenantName

func (c Swift) TenantName() string

func (Swift) TrustId

func (c Swift) TrustId() string

func (Swift) Username

func (c Swift) Username() string

type Vultr

type Vultr struct {
	CommonSpec
	// contains filtered or unexported fields
}

func (*Vultr) AddFlags

func (c *Vultr) AddFlags(fs *pflag.FlagSet)

func (Vultr) Format

func (_ Vultr) Format() v1.CredentialFormat

func (Vultr) IsValid

func (c Vultr) IsValid() (bool, error)

func (*Vultr) LoadFromEnv

func (c *Vultr) LoadFromEnv()

func (Vultr) RequiredFlags

func (_ Vultr) RequiredFlags() []string

func (Vultr) Token

func (c Vultr) Token() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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