app

package
v0.0.0-...-8e6b538 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Server   *fiber.App
	Config   *config.Config
	ProxyURL string
}

App struct consists of our application structure

func New

func New(configOptions ...ConfigOption) *App

New creates a new instance of App

func (*App) RegisterRoutes

func (app *App) RegisterRoutes(routes *routers.Routers)

RegisterRoutes registers all the routes associated with this application.

type ConfigOption

type ConfigOption struct {
	// contains filtered or unexported fields
}

ConfigOption will be a set of configuration options for APP

func WithConfiguration

func WithConfiguration(config *config.Config) ConfigOption

WithConfiguration will register a configuration of type *config.Config

func WithHTMLTemplateDir

func WithHTMLTemplateDir(htmlTemplateDir string) ConfigOption

WithHTMLTemplateDir will provide the base dir to load templates from pkger

func WithProxyURL

func WithProxyURL(proxyPrefix string) ConfigOption

WithProxyURL returns a proxy on wihch we will register our application This could look like "/production/prefix/stuff"

func WithStaticAssetDir

func WithStaticAssetDir(staticAssetDir string) ConfigOption

WithStaticAssetDir will provide the base dir to load static assets from pkger

Jump to

Keyboard shortcuts

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