Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ContriHubDB *gorm.DB
var Db *gorm.DB
var GoogleOAuthConfig *oauth2.Config
var SessionCookieStore *sessions.CookieStore
Functions ¶
func Init ¶
func Init()
Init initializes the running server, not every package that imports config. Keeping startup explicit lets validators and template tests run without loading production secrets or opening a database connection.
func InitTemplateRenderer ¶
Types ¶
type Env ¶
type Env struct {
BaseUrl string
Port string
// Empty in production; staging can bind only to a Tailnet or loopback IP.
ListenHost string
RegistrationDeadline int64
// Development period, shown to participants and mentors. 0 means "not
// configured" and hides the line entirely; nothing enforces it, it is
// there so the dates on screen are the dates the club announced.
DevelopmentStart int64
DevelopmentEnd int64
DeclareResult bool
// ProjectSubmissionClosed stops students writing final project links.
// Admins can still edit on a team's behalf, and already-saved links stay
// visible on the dashboard. False (the default) keeps the form open.
ProjectSubmissionClosed bool
// contains filtered or unexported fields
}
Env is a struct that contains all the environment variables.
var EnvVars *Env
type TemplateRenderer ¶
type TemplateRenderer struct {
// contains filtered or unexported fields
}
TemplateRenderer is a custom html/template renderer for Echo framework