internal

package
v0.0.0-...-398ddc3 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2017 License: GPL-3.0 Imports: 22 Imported by: 0

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

func NewAppStore(storeURL string, db *Database) *AppStore

NewAppStore is a service to fetch apps from the app store.

func (*AppStore) Start

func (store *AppStore) Start()

Start the app store monitor and caching service.

func (*AppStore) Stop

func (store *AppStore) Stop()

Stop the app store monitor and caching service.

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.

func NewClientHub

func NewClientHub() *ClientHub

NewClientHub returns a new ClientHub container.

func (*ClientHub) Start

func (hub *ClientHub) Start()

Start the client hub.

func (*ClientHub) Stop

func (hub *ClientHub) Stop()

Stop the client hub

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

func (*CommandProcessor) Start

func (cp *CommandProcessor) Start()

Start the command processor.

func (*CommandProcessor) Stop

func (cp *CommandProcessor) Stop()

Stop the command processor.

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.

func (*Database) Start

func (db *Database) Start()

Start the database service.

func (*Database) Stop

func (db *Database) Stop()

Stop the database service

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)

func (ProxyServer) Start

func (proxy ProxyServer) Start()

Start the proxy server.

func (ProxyServer) Stop

func (proxy ProxyServer) Stop()

Stop the proxy server

type User

type User struct {
	ID       string
	Email    string
	Password string
}

A User represents a user of the system.

type Viewer

type Viewer struct {
	ID    string `json:"uuid"`
	Email string `json:"email"`
	jwt.StandardClaims
}

Viewer represents the currently authenticated user.

Jump to

Keyboard shortcuts

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