celeritas

package module
v0.0.0-...-67dca7d Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2022 License: MIT Imports: 18 Imported by: 0

README

celeritas

Golang web framework

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Celeritas

type Celeritas struct {
	AppName  string
	Debug    bool
	Version  string
	InfoLog  *log.Logger
	ErrorLog *log.Logger
	RootPath string
	Routes   *chi.Mux
	Render   *render.Render
	Session  *scs.SessionManager
	DB       Database
	JetViews *jet.Set
	// contains filtered or unexported fields
}

func (*Celeritas) BuildDSN

func (c *Celeritas) BuildDSN() string

func (*Celeritas) CreateDirIfNotExist

func (c *Celeritas) CreateDirIfNotExist(path string) error

func (*Celeritas) CreateFileIfNotExist

func (c *Celeritas) CreateFileIfNotExist(path string) error

func (*Celeritas) Init

func (c *Celeritas) Init(p initPaths) error

func (*Celeritas) ListenAndServe

func (c *Celeritas) ListenAndServe()

ListenAndServe Starts the web server

func (*Celeritas) New

func (c *Celeritas) New(rootPath string) error

func (*Celeritas) OpenDB

func (c *Celeritas) OpenDB(dbType, dsn string) (*sql.DB, error)

func (*Celeritas) RandomString

func (c *Celeritas) RandomString(n int) string

RandomString Generate random string

func (*Celeritas) SessionLoad

func (c *Celeritas) SessionLoad(next http.Handler) http.Handler

type Database

type Database struct {
	DatabaseType string
	Pool         *sql.DB
}

Directories

Path Synopsis
cmd
cli

Jump to

Keyboard shortcuts

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