credential

package
v0.2.4-beta.2 Latest Latest
Warning

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

Go to latest
Published: May 2, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ATTRIBUTE_PASSWORD = "password"
View Source
const ATTRIBUTE_USERNAME = "username"
View Source
const ERR_ATTRIBUTE_NOT_EXIST = "sorry that attribute hasn't been set on this credential"
View Source
const ERR_FACTORY_MUST_BE_INITIALIZED = "sorry the factory must be created correctly before proceeding"
View Source
const ERR_FACTORY_PRIVATE_ATTEMPT_DEPLOY = "you have attempted to deploy environment variables but your factory is private"
View Source
const ERR_KEY_MUST_MATCH_REGEX = "sorry the key must only include numbers, letters and underscores [0-9A-Za-z_]"
View Source
const ERR_USERNAME_OR_PASSWORD_NOT_SET = "sorry you must set a username or password"
View Source
const REGEX_KEY_NAME = "(?m)^[0-9A-Za-z_]+$"

Variables

This section is empty.

Functions

This section is empty.

Types

type Credential

type Credential struct {
	Username    string `json:"username"`
	Password    string `json:"password"`
	Initialized bool   `json:"initialized"`

	Factory *factory.Factory
	// contains filtered or unexported fields
}

func Load

func Load(sourceFactory *factory.Factory) (*Credential, error)

func New

func New(credentialFactory *factory.Factory, username string, password string) (*Credential, error)

func (*Credential) DeployEnv

func (credential *Credential) DeployEnv() error

func (*Credential) GetAttribute

func (credential *Credential) GetAttribute(key string) (string, error)

func (*Credential) GetEnvironmentVariables

func (credential *Credential) GetEnvironmentVariables() []string

func (*Credential) Save

func (credential *Credential) Save() error

func (*Credential) SetAttribute

func (credential *Credential) SetAttribute(key string, value string) error

Jump to

Keyboard shortcuts

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