config

package
v0.5.1-beta-hotfix1 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const FALLBACK_PROFILE_NAME = "default"

FALLBACK_PROFILE_NAME

Variables

View Source
var AddrFlag *string
View Source
var AssetDescriptorURL = "https://builder-assets.nebulant.app/assets.json"

AssetDescriptorURL conf

View Source
var BACKEND_ACCOUNT_HOST string = "account.nebulant.app"

BACKEND_ACCOUNT_HOST var

View Source
var BACKEND_API_HOST string = "api.nebulant.app"

BACKEND_API_HOST var

View Source
var BACKEND_AUTH_TOKEN = ""

BACKEND_AUTH_TOKEN conf

View Source
var BACKEND_COLLECTION_BLUEPRINT_LIST_PATH = "/v1/collection/%s/blueprint/" // %s coll-slug
View Source
var BACKEND_COLLECTION_LIST_PATH = "/v1/collection/"
View Source
var BACKEND_ENTRY_POINT_PATH = "/"
View Source
var BACKEND_GET_BLUEPRINT_PATH = "/v1/blueprint/%s/%s/content/" // coll-slug/bp-slug
View Source
var BACKEND_GET_BLUEPRINT_VERSION_PATH = "/v1/snapshot/%s/%s/%s/content/" // coll-slug/bp-slug/version
View Source
var BACKEND_ME_PATH = "/v1/me/"
View Source
var BACKEND_REQUEST_NEW_SSO_TOKEN_PATH = "/v1/sso/"
View Source
var BACKEND_SNAPSHOTS_LIST_PATH = "/v1/snapshot/%s/%s/" // coll-slug/bp-slug
View Source
var BACKEND_SSO_LOGIN_PATH = "/v1/sso/login/"
View Source
var BASE_SCHEME string = "https"

BASE_SCHEME var

View Source
var BRIDGE_ADDR = ""

Bridge addr

View Source
var BRIDGE_PORT = "16789"

Bridge port

View Source
var BRIDGE_SECRET = os.Getenv("NEBULANT_BRIDGE_SECRET")

Bridge secret

View Source
var BridgeAddrFlag *string
View Source
var BridgeCertPathFlag *string
View Source
var BridgeKeyPathFlag *string
View Source
var BridgeOrigin string = "https://bridge.nebulant.app"

BridgeOrigin var

View Source
var BridgeOriginFlag *string
View Source
var BridgeSecretFlag *string
View Source
var BridgeXtermRootPath *string
View Source
var BuildAssetIndexFlag *string
View Source
var ForceFileFlag *bool
View Source
var ForceUpgradeAssetsFlag *bool
View Source
var ForceUpgradeAssetsNoDownloadFlag *bool
View Source
var FrontOrigin string = "https://builder.nebulant.app"

FrontOrigin var

View Source
var FrontOriginPre string = "https://builder.nebulant.dev"

FrontOriginPre var

View Source
var FrontUrl string = "https://builder.nebulant.app"

FrontUrl var

View Source
var Ipv6Flag *bool
View Source
var LOAD_CONF_FILES = "true"
View Source
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.

View Source
var LogLevelFlag *string

var DebugFlag *bool var ParanoicDebugFlag *bool

View Source
var LookupAssetFlag *string
View Source
var MARKETPLACE_GET_BLUEPRINT_PATH = "/blueprint/%s/%s/%s/content/" // org-slug/coll-slug/bp-slug
View Source
var MARKETPLACE_GET_BLUEPRINT_VERSION_PATH = "/snapshot/%s/%s/%s/%s/" // org-slug/coll-slug/bp-slug/version
View Source
var MARKET_API_HOST string = "marketplace.nebulant.app"

MARKET_API_HOST var

View Source
var NoTermFlag *bool
View Source
var PANEL_HOST string = "panel.nebulant.app"

PANEL_HOST var

View Source
var PANEL_SSO_TOKEN_VALIDATION_PATH = "/sso/%s"
View Source
var PROFILING bool = false

PROFILING conf

View Source
var SERVER_ADDR = "localhost"

Server addr

View Source
var SERVER_CERT = ""

Server cert file path

View Source
var SERVER_KEY = ""

Server key file path

View Source
var SERVER_PORT = "15678"

Server port

View Source
var ServerModeFlag *bool
View Source
var UpdateDescriptorURL string = "https://releases.nebulant.app/version.json"

UpdateDescriptorURL conf

View Source
var UpgradeAssetsFlag *bool
View Source
var Version = "DEV build"

Version var

View Source
var VersionCommit = ""

VersionCommit var

View Source
var VersionDate = ""

VersionDate var

View Source
var VersionFlag *bool
View Source
var VersionGo = ""

VersionGo var

View Source
var WSScheme string = "wss"

WSScheme var

Functions

func AppHomePath

func AppHomePath() string

func GetJar

func GetJar() (*cookiejar.Jar, error)

func Login

func Login(credential *Credential) (*cookiejar.Jar, error)

func LoginWithCredentialName

func LoginWithCredentialName(name string) (*cookiejar.Jar, error)

func ParseLogLevelFlag

func ParseLogLevelFlag()

func RemoveToken

func RemoveToken(name string) error

func RequestToken

func RequestToken() error

func SaveCredentialsFile

func SaveCredentialsFile(crs *CredentialsStore) (int, error)

func SetTokenAsDefault

func SetTokenAsDefault(name string) error

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

var PROFILE *Profile = nil

PROFILE

type ProfileOrganization

type ProfileOrganization struct {
	Name *string `json:"name"`
	Slug string  `json:"slug" validate:"required"`
}

ProfileOrganization struct

Jump to

Keyboard shortcuts

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