Documentation ¶
Index ¶
- Constants
- Variables
- func AppHomePath() string
- func GetJar() (*cookiejar.Jar, error)
- func Login(credential *Credential) (*cookiejar.Jar, error)
- func LoginWithCredentialName(name string) (*cookiejar.Jar, error)
- func ParseLogLevelFlag()
- func RemoveToken(name string) error
- func RequestToken() error
- func SaveCredentialsFile(crs *CredentialsStore) (int, error)
- func SetTokenAsDefault(name string) error
- type Credential
- type CredentialsStore
- type Profile
- type ProfileOrganization
Constants ¶
const FALLBACK_PROFILE_NAME = "default"
FALLBACK_PROFILE_NAME
Variables ¶
var AddrFlag *string
var AssetDescriptorURL = "https://builder-assets.nebulant.app/assets.json"
AssetDescriptorURL conf
var BACKEND_ACCOUNT_HOST string = "account.nebulant.app"
BACKEND_ACCOUNT_HOST var
var BACKEND_API_HOST string = "api.nebulant.app"
BACKEND_API_HOST var
var BACKEND_AUTH_TOKEN = ""
BACKEND_AUTH_TOKEN conf
var BACKEND_COLLECTION_BLUEPRINT_LIST_PATH = "/v1/collection/%s/blueprint/" // %s coll-slug
var BACKEND_COLLECTION_LIST_PATH = "/v1/collection/"
var BACKEND_ENTRY_POINT_PATH = "/"
var BACKEND_GET_BLUEPRINT_PATH = "/v1/blueprint/%s/%s/content/" // coll-slug/bp-slug
var BACKEND_GET_BLUEPRINT_VERSION_PATH = "/v1/snapshot/%s/%s/%s/content/" // coll-slug/bp-slug/version
var BACKEND_ME_PATH = "/v1/me/"
var BACKEND_REQUEST_NEW_SSO_TOKEN_PATH = "/v1/sso/"
var BACKEND_SNAPSHOTS_LIST_PATH = "/v1/snapshot/%s/%s/" // coll-slug/bp-slug
var BACKEND_SSO_LOGIN_PATH = "/v1/sso/login/"
var BASE_SCHEME string = "https"
BASE_SCHEME var
var BRIDGE_ADDR = ""
Bridge addr
var BRIDGE_PORT = "16789"
Bridge port
var BRIDGE_SECRET = os.Getenv("NEBULANT_BRIDGE_SECRET")
Bridge secret
var BridgeAddrFlag *string
var BridgeCertPathFlag *string
var BridgeKeyPathFlag *string
var BridgeOrigin string = "https://bridge.nebulant.app"
BridgeOrigin var
var BridgeOriginFlag *string
var BridgeSecretFlag *string
var BridgeXtermRootPath *string
var BuildAssetIndexFlag *string
var ForceFileFlag *bool
var ForceUpgradeAssetsFlag *bool
var ForceUpgradeAssetsNoDownloadFlag *bool
var FrontOrigin string = "https://builder.nebulant.app"
FrontOrigin var
var FrontOriginPre string = "https://builder.nebulant.dev"
FrontOriginPre var
var FrontUrl string = "https://builder.nebulant.app"
FrontUrl var
var Ipv6Flag *bool
var LOAD_CONF_FILES = "true"
var LOGLEVEL int = base.InfoLevel
LOGLEVEL config. The default log level used at console logger and uiconsole init. Every log consumer should handle his own loglevel filter, so this is just the initial loglevel (default) or initial value setted by the user.
var LogLevelFlag *string
var DebugFlag *bool var ParanoicDebugFlag *bool
var LookupAssetFlag *string
var MARKETPLACE_GET_BLUEPRINT_PATH = "/blueprint/%s/%s/%s/content/" // org-slug/coll-slug/bp-slug
var MARKETPLACE_GET_BLUEPRINT_VERSION_PATH = "/snapshot/%s/%s/%s/%s/" // org-slug/coll-slug/bp-slug/version
var MARKET_API_HOST string = "marketplace.nebulant.app"
MARKET_API_HOST var
var NoTermFlag *bool
var PANEL_HOST string = "panel.nebulant.app"
PANEL_HOST var
var PANEL_SSO_TOKEN_VALIDATION_PATH = "/sso/%s"
var PROFILING bool = false
PROFILING conf
var SERVER_ADDR = "localhost"
Server addr
var SERVER_CERT = ""
Server cert file path
var SERVER_KEY = ""
Server key file path
var SERVER_PORT = "15678"
Server port
var ServerModeFlag *bool
var UpdateDescriptorURL string = "https://releases.nebulant.app/version.json"
UpdateDescriptorURL conf
var UpgradeAssetsFlag *bool
var Version = "DEV build"
Version var
var VersionCommit = ""
VersionCommit var
var VersionDate = ""
VersionDate var
var VersionFlag *bool
var VersionGo = ""
VersionGo var
var WSScheme string = "wss"
WSScheme var
Functions ¶
func AppHomePath ¶
func AppHomePath() string
func ParseLogLevelFlag ¶
func ParseLogLevelFlag()
func RemoveToken ¶
func RequestToken ¶
func RequestToken() error
func SaveCredentialsFile ¶
func SaveCredentialsFile(crs *CredentialsStore) (int, error)
func SetTokenAsDefault ¶
Types ¶
type Credential ¶
type Credential struct { // AuthToken.uuid Access *string `json:"uuid"` // pwd:ssh-rsa AuthToken *string `json:"auth_token"` // Denied bool `json:"denied"` }
Credential struct
var CREDENTIAL *Credential = &Credential{}
CREDENTIAL
func ReadCredential ¶
func ReadCredential(credentialName string) (*Credential, error)
ReadCredential func
type CredentialsStore ¶
type CredentialsStore struct { Version string `json:"version"` Credentials map[string]Credential `json:"credentials"` ActiveProfile string `json:"active_profile"` }
Ej:
{ "default": { "auth_token": "TOKENHASH" } }
Credentials struct
func ReadCredentialsFile ¶
func ReadCredentialsFile() (*CredentialsStore, error)
type Profile ¶
type Profile struct { Name string `json:"name"` Organization ProfileOrganization `json:"current_organization" validate:"required"` }
Profile struct
type ProfileOrganization ¶
type ProfileOrganization struct { Name *string `json:"name"` Slug string `json:"slug" validate:"required"` }
ProfileOrganization struct