config

package
v0.0.0-...-9046817 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2020 License: MIT Imports: 9 Imported by: 0

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(scwrcPath string) (*Config, error)

GetConfig returns the Scaleway CLI config file for the current user

func (*Config) Save

func (c *Config) Save(configPath string) error

Save write the config file

Jump to

Keyboard shortcuts

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