Documentation ¶
Index ¶
- Constants
- func AcmeProdLocation() string
- func AcmeTestLocation() string
- func ClonesLocation() string
- func DataDirLocation() string
- func DbLocation() string
- func DbLocationWithName(dbname string) string
- func DbSensorLocation() string
- func DbWithLocationWithName(location, dbname string) string
- func LogsLocation() string
- func NewRender(layout string, box *packr.Box) *render.Render
- func SensorCfgLocation() string
- func SensorClonesLocation() string
- func ServerCfgLocation() string
- func ServerClonesLocation() string
- func SessionLocation() string
- func SetupFileStructure(box *packr.Box) error
- func TmpDirLocation() string
- func UpdaterCfgLocation() string
- func Wd() string
- type App
- func (app *App) EndSession() error
- func (app *App) Fail(msg string)
- func (app *App) NotFound(msg string, err error)
- func (app *App) RestoreFlash()
- func (app *App) RestoreForm()
- func (app *App) RestoreState()
- func (app *App) RestoreURI()
- func (app *App) RestoreUser()
- func (app *App) Success(msg string)
- type Client
- type ClientMsg
- type Config
- type Crumb
- type Forms
- type Links
- type ServerHub
- type View
Constants ¶
View Source
const AppStateKey = "AppState"
View Source
const AssetsFolder = "static"
View Source
const FlashFail = "FlashFail"
View Source
const FlashSuccess = "FlashSuccess"
View Source
const FormStateKey = "FormState"
View Source
const SessionName = "_kushtaka"
View Source
const UserStateKey = "UserState"
View Source
const ViewStateKey = "ViewData"
Variables ¶
This section is empty.
Functions ¶
func AcmeProdLocation ¶
func AcmeProdLocation() string
func AcmeTestLocation ¶
func AcmeTestLocation() string
func ClonesLocation ¶
func ClonesLocation() string
func DataDirLocation ¶
func DataDirLocation() string
func DbLocation ¶
func DbLocation() string
func DbLocationWithName ¶
func DbSensorLocation ¶
func DbSensorLocation() string
func DbWithLocationWithName ¶
func LogsLocation ¶
func LogsLocation() string
func SensorCfgLocation ¶
func SensorCfgLocation() string
func SensorClonesLocation ¶
func SensorClonesLocation() string
func ServerCfgLocation ¶
func ServerCfgLocation() string
func ServerClonesLocation ¶
func ServerClonesLocation() string
func SessionLocation ¶
func SessionLocation() string
func SetupFileStructure ¶
SetupFileStructure makes sure the files on the file system are in the correct state if they are not, the application must fail
func TmpDirLocation ¶
func TmpDirLocation() string
func UpdaterCfgLocation ¶
func UpdaterCfgLocation() string
Types ¶
type App ¶
type App struct { Response http.ResponseWriter Request *http.Request DB *storm.DB Settings *models.Settings Session *sessions.Session FileStore *sessions.FilesystemStore Box *packr.Box View *View User *models.User Render *render.Render ServerHub *ServerHub Reboot chan bool LE chan models.LE }
func NewApp ¶
NewApp returns and instance of App App instances live during the lifecycle of a single http request
func (*App) EndSession ¶
func (*App) RestoreFlash ¶
func (app *App) RestoreFlash()
func (*App) RestoreForm ¶
func (app *App) RestoreForm()
func (*App) RestoreState ¶
func (app *App) RestoreState()
func (*App) RestoreURI ¶
func (app *App) RestoreURI()
func (*App) RestoreUser ¶
func (app *App) RestoreUser()
type Client ¶
type Client struct { SensorID int64 // contains filtered or unexported fields }
Client is a middleman between the websocket connection and the hub.
type Forms ¶
type ServerHub ¶
type ServerHub struct {
// contains filtered or unexported fields
}
ServerHub maintains the set of active clients and broadcasts messages to the clients.
func NewServerHub ¶
type View ¶
type View struct { FlashSuccess []string FlashFail []string Version string Date string Commit string URI string Crumbs []*Crumb User *models.User State *models.State Links *Links Forms *Forms LETests []models.LETest Clones []models.Clone Team *models.Team Teams []models.Team Token *models.Token Tokens []models.Token Sensor *models.Sensor Sensors []models.Sensor Users []models.User SensorServices []models.ServiceCfg Events []events.EventManager Pagi *helpers.Pagi }
View is built, rendered, and cleared every HTTP request
Click to show internal directories.
Click to hide internal directories.