Documentation ¶
Index ¶
- Constants
- Variables
- func Authenticate() gin.HandlerFunc
- func DataInvalid(ctx *gin.Context, valid bool, problem string, err error) bool
- func HasPermissions(ctx *gin.Context, entity Entity, accessType validation.AccessType) (bool, error)
- func InitRoutes(conf config.Config) *gin.Engine
- func RegisterGameHandlers(g *gin.RouterGroup)
- func RegisterLeagueHandlers(g *gin.RouterGroup)
- func RegisterLeagueOfLegendsHandlers(g *gin.RouterGroup)
- func RegisterLoginHandlers(g *gin.RouterGroup)
- func RegisterSchedulingHandlers(g *gin.RouterGroup)
- func RegisterTeamHandlers(g *gin.RouterGroup)
- func RegisterUserHandlers(g *gin.RouterGroup)
- type Entity
- type Validator
- type ValidatorWrapper
Constants ¶
View Source
const ( View = validation.View Edit = validation.Edit Create = validation.Create Delete = validation.Delete )
Re-declare so that don't have to use the package prefix to make it look nicer
View Source
const (
MinPasswordLength = 8
)
Variables ¶
View Source
var Access validation.Access
View Source
var ElmSessions sessionManager.SessionManager
View Source
var GameDAO dataModel.GameDAO
View Source
var IconManager icons.IconManager
View Source
var LeagueDAO dataModel.LeagueDAO
View Source
var LeagueOfLegendsDAO dataModel.LeagueOfLegendsDAO
View Source
var LoLApi lolApi.LoLApi
View Source
var LoLTournamentApi lolApi.LoLTournamentApi
View Source
var MarkdownManager markdown.MdManager
View Source
var TeamDAO dataModel.TeamDAO
View Source
var UserDAO dataModel.UserDAO
Objects
View Source
var ValidGameStrings = [...]string{
"genericsport",
"basketball",
"curling",
"football",
"hockey",
"rugby",
"soccer",
"volleyball",
"waterpolo",
"genericesport",
"csgo",
"leagueoflegends",
"overwatch",
}
Functions ¶
func Authenticate ¶
func Authenticate() gin.HandlerFunc
func HasPermissions ¶
func HasPermissions(ctx *gin.Context, entity Entity, accessType validation.AccessType) (bool, error)
func RegisterGameHandlers ¶
func RegisterGameHandlers(g *gin.RouterGroup)
func RegisterLeagueHandlers ¶
func RegisterLeagueHandlers(g *gin.RouterGroup)
func RegisterLeagueOfLegendsHandlers ¶
func RegisterLeagueOfLegendsHandlers(g *gin.RouterGroup)
func RegisterLoginHandlers ¶
func RegisterLoginHandlers(g *gin.RouterGroup)
func RegisterSchedulingHandlers ¶
func RegisterSchedulingHandlers(g *gin.RouterGroup)
func RegisterTeamHandlers ¶
func RegisterTeamHandlers(g *gin.RouterGroup)
func RegisterUserHandlers ¶
func RegisterUserHandlers(g *gin.RouterGroup)
Types ¶
type Validator ¶
Wrapper for data validator functions so that they can be mocked during unit testing
Click to show internal directories.
Click to hide internal directories.