Documentation ¶
Index ¶
- Constants
- Variables
- func FileExists(fn string) bool
- func Init(s Settings) (err error)
- func Serve(s Settings) error
- type APIError
- type Account
- type Broker
- type Checkpoint
- type Claims
- type Client
- type Core
- type Detail
- type DetailModel
- type ErrorPayload
- type LoginResp
- type Message
- type Node
- type Settings
- type User
Constants ¶
View Source
const ( APIAccount = "/account" APITree = "/tree" APIDetail = "/detail" )
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" MessageClientID = "ClientID" MessageCreateAccount = "CreateAccount" MessageAccount = "Account" MessageCommandResponse = "CommandResponse" MessageGetState = "GetState" MessageState = "State" MessageWebServerError = "WebServerError" MessageAuthenticateUser = "AuthenticateUser" MessageUser = "UserWithSecret" MessageCreateUser = "CreateUser" )
View Source
const ( NodeRoot = iota NodeUser NodeAccount NodeBroker )
View Source
const ( StatusActive = iota StatusDisabled )
View Source
const ( AuthLogin = "/login" AuthSignup = "/signup" )
View Source
const (
RoleUser = "user"
)
Variables ¶
View Source
var StatusKinds = map[string]uint{ "active": StatusActive, "disabled": StatusDisabled, }
Functions ¶
func FileExists ¶
Types ¶
type Account ¶
type Account struct { DetailModel APIPublicKey string APIPrivateKey string }
type Checkpoint ¶
type Core ¶
type Core struct {
// contains filtered or unexported fields
}
func (*Core) ParseToken ¶
type Detail ¶
type Detail interface{}
Details are only created, so the newest detail is always the current one. Because of this references to tree nodes are stored in the detail struct.
type DetailModel ¶
type ErrorPayload ¶
type Message ¶
type Message struct { Type string Payload interface{} `json:"-"` JSPayload json.RawMessage RespChan chan *Message `json:"-"` }
type Settings ¶
type Settings struct { LogLevel string `short:"l" long:"log-level" description:"logging level" default:"debug" choice:"info" choice:"debug"` WorkDir string `short:"w" long:"work-dir" description:"work directory" default-mask:"$HOME/.config/Geronimo"` HTTPAddr string `short:"A" long:"http-address" description:"http address" default:"localhost:8088"` UserEmail string `short:"u" long:"user-email" description:"user email address"` UserPassword string `short:"p" long:"user-password" description:"user password"` WSAddr string DBPath string JWTKeyPath string DBKeyPath string CLICookiePath string }
Click to show internal directories.
Click to hide internal directories.