ant

package
v1.6.5 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseDb

func CloseDb()

CloseDb Close database connection

func Db

func Db(name ...string) *gorm.DB

Db Get database connection

func GetConfig

func GetConfig(name string) any

GetConfig Get configuration content<获取配置>

func Log

func Log() *zap.Logger

Log Get Log content

func Mgo

func Mgo(databaseName ...string) error

func Redis added in v1.5.2

func Redis(name ...string) *aredis.ClientRedis

Redis Select a different redis

func Register

func Register(ada serve.WebFrameWork)

Register the default adapter.<服务注册>

Types

type Engine

type Engine struct {
	Adapter serve.WebFrameWork
	Srv     *http.Server
	Config  config.ConfigStr
	// contains filtered or unexported fields
}

Engine is the core component of antgo.

func New added in v1.5.2

func New(configPath ...string) *Engine

New return the default engine instance.

func (*Engine) AddFunc added in v1.5.3

func (eng *Engine) AddFunc(f ...func()) *Engine

AddFunc Add function execution

func (*Engine) AddRemoteProvider added in v1.5.2

func (eng *Engine) AddRemoteProvider(provider, endpoint, path string) *Engine

AddSecureRemoteProvider.<添加远程连接>

func (*Engine) Close

func (eng *Engine) Close(f ...func()) *Engine

Close signal<关闭服务操作>

func (*Engine) Etcd added in v1.5.2

func (eng *Engine) Etcd(host []string, path, username, pwd string) *Engine

SetLog Modify log path.<修改日志路径>

func (*Engine) Serve

func (eng *Engine) Serve(app interface{}) *Engine

Serve http service<默认服务加载>

func (*Engine) SetConfig

func (eng *Engine) SetConfig(filePath ...string) *Engine

SetConfig Modify the configuration path<修改配置路径>

func (*Engine) SetLog

func (eng *Engine) SetLog(filePath string) *Engine

SetLog Modify log path.<修改日志路径>

func (*Engine) SetPort added in v1.6.5

func (eng *Engine) SetPort(port string) *Engine

SetPort Set Port

Jump to

Keyboard shortcuts

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