Documentation ¶
Index ¶
Constants ¶
View Source
const (
LOGIN_PATH = "/login"
)
Variables ¶
View Source
var (
ErrEmptyToken = errors.New("auth: You must be logged in. Please use `gemnasium auth login` first, or pass your api token with --token or GEMNASIUM_TOKEN")
)
Error codes returned by auth failures
Functions ¶
func ConfigureAPIToken ¶
Try to get credential from 3 sources (in that exact order): - from netrc file - local config file (ie: .gemnasium.yml), with a `api_key` yaml key - from command line flag `token`
Each source will override previous one (token flag has priority above all).
WARNING: Directly exit the programm in case of error
func Login ¶
func Login() error
Login with the user email and password An entry will be created in ~/.netrc on successful login.
func LoginWithAPIToken ¶
Login with the user email and API token An entry will be created in ~/.netrc on successful login.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.