initialize

package
v0.0.0-...-802508d Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 12 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ContriHubDB *gorm.DB
View Source
var Db *gorm.DB
View Source
var GoogleOAuthConfig *oauth2.Config
View Source
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

func InitTemplateRenderer(e *echo.Echo)

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

func (*TemplateRenderer) Render

func (t *TemplateRenderer) Render(w io.Writer, name string, data interface{}, c echo.Context) error

Render renders a template document

Jump to

Keyboard shortcuts

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