application

package
v0.0.0-...-66f8d04 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	*Config
}

Application main application

func New

func New(cfg *Config) *Application

New new application

func (*Application) NewServeMux

func (application *Application) NewServeMux() http.Handler

NewServeMux allocates and returns a new ServeMux.

func (*Application) Use

func (application *Application) Use(app MicroAppInterface)

Use mount router into micro app

type Config

type Config struct {
	Router   *chi.Mux
	Handlers []http.Handler
	AssetFS  assetfs.Interface
	Admin    *admin.Admin
	DB       *gorm.DB
}

Config application config

type MicroAppInterface

type MicroAppInterface interface {
	ConfigureApplication(*Application)
}

MicroAppInterface micro app interface

Jump to

Keyboard shortcuts

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