app

package
v0.0.0-...-a11cca7 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: AGPL-3.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ConfigDevelopment holds the development config from fragmenta.json
	ConfigDevelopment map[string]string

	// ConfigProduction holds development config from fragmenta.json
	ConfigProduction map[string]string

	// ConfigTest holds the app test config from fragmenta.json
	ConfigTest map[string]string
)

Functions

func Bootstrap

func Bootstrap(mu *sync.RWMutex) error

Bootstrap generates missing config files, sql migrations, and runs the first migrations For this we need to know what to call the app, but we default to abishek/iwillpayforthat for now we could use our current folder name?

func RequiresBootStrap

func RequiresBootStrap() bool

RequiresBootStrap returns true if the app requires bootstrapping

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 SetupDefaultUser

func SetupDefaultUser()

SetupDefaultUser creates the default user for the application if necessary

func SetupLog

func SetupLog() error

SetupLog sets up logging

func SetupMail

func SetupMail()

SetupMail sets us up to send mail via mailchimp (requires key).

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