Documentation
¶
Index ¶
- type Config
- type ContactUserTemplate
- type Context
- type DocumentTemplate
- type InternalContext
- type ManagerTemplate
- type NewsTemplate
- type PlayerTemplate
- type ProgrammeTemplate
- type ProgrammeTemplateStruct
- type SMTPConfig
- type SeasonTemplate
- type SecurityConfig
- type SponsorTemplate
- type TeamTemplate
- type TemplateHelper
- type UserTemplate
- type Views
- func (v *Views) AccountFunc(c echo.Context) error
- func (v *Views) AffiliationAddFunc(c echo.Context) error
- func (v *Views) AffiliationDeleteFunc(c echo.Context) error
- func (v *Views) ChangePasswordFunc(c echo.Context) error
- func (v *Views) ContactFunc(c echo.Context) error
- func (v *Views) CustomHTTPErrorHandler(err error, c echo.Context)
- func (v *Views) DocumentAddFunc(c echo.Context) error
- func (v *Views) DocumentDeleteFunc(c echo.Context) error
- func (v *Views) DocumentsFunc(c echo.Context) error
- func (v *Views) DownloadFunc(c echo.Context) error
- func (v *Views) Error404(c echo.Context) error
- func (v *Views) GalleryFunc(c echo.Context) error
- func (v *Views) GetVisitorCount() int
- func (v *Views) HomeFunc(c echo.Context) error
- func (v *Views) ImageAddFunc(c echo.Context) error
- func (v *Views) ImageDeleteFunc(c echo.Context) error
- func (v *Views) InfoEditFunc(c echo.Context) error
- func (v *Views) InfoFunc(c echo.Context) error
- func (v *Views) LoginFunc(c echo.Context) error
- func (v *Views) LogoutFunc(c echo.Context) error
- func (v *Views) NewsAddFunc(c echo.Context) error
- func (v *Views) NewsArticleFunc(c echo.Context) error
- func (v *Views) NewsDeleteFunc(c echo.Context) error
- func (v *Views) NewsEditFunc(c echo.Context) error
- func (v *Views) NewsFunc(c echo.Context) error
- func (v *Views) PlayerAddFunc(c echo.Context) error
- func (v *Views) PlayerDeleteFunc(c echo.Context) error
- func (v *Views) PlayerEditFunc(c echo.Context) error
- func (v *Views) PlayersFunc(c echo.Context) error
- func (v *Views) ProgrammeAddFunc(c echo.Context) error
- func (v *Views) ProgrammeDeleteFunc(c echo.Context) error
- func (v *Views) ProgrammeSeasonAddFunc(c echo.Context) error
- func (v *Views) ProgrammeSeasonDeleteFunc(c echo.Context) error
- func (v *Views) ProgrammeSeasonEditFunc(c echo.Context) error
- func (v *Views) ProgrammeSeasonSelectFunc(c echo.Context) error
- func (v *Views) ProgrammesFunc(c echo.Context) error
- func (v *Views) ProgrammesSeasonsFunc(c echo.Context) error
- func (v *Views) RecordVisit(visitorID string)
- func (v *Views) RemoveImageFunc(c echo.Context) error
- func (v *Views) RequireClubSecretaryHigher(next echo.HandlerFunc) echo.HandlerFunc
- func (v *Views) RequireNotManager(next echo.HandlerFunc) echo.HandlerFunc
- func (v *Views) RequireNotManagerNotPhotographer(next echo.HandlerFunc) echo.HandlerFunc
- func (v *Views) RequireUserManagement(next echo.HandlerFunc) echo.HandlerFunc
- func (v *Views) RequiresLogin(next echo.HandlerFunc) echo.HandlerFunc
- func (v *Views) ResetURLFunc(c echo.Context) error
- func (v *Views) ResetUserPasswordFunc(c echo.Context) error
- func (v *Views) SponsorAddFunc(c echo.Context) error
- func (v *Views) SponsorDeleteFunc(c echo.Context) error
- func (v *Views) SponsorsFunc(c echo.Context) error
- func (v *Views) Stop()
- func (v *Views) TeamAddFunc(c echo.Context) error
- func (v *Views) TeamDeleteFunc(c echo.Context) error
- func (v *Views) TeamEditFunc(c echo.Context) error
- func (v *Views) TeamFunc(c echo.Context) error
- func (v *Views) TeamsFunc(c echo.Context) error
- func (v *Views) UploadImageFunc(c echo.Context) error
- func (v *Views) UserAddFunc(c echo.Context) error
- func (v *Views) UserDeleteFunc(c echo.Context) error
- func (v *Views) UserEditFunc(c echo.Context) error
- func (v *Views) UsersFunc(c echo.Context) error
- func (v *Views) UsersSetDisplayEmailFunc(c echo.Context) error
- func (v *Views) VisitorTrackingMiddleware(next echo.HandlerFunc) echo.HandlerFunc
- func (v *Views) WhatsOnAddFunc(c echo.Context) error
- func (v *Views) WhatsOnArticleFunc(c echo.Context) error
- func (v *Views) WhatsOnDeleteFunc(c echo.Context) error
- func (v *Views) WhatsOnEditFunc(c echo.Context) error
- func (v *Views) WhatsOnFunc(c echo.Context) error
- func (v *Views) WhatsOnSelectFunc(c echo.Context) error
- func (v *Views) WhatsOnTomePeriodFunc(c echo.Context) error
- type WhatsOnTemplate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Address string
DatabaseURL string
DomainName string
SessionCookieName string
FileDir string
Mail SMTPConfig
Security SecurityConfig
}
type ContactUserTemplate ¶
func DBUsersContactToTemplateFormat ¶
func DBUsersContactToTemplateFormat(usersDB []user.User) ([]ContactUserTemplate, error)
type Context ¶
type Context struct {
// Message is used for sending a message back to the user trying to log in, might decide to move later as it may not be needed
Message string
// MsgType is the bulma.io class used to indicate what should be displayed
MsgType string
// MsgViewed is used to clear the message after it has been viewed once
MsgViewed bool
// User is the stored logged-in user
User user.User
}
Context is a struct applied to the templates.
type DocumentTemplate ¶
func DBDocumentsToTemplateFormat ¶
func DBDocumentsToTemplateFormat(documentsDB []document.Document) []DocumentTemplate
type InternalContext ¶
type ManagerTemplate ¶
func DBManagersToTemplateFormat ¶
func DBManagersToTemplateFormat(managersDB []user.User) []ManagerTemplate
type NewsTemplate ¶
func DBNewsToArticleTemplateFormat ¶
func DBNewsToArticleTemplateFormat(newsDB news.News) NewsTemplate
func DBNewsToTemplateFormat ¶
func DBNewsToTemplateFormat(newsDB []news.News) []NewsTemplate
type PlayerTemplate ¶
type PlayerTemplate struct {
ID int
Name string
DateOfBirth string
DateOfBirthForm string
IsFileValid bool
Age int
Position null.String
IsCaptain bool
Team TeamTemplate
}
func DBPlayersTeamToTemplateFormat ¶
func DBPlayersTeamToTemplateFormat(playersDB []player.Player) []PlayerTemplate
func DBPlayersToTemplateFormat ¶
func DBPlayersToTemplateFormat(playersDB []player.Player, teamsDB []team.Team) []PlayerTemplate
type ProgrammeTemplate ¶
type ProgrammeTemplate struct {
ID int
Name string
DateOfProgramme string
Season SeasonTemplate
}
func DBProgrammesToTemplateFormat ¶
func DBProgrammesToTemplateFormat(programmesDB []programme.Programme, seasonsDB []programme.Season) []ProgrammeTemplate
type ProgrammeTemplateStruct ¶
type SMTPConfig ¶
SMTPConfig stores the SMTP Mailer configuration
type SeasonTemplate ¶
type SecurityConfig ¶
type SecurityConfig struct {
EncryptionKey string
AuthenticationKey string
Iterations int
ScryptWorkFactor int
ScryptBlockSize int
ScryptParallelismFactor int
KeyLength int
}
SecurityConfig stores the security configuration
type SponsorTemplate ¶
func DBSponsorsToTemplateFormat ��
func DBSponsorsToTemplateFormat(sponsorsDB []sponsor.Sponsor) []SponsorTemplate
type TeamTemplate ¶
func DBTeamsToTemplateFormat ¶
func DBTeamsToTemplateFormat(teamsDB []team.Team) []TeamTemplate
type TemplateHelper ¶
type UserTemplate ¶
type UserTemplate struct {
ID int
Name string
Email string
Phone string
TeamID int
Role string
RoleTemplate string
IsFileValid bool
}
func DBUserToTemplateFormat ¶
func DBUserToTemplateFormat(userDB user.User) UserTemplate
func DBUsersToTemplateFormat ¶
func DBUsersToTemplateFormat(usersDB []user.User) []UserTemplate
type Views ¶
type Views struct {
// contains filtered or unexported fields
}
Views encapsulates our view dependencies
func (*Views) ChangePasswordFunc ¶
ChangePasswordFunc handles the password change from a user
func (*Views) CustomHTTPErrorHandler ¶
func (*Views) GetVisitorCount ¶
func (*Views) LoginFunc ¶
LoginFunc implements the login functionality, will add a cookie to the cookie store for managing authentication
func (*Views) LogoutFunc ¶
LogoutFunc Implements the logout functionality. Will delete the session information from the cookie store
func (*Views) ProgrammeSeasonDeleteFunc ¶
func (*Views) ProgrammeSeasonEditFunc ¶
func (*Views) ProgrammeSeasonSelectFunc ¶
func (*Views) RecordVisit ¶
func (*Views) RequireClubSecretaryHigher ¶
func (v *Views) RequireClubSecretaryHigher(next echo.HandlerFunc) echo.HandlerFunc
func (*Views) RequireNotManager ¶
func (v *Views) RequireNotManager(next echo.HandlerFunc) echo.HandlerFunc
func (*Views) RequireNotManagerNotPhotographer ¶
func (v *Views) RequireNotManagerNotPhotographer(next echo.HandlerFunc) echo.HandlerFunc
func (*Views) RequireUserManagement ¶
func (v *Views) RequireUserManagement(next echo.HandlerFunc) echo.HandlerFunc
func (*Views) RequiresLogin ¶
func (v *Views) RequiresLogin(next echo.HandlerFunc) echo.HandlerFunc
RequiresLogin is a middleware which will be used for each httpHandler to check if there is any active session
func (*Views) UsersSetDisplayEmailFunc ¶
func (*Views) VisitorTrackingMiddleware ¶
func (v *Views) VisitorTrackingMiddleware(next echo.HandlerFunc) echo.HandlerFunc
type WhatsOnTemplate ¶
type WhatsOnTemplate struct {
ID int
Title string
Content string
Date string
DateOfEvent string
DateOfEventForm string
IsFileValid bool
}
func DBWhatsOnToArticleTemplateFormat ¶
func DBWhatsOnToArticleTemplateFormat(whatsOnDB whatson.WhatsOn) WhatsOnTemplate
func DBWhatsOnToTemplateFormat ¶
func DBWhatsOnToTemplateFormat(whatsOnsDB []whatson.WhatsOn) []WhatsOnTemplate
Click to show internal directories.
Click to hide internal directories.