app

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2019 License: GPL-3.0 Imports: 28 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoMigrate

func AutoMigrate(db *gorm.DB) error

AutoMigrate - Automatic mapping data table

func BuildContainer

func BuildContainer() (*dig.Container, func())

BuildContainer Create a dependency injection container

func Init

func Init(ctx context.Context, opts ...Option) func()

Init - Application initialization

func InitHTTPServer

func InitHTTPServer(ctx context.Context, container *dig.Container) func()

InitHTTPServer - Initialize HTTP service

func InitStore

func InitStore(container *dig.Container) (func(), error)

InitStore - Initialize storage

func InitWeb

func InitWeb(container *dig.Container) *gin.Engine

InitWeb - Initialize the web engine

func SetTablePrefix

func SetTablePrefix(prefix string)

SetTablePrefix - Set the table name prefix

Types

type Config

type Config struct {
	Debug        bool
	DBType       string
	MaxLifetime  int
	MaxOpenConns int
	MaxIdleConns int
}

Config - Configuration parameter

type Option

type Option func(*options)

Option - Defining configuration items

func SetConfigFile

func SetConfigFile(s string) Option

SetConfigFile - Setting profile

func SetModelFile

func SetModelFile(s string) Option

SetModelFile - Set the casbin model configuration file

func SetPermissionFile

func SetPermissionFile(s string) Option

SetPermissionFile - Setting Permission data file

func SetSwaggerDir

func SetSwaggerDir(s string) Option

SetSwaggerDir - Set the swagger directory

func SetVersion

func SetVersion(s string) Option

SetVersion - Set the version number

func SetWWWDir

func SetWWWDir(s string) Option

SetWWWDir - Set static site directory

Jump to

Keyboard shortcuts

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