Documentation ¶
Index ¶
- Constants
- Variables
- func FileExists(fn string) bool
- func Init(s Settings) (err error)
- func Serve(s Settings) (err error)
- type APIError
- type Account
- type Asset
- type Broker
- type Checkpoint
- type Claims
- type Core
- type DetailModel
- type Detailer
- type ErrorPayload
- type Group
- type LoginResp
- type Message
- type Node
- type Pocket
- type Root
- type Setting
- type Settings
- type User
Constants ¶
View Source
const ( APITree = "/tree" APIDisplay = "/display" APIAccount = "/account" APICreate = "/create" APIUpdate = "/update" )
View Source
const ( CLIAgentID = "Geronimo CLI" NameStateDB = "state.db" NameJWTKey = "jwt-key" NameDBKey = "db-key" NameCLICookie = "cli-cookie" ExiprationMins = 60 GeronimoClientID = "Geronimo-Client-ID" )
View Source
const ( MessageOK = "OK" MessageError = "Error" MessageGUIClientCredentials = "GUIClientCredentials" MessageAccount = "Account" MessageCommandResponse = "CommandResponse" MessageGetTree = "GetState" MessageTree = "State" MessageWebServerError = "WebServerError" MessageAuthenticateUser = "AuthenticateUser" MessageUser = "UserWithSecret" MessageCreateUser = "CreateUser" MessageCreate = "Create" MessageUpdate = "Update" MessageGetDisplay = "GetDetail" MessageDisplay = "Display" )
View Source
const ( RoleUser = "user" RoleAdmin = "admin" )
View Source
const ( NodeRoot = iota NodeUser NodeAccount NodeBroker NodeGroup NodePocket )
View Source
const ( StatusActive = iota StatusDisabled )
View Source
const ( AuthLogin = "/login" AuthSignup = "/signup" )
View Source
const ( WSMsg_Credentials = "Credentials" WSMsg_Subscribe = "Subscribe" WSMsq_Unsubscribe = "Unsubscribe" WSMsg_Update = "Update" )
Variables ¶
View Source
var Assets = map[string]Asset{
"usd": {1, "USD", "USA Dollar"},
"eur": {2, "EUR", "Euro"},
"btc": {3, "BTC", "Bitcoin"},
"eth": {4, "ETH", "Ethereum"},
"ada": {5, "ADA", "Cardano"},
}
View Source
var StatusKinds = map[string]uint{ "active": StatusActive, "disabled": StatusDisabled, }
Functions ¶
func FileExists ¶
Types ¶
type Account ¶
type Account struct { DetailModel Exchange string APIPublicKey string APIPrivateKey string // contains filtered or unexported fields }
type Checkpoint ¶
type DetailModel ¶
Details are inmutable, the newest detail is always the current one. Because of this references to tree nodes are stored in the detail struct.
type ErrorPayload ¶
type Group ¶
type Group struct {
DetailModel
}
type Pocket ¶
type Pocket struct { DetailModel Holdings map[Asset]float64 // contains filtered or unexported fields }
type Root ¶
type Root struct {
DetailModel
}
Click to show internal directories.
Click to hide internal directories.