config

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2016 License: MIT Imports: 8 Imported by: 29

Documentation

Overview

Package config contains helpers to manage '~/.scwrc'

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigFilePath

func GetConfigFilePath() (string, error)

GetConfigFilePath returns the path to the Scaleway CLI config file

func GetHomeDir

func GetHomeDir() (string, error)

GetHomeDir returns the path to your home

Types

type Config

type Config struct {
	// Organization is the identifier of the Scaleway orgnization
	Organization string `json:"organization"`

	// Token is the authentication token for the Scaleway organization
	Token string `json:"token"`

	// Version is the actual version of scw
	Version string `json:"version"`
}

Config is a Scaleway CLI configuration file

func GetConfig

func GetConfig() (*Config, error)

GetConfig returns the Scaleway CLI config file for the current user

func (*Config) Save

func (c *Config) Save() error

Save write the config file

Jump to

Keyboard shortcuts

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