Documentation ¶
Index ¶
- Constants
- Variables
- func CheckLoggedIn() error
- func EnvNameFromUrl(url string) string
- func GetWhoami(ctx context.Context) (*tensorleapapi.UserData, error)
- func IsApiBaseUrlSet() bool
- func IsLocalUrl(url string) bool
- func Login(env *Env) (err error)
- func Logout(envName string) error
- func PrintWhoami(ctx context.Context) error
- func SelectAndSetEnv(envName string) error
- type Env
Constants ¶
View Source
const ( API_URL = "api_url" API_KEY = "api_key" ENV_NAME = "name" ENVIRONMENTS_CONFIG_PATH = "envs" AUTH_CONFIG_PATH = "auth" CURRENT_ENV = "current_env" )
Variables ¶
View Source
var ( // just for backward compatibility, will use just current_env and envs in the future API_KEY_CONFIG_PATH = getAuthPath(API_KEY) API_URL_CONFIG_PATH = getAuthPath(API_URL) )
View Source
var ErrNotLoggedIn = fmt.Errorf("not logged in")
Functions ¶
func CheckLoggedIn ¶
func CheckLoggedIn() error
func EnvNameFromUrl ¶ added in v0.0.43
func GetWhoami ¶ added in v0.0.43
func GetWhoami(ctx context.Context) (*tensorleapapi.UserData, error)
func IsApiBaseUrlSet ¶
func IsApiBaseUrlSet() bool
func IsLocalUrl ¶ added in v0.0.45
func PrintWhoami ¶ added in v0.0.43
func SelectAndSetEnv ¶ added in v0.0.43
Types ¶
type Env ¶ added in v0.0.43
func GetCurrentEnv ¶ added in v0.0.43
func GetCurrentEnv() *Env
func GetEnvAuth ¶ added in v0.0.43
func (*Env) AuthContext ¶ added in v0.0.43
Click to show internal directories.
Click to hide internal directories.