controller

package
v0.0.0-...-47c6034 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultMemberController

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

func (*DefaultMemberController) GetEdit

func (c *DefaultMemberController) GetEdit(id string) Page

func (*DefaultMemberController) GetIndex

func (c *DefaultMemberController) GetIndex() Page

func (*DefaultMemberController) GetNew

func (c *DefaultMemberController) GetNew() Page

func (*DefaultMemberController) PostEdit

func (c *DefaultMemberController) PostEdit(member *MemberDto) Page

func (*DefaultMemberController) PostNew

func (c *DefaultMemberController) PostNew(member *MemberDto) Page

type DefaultPresenceController

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

func (*DefaultPresenceController) GetEdit

func (c *DefaultPresenceController) GetEdit(gameId string) Page

func (*DefaultPresenceController) GetEditPost

func (c *DefaultPresenceController) GetEditPost(gameId string, presentMembers []string) Page

func (*DefaultPresenceController) GetIndex

func (c *DefaultPresenceController) GetIndex() Page

type DefaultSeasonController

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

func (*DefaultSeasonController) GetEdit

func (c *DefaultSeasonController) GetEdit(id string) Page

func (*DefaultSeasonController) GetIndex

func (c *DefaultSeasonController) GetIndex() Page

func (*DefaultSeasonController) GetNew

func (c *DefaultSeasonController) GetNew() Page

func (*DefaultSeasonController) PostEdit

func (c *DefaultSeasonController) PostEdit(season *SeasonDto, delete bool) Page

func (*DefaultSeasonController) PostNew

func (c *DefaultSeasonController) PostNew(season *SeasonDto) Page

type DefaultSeasonGameController

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

func (*DefaultSeasonGameController) GetEdit

func (c *DefaultSeasonGameController) GetEdit(gameId string) Page

func (*DefaultSeasonGameController) GetIndex

func (c *DefaultSeasonGameController) GetIndex(seasonId string) Page

func (*DefaultSeasonGameController) GetNew

func (c *DefaultSeasonGameController) GetNew() Page

func (*DefaultSeasonGameController) PostEdit

func (c *DefaultSeasonGameController) PostEdit(game *SeasonGameDto, delete bool) Page

func (*DefaultSeasonGameController) PostNew

type ErrorPage

type ErrorPage struct {
	Error error
}

func (*ErrorPage) Render

func (p *ErrorPage) Render(ctx *gin.Context)

type GameStats

type GameStats struct {
	HomeGames  int64
	AwayGames  int64
	TotalGames int64
}

type HtmlPage

type HtmlPage struct {
	Template string
	Data     gin.H
}

func (*HtmlPage) Render

func (p *HtmlPage) Render(ctx *gin.Context)

type MemberController

type MemberController interface {
	GetIndex() Page
	GetNew() Page
	PostNew(member *MemberDto) Page
	GetEdit(id string) Page
	PostEdit(member *MemberDto) Page
}

func NewMemberController

func NewMemberController() MemberController

type MemberDto

type MemberDto struct {
	ID        string `form:"id"`
	FirstName string `form:"first_name"`
	LastName  string `form:"last_name"`
	Active    bool   `form:"active"`
}

func CreateMemberDto

func CreateMemberDto(member repository.Member) MemberDto

func (*MemberDto) ToModel

func (dto *MemberDto) ToModel() repository.SaveMemberParams

type MemberPresenceDto

type MemberPresenceDto struct {
	Name string
	GameStats
}

type Page

type Page interface {
	Render(ctx *gin.Context)
}

type PresenceController

type PresenceController interface {
	GetIndex() Page
	GetEdit(gameId string) Page
	GetEditPost(gameId string, presentMembers []string) Page
}

func NewPresenceController

func NewPresenceController() PresenceController

type RedirectPage

type RedirectPage struct {
	Redirect string
}

func (*RedirectPage) Render

func (p *RedirectPage) Render(ctx *gin.Context)

type SeasonController

type SeasonController interface {
	GetIndex() Page
	GetNew() Page
	PostNew(season *SeasonDto) Page
	GetEdit(id string) Page
	PostEdit(season *SeasonDto, delete bool) Page
}

func NewSeasonController

func NewSeasonController() SeasonController

type SeasonDto

type SeasonDto struct {
	ID      string `form:"id"`
	Name    string `form:"name"`
	Created string `form:"created"`
}

func CreateSeasonDto

func CreateSeasonDto(season repository.Season) SeasonDto

func (*SeasonDto) ToModel

func (dto *SeasonDto) ToModel() repository.SaveSeasonParams

type SeasonGameController

type SeasonGameController interface {
	GetIndex(seasonId string) Page
	GetNew() Page
	PostNew(game *SeasonGameDto) Page
	GetEdit(gameId string) Page
	PostEdit(game *SeasonGameDto, delete bool) Page
}

func NewSeasonGameController

func NewSeasonGameController() SeasonGameController

type SeasonGameDto

type SeasonGameDto struct {
	ID       string `form:"id"`
	Opponent string `form:"opponent"`
	Home     bool   `form:"home"`
	Mode     string `form:"mode"`
	Date     string `form:"date"`
	SeasonID string `form:"season_id"`
	Season   string
}

func CreateSeasonGameDto

func CreateSeasonGameDto(game repository.SeasonGame, seasonName string) SeasonGameDto

func (*SeasonGameDto) ToModel

type SeasonPresenceDto

type SeasonPresenceDto struct {
	Name           string
	MemberPresence []MemberPresenceDto
	GameStats
}

func CreateSeasonPresenceDto

func CreateSeasonPresenceDto(seasonPresence []repository.FindSeasonPresenceRow, memberPresence []repository.FindMemberPresenceRow) []SeasonPresenceDto

Jump to

Keyboard shortcuts

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