fapp

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "1.0.11"

Variables

This section is empty.

Functions

func ReadConfig

func ReadConfig() error

Types

type App

type App struct {
	Name    string
	Debug   bool
	Mode    string
	Session AppSession
	Version AppVersion
	Logger  AppLogger
	Sign    AppSign
	Server  AppServer
	Router  frouter.Router
}

func New

func New(options ...Option) *App

func Now

func Now() *App

func (*App) Run

func (app *App) Run(options ...Option)

type AppLogger

type AppLogger struct {
	LogTimeout  int
	SendTimeout int
}

type AppServer

type AppServer struct {
	Addr            string
	ReadTimeout     int
	WriteTimeout    int
	ShutdownTimeout int
	HttpServer      *http.Server
}

type AppSession

type AppSession struct {
	Key          string
	KeyPrefix    string
	Expiration   int
	Client       func() *redis.Client
	LoginHandler gin.HandlerFunc
}

type AppSign

type AppSign struct {
	Key         string
	TimeKey     string
	Secret      string
	Expiration  int
	SignHandler gin.HandlerFunc
}

type AppVersion

type AppVersion struct {
	Latest string
	Key    string
}

type Option

type Option func(app *App)

Jump to

Keyboard shortcuts

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