kernel

package
v0.0.0-...-7064c7c Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Commands = register.CommandRegister{
		"database:seed":      &cli.Seeder{},
		"show:commands":      &cli.ShowCommands{},
		"cmd:create":         &cli.CmdCreate{},
		"controller:create":  &cli.ControllerCreate{},
		"generate:key":       &cli.GenerateKey{},
		"middleware:create":  &cli.MiddlewareCreate{},
		"migration:create":   &cli.MigrationCreate{},
		"migration:rollback": &cli.MigrateRollback{},
		"migration:up":       &cli.MigrationUp{},
		"model:create":       &cli.ModelCreate{},
		"router:show":        &cli.RouterShow{},
		"service:create":     &cli.ServiceCreate{},
		"update":             &cli.UpdateAlfred{},
	}
	CommandServices = register.ServiceRegister{}
	Models          = register.ModelRegister{}
	Controllers     = register.ControllerRegister{}
	Middlewares     = register.MiddlewareRegister{}
	Router          []register.HTTPRouter
)

Functions

func BuildCommandContainer

func BuildCommandContainer() *dig.Container

func BuildCustomContainer

func BuildCustomContainer(modules []register.DIModule) *dig.Container

func CreateSessionStore

func CreateSessionStore() *sessions.CookieStore

func GetHttpServer

func GetHttpServer(router *mux.Router, cfg ServerConf) *http.Server

func GiveAccessToPublicFolder

func GiveAccessToPublicFolder(router *mux.Router)

func HandleGroups

func HandleGroups(groups []register.Group, router *mux.Router)

func HandleSingleRoute

func HandleSingleRoute(routes []register.Route, router *mux.Router)

func RegisterConrollerInterface

func RegisterConrollerInterface(item register.ControllerRegisterItem, w http.ResponseWriter, r *http.Request) interface{}

func RunServer

func RunServer(conf ServerConf, r []register.HTTPRouter)

func WebRouter

func WebRouter(routes []register.HTTPRouter) *mux.Router

Types

type BaseController

type BaseController struct {
	Response http.ResponseWriter
	Request  *http.Request
}
var (
	BC BaseController
)

type Request

type Request map[string]interface{}

type ServerConf

type ServerConf struct {
	Name    string
	Port    int
	SSL     bool
	SSLCert string
	SSLKey  string
	Key     string
}

func RetrieveAppConf

func RetrieveAppConf() *ServerConf

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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