setup

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateHomeDir

func CreateHomeDir(sysHomeDir, DefaultOnfDir string) (onfHomeDir string)

func Flow

func Flow(section string, baseURL string)

func NewCmd

func NewCmd() *cobra.Command

func PersistentCredential

func PersistentCredential(credential *CredentialConfig)

Types

type Credential

type Credential struct {
	AccessKey   string `ini:"onf_access_key" header:"onf_access_key"`
	SecretKey   string `ini:"onf_secret_key" header:"onf_secret_key"`
	WorkspaceID uint64 `ini:"default_workspace" header:"default_workspace"`
}

type CredentialConfig

type CredentialConfig struct {
	Section    string
	Credential *Credential
}

type CredentialFile

type CredentialFile struct {
	CredentialFileName  string
	CredentialsFileType string
}

func (*CredentialFile) CreateCredentialFileAt

func (cf *CredentialFile) CreateCredentialFileAt(onfHomeDir string) (onfCredentialFile string, err error)

func (*CredentialFile) GetAllSetup

func (cf *CredentialFile) GetAllSetup() []*CredentialConfig

func (*CredentialFile) GetCredentialPath

func (cf *CredentialFile) GetCredentialPath(onfHomeDir string) (onfCredentialFile string)

func (*CredentialFile) IsExistAtOnfAtHomeDir

func (cf *CredentialFile) IsExistAtOnfAtHomeDir() bool

Jump to

Keyboard shortcuts

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