Documentation ¶
Overview ¶
Package cli provides the CLI client, i.e. the `otf` binary.
Index ¶
Constants ¶
View Source
const (
CredentialsPath = ".terraform.d/credentials.tfrc.json"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CLI ¶
type CLI struct {
// contains filtered or unexported fields
}
CLI is the `otf` cli application
type CredentialsConfig ¶
type CredentialsConfig struct {
Credentials map[string]TokenConfig `json:"credentials"`
}
type CredentialsStore ¶
type CredentialsStore string
CredentialsStore is a JSON file in a user's home dir that stores tokens for one or more TFE-type hosts
func NewCredentialsStore ¶
func NewCredentialsStore() (CredentialsStore, error)
NewCredentialsStore is a contructor for CredentialsStore
func (CredentialsStore) Load ¶
func (c CredentialsStore) Load(hostname string) (string, error)
Load retrieves the token for hostname
func (CredentialsStore) Save ¶
func (c CredentialsStore) Save(hostname, token string) error
Save saves the token for the given hostname to the store, overwriting any existing tokens for the hostname.
type TokenConfig ¶
type TokenConfig struct {
Token string `json:"token"`
}
Click to show internal directories.
Click to hide internal directories.