api

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Healthcheck

func Healthcheck(router *gin.RouterGroup)

Healthcheck registers the route GET /api/v1/accounts

func PostForm

func PostForm(router *gin.RouterGroup)

PostForm registers the route POST /api/v1/accounts

func ValidateTurnstileToken added in v1.3.0

func ValidateTurnstileToken(token string, secret string, remoteIp string) (bool, error)

Types

type ResponseBody

type ResponseBody struct {
	Message string
}

ResponseBody is the body of a response

type TokenValidateRequest added in v1.3.0

type TokenValidateRequest struct {
	Secret   string `json:"secret"`
	Response string `json:"response"`
	RemoteIP string `json:"remoteip"`
}

type TokenValidateResponse added in v1.3.0

type TokenValidateResponse struct {
	ErrorCodes []string `json:"error-codes"`
	Success    bool     `json:"success"`
	Action     string   `json:"action"`
}

Jump to

Keyboard shortcuts

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