controllers

package
v0.0.0-...-fdabda1 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_ELO = 1000.0
)

TODO find a good place for this

Variables

This section is empty.

Functions

func Ping

func Ping(c *gin.Context)

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func NewController

func NewController(cfg *config.Config) *Controller

func (*Controller) BasicAuthLoginHandler

func (ctrl *Controller) BasicAuthLoginHandler(c *gin.Context)

Creates user if the user doesn't exist. Otherwise, authenticates against provided password. Returns a token if the user is authenticated or was just created.

func (*Controller) BotUploadHandler

func (ctrl *Controller) BotUploadHandler(c *gin.Context)

func (*Controller) GetUser

func (ctrl *Controller) GetUser(c *gin.Context)

func (*Controller) OAuthCallbackHandler

func (ctrl *Controller) OAuthCallbackHandler(c *gin.Context)

func (*Controller) OAuthLoginHandler

func (ctrl *Controller) OAuthLoginHandler(c *gin.Context)

type State

type State struct {
	Code        string `json:"code"`
	RedirectUri string `json:"redirect_uri"`
}

Jump to

Keyboard shortcuts

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