tokens

package
v0.17.5 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoginInquiry

func LoginInquiry() (string, string, string, error)

func OutputCectlTOML

func OutputCectlTOML(config Config, token Token)

OutputCectlTOML outputs TOML

func OutputPostmanEnvJSON

func OutputPostmanEnvJSON(config Config, token Token) error

OutputPostmanEnvJSON outputs JSON for a Postman Environment file

Types

type Config

type Config struct {
	Username    string `survey:"un"`
	Environment string `survey:"env"`
	Password    string `survey:"pwd"`
	Output      string
}

Config holds the CE configuration info

type PostmanEnvironment

type PostmanEnvironment struct {
	Name   string                    `json:"name"`
	Values []PostmanEnvironmentValue `json:"values"`
}

PostmanEnvironment is a structure for a Postman Environment json config

type PostmanEnvironmentValue

type PostmanEnvironmentValue struct {
	Enabled bool   `json:"enabled"`
	Key     string `json:"key"`
	Value   string `json:"value"`
	Type    string `json:"type"`
}

PostmanEnvironmentValue is a value for a Postman Environment json config

type Token

type Token struct {
	User         string `json:"userSecret"`
	Organization string `json:"organizationSecret"`
}

Token is a temp structure for a Cloud Elements token

func ObtainCEToken

func ObtainCEToken(config Config) (Token, error)

ObtainCEToken returns a Token struct given a Config struct

Jump to

Keyboard shortcuts

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