get-token

command module
v0.0.0-...-1490762 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2022 License: MPL-2.0 Imports: 8 Imported by: 0

README

get-token

get-token is a CLI utility that can be used to obtain vpsAdmin authentication token for use with the terraform provider.

Build

$ go build -o get-token

Usage

$ get-token --help
Usage:
  ./get-token [options] [api url]

Options:
  -interval int
        How long should the token be valid, in seconds (default 3600)
  -lifetime string
        Token lifetime (default "renewable_auto")
  -tfvars string
        Write the token to a dedicated .tfvars file
  -user string
        User name

The API URL defaults to https://api.vpsfree.cz.

Without any parameters, the program will return a token which will be valid for one hour, or an hour since it was last used for authentication.

Possible token lifetimes are:

  • fixed
  • renewable_manual
  • renewable_auto
  • permanent

get-token can also write the token to a tfvars file for use with terraform:

$ get-token -tfvars ../examples/token.auto.tfvars

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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