ui

package
v0.0.0-...-9a10968 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBindAddress

func GetBindAddress() string

func GetPagination

func GetPagination(from, size, total int, url string, param map[string]interface{}) string

GetPagination return a pagination html code snippet

func HandleUI

func HandleUI(pattern string, handler http.Handler)

HandleUI register ui request handler

func HandleUIFunc

func HandleUIFunc(pattern string, handler func(http.ResponseWriter, *http.Request))

HandleUIFunc register ui request handler

func HandleUIMethod

func HandleUIMethod(method api.Method, pattern string, handler func(w http.ResponseWriter, req *http.Request, ps httprouter.Params))

HandleUIMethod register ui request handler

func HandleWebSocketCommand

func HandleWebSocketCommand(command string, usage string, handler func(c *websocket.WebsocketConnection, array []string))

HandleWebSocketCommand register websocket command handler

func StartUI

func StartUI(cfg *UIConfig)

Types

type AuthConfig

type AuthConfig struct {
	Enabled       bool   `config:"enabled"`
	OAuthProvider string `config:"oauth_provider"`

	AuthorizedAdmins []string `config:"authorized_admin"`
	ClientSecret     string   `config:"client_secret"`
	ClientID         string   `config:"client_id"`
	// contains filtered or unexported fields
}

type UIConfig

type UIConfig struct {
	Enabled       bool                 `config:"enabled"`
	AuthConfig    AuthConfig           `config:"auth"`
	TLSConfig     config.TLSConfig     `config:"tls"`
	NetworkConfig config.NetworkConfig `config:"network"`
}

func GetUIConfig

func GetUIConfig() UIConfig

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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