application

package
v0.0.0-...-71fc6e1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2015 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	RootPath     string
	Port         string
	DataStore    dataStore
	KeyGenerator keyGenerator
	GridHandler  http.Handler
}

func NewApplication

func NewApplication(config Config) (*Application, error)

func (*Application) Boot

func (a *Application) Boot() error

type Config

type Config struct {
	RootPath     string
	Port         string
	VCAPServices string
}

type GridData

type GridData []GridElement

type GridElement

type GridElement struct {
	Layout struct {
		Col   int
		Row   int
		SizeX int
		SizeY int
	}
	Content struct {
		URL string
	}
}

type GridHandler

type GridHandler struct {
	GridHTML     []byte
	DataStore    dataStore
	KeyGenerator keyGenerator
}

func (GridHandler) CloneHandler

func (g GridHandler) CloneHandler(w http.ResponseWriter, req *http.Request)

func (GridHandler) DataHandler

func (g GridHandler) DataHandler(w http.ResponseWriter, req *http.Request)

func (GridHandler) ServeHTTP

func (g GridHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)

type KeyGenerator

type KeyGenerator struct {
	DataStore dataStore
}

func (KeyGenerator) New

func (g KeyGenerator) New() (string, error)

type MemoryDataStore

type MemoryDataStore struct {
	// contains filtered or unexported fields
}

func NewMemoryDataStore

func NewMemoryDataStore() *MemoryDataStore

func (*MemoryDataStore) Get

func (s *MemoryDataStore) Get(key string) ([]byte, error)

func (*MemoryDataStore) Set

func (s *MemoryDataStore) Set(key string, val []byte) error

type RedisDataStore

type RedisDataStore struct {
	Host     string
	Password string
	// contains filtered or unexported fields
}

func (*RedisDataStore) Get

func (s *RedisDataStore) Get(key string) ([]byte, error)

func (*RedisDataStore) Initialize

func (s *RedisDataStore) Initialize() error

func (*RedisDataStore) Set

func (s *RedisDataStore) Set(key string, val []byte) error

Jump to

Keyboard shortcuts

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