...

Package tokens

import "golang.conradwood.net/go-easyops/tokens"
Overview
Index

Overview ▾

mostly deprecated. internal use only.

Constants

const (
    METANAME = "goeasyops_meta" // marshaled proto

)

func DISContext2WithTokenAndTimeout

func DISContext2WithTokenAndTimeout(seconds uint64) (context.Context, context.CancelFunc)

this function is deprecated, obsolete and broken. use authremote.Context() instead

func DISContextWithToken

func DISContextWithToken() context.Context

this builds a *NEW* token (detached from previous contexts) if there is neither a -token parameter nor a user token it will look at Environment variable GE_CTX and deserialise it this function is deprecated, obsolete and broken. use authremote.Context() instead

func DISContextWithTokenAndTimeout

func DISContextWithTokenAndTimeout(seconds uint64) context.Context

this function is deprecated, obsolete and broken. use authremote.Context() instead

func DisableUserToken

func DisableUserToken()

func GetCloudName

func GetCloudName() string

func GetServiceTokenParameter

func GetServiceTokenParameter() string

func GetUserTokenParameter

func GetUserTokenParameter() string

get a usertoken parameter from:

1. GE_USERTOKEN

2. ~/.go-easyops/user_token

if ge_disable_user_token is true, return "" (empty string)

if GE_TOKEN is set, does not read file (but honour GE_USERTOKEN)

func SaveUserToken

func SaveUserToken(token string) error

func SetCloudName

func SetCloudName(xcloudname string)

func SetServiceTokenParameter

func SetServiceTokenParameter(tok string)