Documentation ¶
Overview ¶
Package server generated by go-bindata.// sources: web/static/favicon.png web/static/fonts/Roboto-Black.ttf web/static/fonts/Roboto-BlackItalic.ttf web/static/fonts/Roboto-Bold.ttf web/static/fonts/Roboto-BoldItalic.ttf web/static/fonts/Roboto-Italic.ttf web/static/fonts/Roboto-Light.ttf web/static/fonts/Roboto-LightItalic.ttf web/static/fonts/Roboto-Medium.ttf web/static/fonts/Roboto-MediumItalic.ttf web/static/fonts/Roboto-Regular.ttf web/static/fonts/Roboto-Thin.ttf web/static/fonts/Roboto-ThinItalic.ttf web/static/jquery.min.js web/static/jquery.simple.websocket.js web/static/roboto.css web/static/script.js web/static/semantic/semantic.min.css web/static/semantic/semantic.min.js web/static/semantic/themes/default/assets/fonts/brand-icons.eot web/static/semantic/themes/default/assets/fonts/brand-icons.svg web/static/semantic/themes/default/assets/fonts/brand-icons.ttf web/static/semantic/themes/default/assets/fonts/brand-icons.woff web/static/semantic/themes/default/assets/fonts/brand-icons.woff2 web/static/semantic/themes/default/assets/fonts/icons.eot web/static/semantic/themes/default/assets/fonts/icons.otf web/static/semantic/themes/default/assets/fonts/icons.svg web/static/semantic/themes/default/assets/fonts/icons.ttf web/static/semantic/themes/default/assets/fonts/icons.woff web/static/semantic/themes/default/assets/fonts/icons.woff2 web/static/semantic/themes/default/assets/fonts/outline-icons.eot web/static/semantic/themes/default/assets/fonts/outline-icons.svg web/static/semantic/themes/default/assets/fonts/outline-icons.ttf web/static/semantic/themes/default/assets/fonts/outline-icons.woff web/static/semantic/themes/default/assets/fonts/outline-icons.woff2 web/static/semantic/themes/default/assets/images/flags.png web/static/style.css web/static/thor.png web/static/thor.svg web/templates/configure.html web/templates/footer.html web/templates/forgot.html web/templates/header.html web/templates/index.html web/templates/profile/connect.html web/templates/profile/delete.html web/templates/settings.html web/templates/signin.html web/templates/user/delete.html web/templates/user/edit.html
Index ¶
- Constants
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func Logger(logger log.FieldLogger, notLogged ...string) gin.HandlerFunc
- func MustAsset(name string) []byte
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- type ApiResult
- type BinFileSystem
- type RegistrationRequest
- type Result
- type Search
- type Server
- func (server *Server) AddDevices(c *gin.Context)
- func (server *Server) AddShaSum(c *gin.Context)
- func (server *Server) AdminQR(c *gin.Context)
- func (server *Server) Configure(c *gin.Context)
- func (server *Server) Decrypt(c *gin.Context)
- func (server *Server) Error(c *gin.Context, code int, err error)
- func (server *Server) Index(c *gin.Context)
- func (server *Server) Init() bool
- func (server *Server) Register(c *gin.Context)
- func (server *Server) RequireAccount(c *gin.Context)
- func (server *Server) Rotate(c *gin.Context)
- func (server *Server) Run() int
- func (server *Server) Search(c *gin.Context)
- func (server *Server) Settings(c *gin.Context)
- func (server *Server) Signin(c *gin.Context)
- func (server *Server) Signout(c *gin.Context)
- func (server *Server) Sso(c *gin.Context)
- func (server *Server) Token(c *gin.Context)
- func (server *Server) ValidateSession(session sessions.Session) error
- func (server *Server) Wakeup()
- func (server *Server) WhatsMyIP(c *gin.Context)
- type ShaSums
- type TokenRequest
- type TplEngine
- type Web
Constants ¶
const ( MAX_AUTH_FAILURES = 1 MAX_USES = 1 EXPIRY_TABLE = "expiry" FAILURES_TABLE = "failures" DEVICES_TABLE = "devices" CERTIFICATES_TABLE = "certificates" EX_EMPLOYEES_TABLE = "ex-employees" SHASUM = "shasum" AGENT_PORT = 7468 )
Variables ¶
This section is empty.
Functions ¶
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("nonexistent") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func Logger ¶
func Logger(logger log.FieldLogger, notLogged ...string) gin.HandlerFunc
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
Types ¶
type BinFileSystem ¶
type BinFileSystem struct { FileSystem http.FileSystem Root string }
BinFileSystem : Binary file system for serving compiled assets
func GetBinFileSystem ¶
func GetBinFileSystem(root string) *BinFileSystem
GetBinFileSystem : Get the binary filesystem object
func (*BinFileSystem) Collection ¶
func (binFS *BinFileSystem) Collection(c *gin.Context)
Collection : Load a collection of files from the filsystem and send them back over the assigned gin.Context
type RegistrationRequest ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) AddDevices ¶
TODO This method has no authentication system on it. Before we can use it in a production environment, we must authenticate the endpoint and devices connecting to it to prevent it being abused by external actors
func (*Server) AddShaSum ¶
TODO This is something of a duplication of the method above. Would be worth abstracting the common functionality to make the code a little more readable
func (*Server) Configure ¶
Handler function for loading the configuration page
Only accessible when server is first loaded
func (*Server) RequireAccount ¶
func (*Server) ValidateSession ¶
type TokenRequest ¶
type TplEngine ¶
type TplEngine struct {
// contains filtered or unexported fields
}
func NewTplEngine ¶
type Web ¶
type Web struct { // Default Backlink string Version string Request *http.Request Section string Time time.Time Admin bool SamlM *samlsp.Middleware Saml config.SamlConfig Info config.Admin User config.User Errors []string WebSocket string SemanticTheme string TempTotpKey *otp.Key Search *Search // contains filtered or unexported fields }