utils

package
v0.0.0-...-313df08 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RedisPool *redis.Pool

Functions

func CheckSession

func CheckSession(r *http.Request, paste_id string) (bool, error)

func ClearAppSession

func ClearAppSession(w http.ResponseWriter)

func ClearOauthCookie

func ClearOauthCookie(w http.ResponseWriter)

func Http404

func Http404(w http.ResponseWriter, r *http.Request)

func InitAppSession

func InitAppSession(w http.ResponseWriter, r *http.Request, userID string, refresh bool) error

func InitRedisPool

func InitRedisPool(addr string)

func OAuthConfigDance

func OAuthConfigDance(provider string, redirectURL string, scopes ...string) (*oauth2.Config, error)

func ProcessForm

func ProcessForm(r *http.Request) error

func SC

func SessionStore

func SessionStore() *sessions.CookieStore

func UpdateSession

func UpdateSession(w http.ResponseWriter, r *http.Request, paste_id string, remove bool) error

func ValidateCaptcha

func ValidateCaptcha(recaptchaResponse string, remoteip string, action string) (float64, error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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