Back to

Package app

Latest Go to latest

The latest major version is .

Published: Dec 3, 2019 | License: GPL3 | Module:


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

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

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier