routes

package
v2.2.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2017 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApiIndex

func ApiIndex(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

Sends a simple welcome-message to the user.

func NoWebFrontendIndex

func NoWebFrontendIndex(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

Sends a simple welcome-message to the user.

func SendJsonMessage

func SendJsonMessage(w http.ResponseWriter, code int, success bool, message string)

Sends a simple Json-message. It contains a success-bool and a message, which may be empty.

func ViewAdmin

func ViewAdmin(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

Renders the admin-backend if the user is logged in. If the user is not logged in, he will be redirected to the login-page.

func ViewIndex

func ViewIndex(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

Renders the main-page

func ViewLogin

func ViewLogin(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

Renders the login-page if the user is not logged in. If the user is logged in, he will be redirected to the admin-backend.

Types

type AdminSiteData

type AdminSiteData struct {
	Title      string
	Interval   int
	AppVersion string
	GoVersion  string
	GoArch     string
}

Contains the application's data, which will be used on admin-pages.

type BasicResponse

type BasicResponse struct {
	Success bool   `json:"requestSuccess"`
	Message string `json:"message"`
}

Contains a success-bool and a message, which may be empty.

type SiteData

type SiteData struct {
	Title string
}

Contains the application's data, which will be used on publicly visible pages.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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