rasant

package module
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: MIT Imports: 18 Imported by: 0

README

Rasant

Rasant is a web application framework written in the Go language.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database added in v0.0.10

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

type Rasant

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

func (*Rasant) BuildDSN added in v0.0.10

func (ras *Rasant) BuildDSN() string

func (*Rasant) CreateDirIfNotExist

func (ras *Rasant) CreateDirIfNotExist(path string) error

func (*Rasant) CreateFileIfNotExist

func (ras *Rasant) CreateFileIfNotExist(path string) error

func (*Rasant) Init

func (ras *Rasant) Init(p initPaths) error

Init creates necessary folders for our Celeritas application

func (*Rasant) ListenAndServe

func (ras *Rasant) ListenAndServe()

ListenAndServe starts the web server

func (*Rasant) New

func (ras *Rasant) New(rootPath string) error

func (*Rasant) OpenDB added in v0.0.10

func (res *Rasant) OpenDB(dbType, dsn string) (*sql.DB, error)

func (*Rasant) RandomString added in v0.0.11

func (ras *Rasant) RandomString(n int) string

RandomString generates a random string length n from values in the const randomString

func (*Rasant) SessionLoad added in v0.0.7

func (ras *Rasant) SessionLoad(next http.Handler) http.Handler

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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