Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppStore ¶
type AppStore struct {
// contains filtered or unexported fields
}
AppStore manages the current state of app store synchronization.
func NewAppStore ¶
NewAppStore is a service to fetch apps from the app store.
type Applications ¶
type Applications struct { InstalledApps []*InstalledApp `json:"applications"` // contains filtered or unexported fields }
Applications represents a collection of installed apps.
type ClientHub ¶
type ClientHub struct {
// contains filtered or unexported fields
}
ClientHub is a container for authenticated websocket connections.
type CommandProcessor ¶
type CommandProcessor struct {
// contains filtered or unexported fields
}
CommandProcessor contains the state for running serialized commands.
func NewCommandProcessor ¶
func NewCommandProcessor(appDir string, database *Database, clients *ClientHub) *CommandProcessor
NewCommandProcessor returns a processor for running serialized, side-effect commmands
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
Database represents the abstraction for storing application data.
func NewDatabase ¶
func NewDatabase() *Database
NewDatabase returns a database abstraction for storing application data.
type InstalledApp ¶
type InstalledApp struct { XRN string `json:"xrn"` Name string `json:"name"` Description string `json:"description"` Version string `json:"version"` Date string `json:"date"` Author string `json:"author"` Icon string `json:"icon"` Context string `json:"context"` }
An InstalledApp represents an application installed locally (either stock or from the store).
type ProxyServer ¶
type ProxyServer struct { Applications *Applications Database *Database Routes routeMap RootAppHandler http.Handler StaticHandler http.Handler Checker *time.Ticker // contains filtered or unexported fields }
ProxyServer represents a running server and all its depenendent resources.
func NewProxyServer ¶
func NewProxyServer(appDir, hostDir string, database *Database, commander *CommandProcessor, clients *ClientHub) ProxyServer
NewProxyServer represents a running server and all its depenendent resources.
func (ProxyServer) AddRoute ¶
func (proxy ProxyServer) AddRoute(context, host string)
AddRoute adds a context router to a backend server.
func (ProxyServer) ServeHTTP ¶
func (proxy ProxyServer) ServeHTTP(w http.ResponseWriter, r *http.Request)