Documentation
¶
Index ¶
- func AddCookie(w *http.ResponseWriter, name string, value string)
- func ClearCookie(w *http.ResponseWriter, name string)
- func GenerateRandomString(length int) string
- func GetUsernameByRequestCookieID(r *http.Request) (username string, found bool)
- func LoggingSetup(logFileName string)
- func ReadSpotifyAuthData() (clientID string, clientSecret string, err error)
- func RenderErrorView(w http.ResponseWriter, username string, title string, status int, ...)
- func RenderSpAPIErrorView(w http.ResponseWriter, username string, title string, ...)
- func RenderView(w http.ResponseWriter, page string, viewData interface{})
- func SendAPIErrorResp(w io.Writer, message string, status int)
- func SendAPIOKResp(w io.Writer, message string)
- func SendAPIOKRespWithData(w io.Writer, message string, data interface{})
- func SendAPIResp(w io.Writer, data interface{})
- func SetupTemplates()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCookie ¶
func AddCookie(w *http.ResponseWriter, name string, value string)
AddCookie will apply a new cookie to the response of a http request, with the key/value this method is passed.
func ClearCookie ¶
func ClearCookie(w *http.ResponseWriter, name string)
func GenerateRandomString ¶
GenerateRandomString generates a random string containing numbers and letters
func LoggingSetup ¶
func LoggingSetup(logFileName string)
func ReadSpotifyAuthData ¶
func RenderErrorView ¶
func RenderSpAPIErrorView ¶
func RenderSpAPIErrorView(w http.ResponseWriter, username string, title string, apiErr *models.SpAPIError)
func RenderView ¶
func RenderView(w http.ResponseWriter, page string, viewData interface{})
templates cheatsheet https://curtisvermeeren.github.io/2017/09/14/Golang-Templates-Cheatsheet
func SendAPIOKResp ¶
func SendAPIOKRespWithData ¶
func SendAPIResp ¶
func SetupTemplates ¶
func SetupTemplates()
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.