conoha

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Login

func Login(auth *ConfigAuth, token *ConfigToken) error

func Read

func Read(config *Config) error

func Refresh

func Refresh() error

func SshAdd

func SshAdd(name string, path string) error

func SshPath

func SshPath(name string) string

func SshRead

func SshRead(name string) (ssh.AuthMethod, error)

func TokenId

func TokenId() string

func Write

func Write(config *Config) error

Types

type Config

type Config struct {
	Auth  ConfigAuth
	Token ConfigToken
	Ssh   []ConfigSsh
}

type ConfigAuth

type ConfigAuth struct {
	User     string `toml:"username"`
	Pass     string `toml:"password"`
	TenantId string `toml:"tenant_id"`
}

type ConfigSsh

type ConfigSsh struct {
	Name string
	Path string
}

type ConfigToken

type ConfigToken struct {
	Id       string `json:"id" toml:"id"`
	IssuedAt string `json:"issued_at" toml:"issued_at"`
	Expires  string `json:"expires" toml:"expires"`
}

Jump to

Keyboard shortcuts

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