Documentation ¶
Index ¶
- func CompareHash(hash string, inString string) (bool, error)
- func DecodeBody(r *http.Request, v interface{}) error
- func GenerateHash(inString string) string
- func GetPageTemplate(basePath string, viewsPath string) *template.Template
- func GetPlainTemplate(basePath string, viewsPath string) *template.Template
- func RandSeq(n int) string
- func WriteContentType(w http.ResponseWriter, cType string)
- func WriteData(w http.ResponseWriter, data []byte)
- func WriteError(w http.ResponseWriter, err error)
- func WriteJSON(w http.ResponseWriter, v interface{})
- func WriteRedirect(w http.ResponseWriter, path string)
- func WriteResultOrError(w http.ResponseWriter, v interface{}, err error)
- func WriteStatusConfict(w http.ResponseWriter)
- func WriteStatusError(w http.ResponseWriter)
- func WriteStatusForbidden(w http.ResponseWriter)
- func WriteStatusNotFound(w http.ResponseWriter)
- func WriteStatusOK(w http.ResponseWriter)
- func WriteText(w http.ResponseWriter, text string)
- type ContextKeyType
- type NavBuilder
- type ViewData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareHash ¶
CompareHash compare a argon2 hash string with a plain string
func GenerateHash ¶
GenerateHash for salted passwords with argon2
func GetPageTemplate ¶
GetPageTemplate to Writer
func GetPlainTemplate ¶
GetPlainTemplate to Writer
func WriteContentType ¶
func WriteContentType(w http.ResponseWriter, cType string)
WriteContentType to Response Header
func WriteData ¶
func WriteData(w http.ResponseWriter, data []byte)
WriteData to Response with Status OK
func WriteError ¶
func WriteError(w http.ResponseWriter, err error)
WriteError to Response as JSON with Status 500
func WriteRedirect ¶
func WriteRedirect(w http.ResponseWriter, path string)
WriteRedirect to Response Header
func WriteResultOrError ¶
func WriteResultOrError(w http.ResponseWriter, v interface{}, err error)
WriteResultOrError to Response
func WriteStatusConfict ¶
func WriteStatusConfict(w http.ResponseWriter)
WriteStatusConfict to Response Header
func WriteStatusError ¶
func WriteStatusError(w http.ResponseWriter)
WriteStatusError to Response Header
func WriteStatusForbidden ¶
func WriteStatusForbidden(w http.ResponseWriter)
WriteStatusForbidden to Response Header
func WriteStatusNotFound ¶
func WriteStatusNotFound(w http.ResponseWriter)
WriteStatusNotFound to Response Header
func WriteText ¶
func WriteText(w http.ResponseWriter, text string)
WriteText to Response with Status OK
Types ¶
type NavBuilder ¶
type NavBuilder struct {
// contains filtered or unexported fields
}
func NewNavBuilder ¶
func NewNavBuilder() NavBuilder
func (*NavBuilder) AddElement ¶
func (nb *NavBuilder) AddElement(title string, link string, icon string)
func (*NavBuilder) GetNavigation ¶
func (nb *NavBuilder) GetNavigation(activeTitle string) map[string]interface{}
Click to show internal directories.
Click to hide internal directories.