app

package
v0.0.0-...-598a1f7 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2023 License: AGPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleLegal

func HandleLegal(w http.ResponseWriter, r *http.Request) error

HandlePrivacy displays the home page responds to GET /privacy

func ScheduleAt

func ScheduleAt(f func(), t time.Time, i time.Duration) chan struct{}

ScheduleAt schedules execution for a particular time and at intervals thereafter. If interval is 0, the function will be called only once. Callers should call close(task) before exiting the app or to stop repeating the action.

func Setup

func Setup(mu *sync.RWMutex)

Setup sets up our application

func SetupAssets

func SetupAssets()

SetupAssets compiles or copies our assets from src into the public assets folder.

func SetupAuth

func SetupAuth()

SetupAuth sets up the auth pkg and authorisation for users

func SetupDatabase

func SetupDatabase(mu *sync.RWMutex)

SetupDatabase sets up the db with query given our server config.

func SetupLog

func SetupLog() error

SetupLog sets up logging

func SetupRoutes

func SetupRoutes() *mux.Mux

SetupRoutes creates a new router and adds the routes for this app to it.

func SetupServices

func SetupServices()

SetupServices sets up external services from our config file

func SetupView

func SetupView()

SetupView sets up the view package by loadind templates.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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