services

package
v0.0.0-...-4161e78 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidAPIKey   = fmt.Errorf("invalid api key")
	ErrPayloadCreation = fmt.Errorf("error while creating payload")
	ErrInvalidPayload  = fmt.Errorf("invalid payload")
	ErrInvalidSite     = fmt.Errorf("invalid site")
	ErrInternalError   = fmt.Errorf("internal error")
)

Functions

This section is empty.

Types

type APIHandler

type APIHandler struct {
	Logger *zap.Logger
	DB     *db.Database
}

func SetupDependencies

func SetupDependencies() (APIHandler, error)

func (*APIHandler) AddUser

func (t *APIHandler) AddUser(c *gin.Context)

func (*APIHandler) AdminAuth

func (t *APIHandler) AdminAuth(c *gin.Context)

func (*APIHandler) Auth

func (t *APIHandler) Auth(c *gin.Context)

func (*APIHandler) BanUser

func (t *APIHandler) BanUser(c *gin.Context)

func (*APIHandler) Datadome

func (t *APIHandler) Datadome(c *gin.Context)

func (*APIHandler) GetSolves

func (t *APIHandler) GetSolves(c *gin.Context)

type DataDomePayload

type DataDomePayload struct {
	Site         string `json:"site"`
	UserAgent    string `json:"user-agent"`
	Cid          string `json:"cid"`
	ResponsePage string `json:"responsePage"`
	IP           string `json:"ip"`
	Referer      string `json:"referer"`
}

type RegisterPayload

type RegisterPayload struct {
	Name   string `json:"name"`
	Solves int    `json:"solves"`
}

Jump to

Keyboard shortcuts

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