web

package module
v0.0.0-...-f79870c Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package web contains the server, routing, and handlers logic.

Package web contains the server, routing, and handlers logic.

Package web contains the server, routing, and handlers logic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Port            string
	TemplateDir     string
	AssetPath       string
	AssetDir        string
	Articles        *db.ArticlesDBByDate
	Questions       db.QuestionsDB
	QuestionCounter db.QuestionCounter
	Topics          db.TopicsMap
	Ctx             context.Context
	Srv             *sheets.Service
}

Server represents all objects to be initialised in the application.

func NewServer

func NewServer() *Server

NewServer initialises the initial data necessary to get going.

func (*Server) Start

func (s *Server) Start() error

Start takes a Server already initialised with the initial data, parses templates and handlers, and starts ListenAndServe. Start is to be called by main in package main.

Jump to

Keyboard shortcuts

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