helper

package
v0.0.0-...-28791c3 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2020 License: Apache-2.0, MIT Imports: 8 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateConfFile

func CreateConfFile()

func DecodeAccessToken

func DecodeAccessToken(accessToken string) (tokenJSON []byte, err error)

func Exists

func Exists(path string) bool

func GetAccessToken

func GetAccessToken(file []byte) string

func GetApiEndpoint

func GetApiEndpoint(file []byte) string

func GetHomeDir

func GetHomeDir() string

func GetLoginEndpoint

func GetLoginEndpoint(file []byte) string

func GetOrgName

func GetOrgName(file []byte) string

func GetRefreshToken

func GetRefreshToken(file []byte) string

func GetSpaceGUID

func GetSpaceGUID(file []byte) string

func GetSpaceName

func GetSpaceName(file []byte) string

func ReadConfigJsonFile

func ReadConfigJsonFile() []byte

Types

type Config

type Config struct {
	RefreshToken          string
	AccessToken           string
	SpaceFields           SpaceField
	OrganizationFields    OrgField
	Target                string
	AuthorizationEndpoint string
}

type Field1Type

type Field1Type struct {
	Msg string
}

type FieldsType

type FieldsType struct {
	Msg string
}

type OrgField

type OrgField struct {
	GUID string
	Name string
}

type SpaceField

type SpaceField struct {
	GUID string
	Name string
}

type Test1

type Test1 struct {
	Msg    string
	Field1 Field1Type
	Fields []FieldsType
}

type TokenInfo

type TokenInfo struct {
	Username string   `json:"user_name"`
	Email    string   `json:"email"`
	UserGUID string   `json:"user_id"`
	GUID     string   `json:"GUID"`
	Scope    []string //`json:"scope":["cloud_controller.read","password.write","cloud_controller.write","openid","uaa.user"]`
}

func NewTokenInfo

func NewTokenInfo(accessToken string) (info TokenInfo)

this code taken from cf cli source code source

Jump to

Keyboard shortcuts

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