controllers

package
v0.0.0-...-16d05a1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHandlerFromParentPrefix

func GetHandlerFromParentPrefix(res http.ResponseWriter, req *http.Request, endpointSuffix string, endpoints map[string]http.HandlerFunc)

Types

type AdminAPI

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

AdminAPI manages the operations done by a admin

func NewAdminAPI

func NewAdminAPI(helper *helpers.AdminHelper, authenticator *auth.HandlerAuthenticator) *AdminAPI

NewAdminAPI returns a new AdminAPI instance

func (*AdminAPI) ServeHTTP

func (a *AdminAPI) ServeHTTP(res http.ResponseWriter, req *http.Request)

ServeHTTP is the API's magical port :), since it makes it implement http.Handler

type ContestAPI

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

func NewContestAPI

func NewContestAPI(repo data.GetterRepo[models.Contest]) *ContestAPI

func (*ContestAPI) ServeHTTP

func (c *ContestAPI) ServeHTTP(res http.ResponseWriter, req *http.Request)

type ContestantAPI

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

ContestantAPI manages the operations done by a contestant

func NewContestantAPI

func NewContestantAPI(contMgr *helpers.ContestantHelper, authenticator *auth.HandlerAuthenticator) *ContestantAPI

NewContestantAPI returns a new ContestantAPI instance

func (*ContestantAPI) ServeHTTP

func (c *ContestantAPI) ServeHTTP(res http.ResponseWriter, req *http.Request)

ServeHTTP is the API's magical port :), since it makes it implement http.Handler

type NotificationAPI

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

func NewNotificationAPI

func NewNotificationAPI(notificationsMgr *helpers.NotificationHelper, authenticator *auth.HandlerAuthenticator) *NotificationAPI

func (*NotificationAPI) ServeHTTP

func (n *NotificationAPI) ServeHTTP(res http.ResponseWriter, req *http.Request)

type OrganizerAPI

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

func NewOrganizerAPI

func NewOrganizerAPI(orgMgr *helpers.OrganizerHelper, authenticator *auth.HandlerAuthenticator) *OrganizerAPI

func (*OrganizerAPI) ServeHTTP

func (o *OrganizerAPI) ServeHTTP(res http.ResponseWriter, req *http.Request)

Directories

Path Synopsis
Package auth holds user login related stuff
Package auth holds user login related stuff

Jump to

Keyboard shortcuts

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