typical

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Context = typictx.Context{
	Name:        "Typical-RESTful-Server",
	Version:     "0.4.4",
	Description: "Example of typical and scalable RESTful API Server for Go",

	Configs: []typictx.Config{
		{Prefix: "APP", Spec: &config.AppConfig{}, Description: "Application configuration"},
		{Prefix: "PG", Spec: &config.PostgresConfig{}, Description: "Postgres configuration"},
	},

	App: typictx.Application{
		Action: typictx.MainAction{
			StartFunc: func(s *app.Server) error {
				log.Info("Start the application")
				return s.Serve()
			},
			StopFunc: func(s *app.Server) (err error) {
				log.Info("Stop the application")
				return s.Shutdown()
			},
		},
	},

	Modules: []*typictx.Module{
		module.NewPostgres(),
	},

	Github: &typictx.Github{
		Owner:    "typical-go",
		RepoName: "typical-rest-server",
	},
}

Context instance of Context

Functions

This section is empty.

Types

type Config added in v0.3.0

type Config struct {
	App *config.AppConfig
	Pg  *config.PostgresConfig
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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