app

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNiceApp

func NewNiceApp(params ...interface{}) (interface{}, error)

NewNiceApp 初始化NiceApp

Types

type NiceApp

type NiceApp struct {
	// contains filtered or unexported fields
}

NiceApp 代表nice框架的App实现

func (*NiceApp) AppFolder

func (app *NiceApp) AppFolder() string

AppFolder 代表app目录

func (NiceApp) AppID

func (app NiceApp) AppID() string

AppID 表示这个App的唯一ID

func (NiceApp) BaseFolder

func (app NiceApp) BaseFolder() string

BaseFolder 表示基础目录,可以代表开发场景的目录,也可以代表运行时候的目录

func (NiceApp) CommandFolder

func (app NiceApp) CommandFolder() string

CommandFolder 定义业务定义的命令

func (NiceApp) ConfigFolder

func (app NiceApp) ConfigFolder() string

ConfigFolder 表示配置文件地址

func (NiceApp) ConsoleFolder

func (app NiceApp) ConsoleFolder() string

func (NiceApp) HttpFolder

func (app NiceApp) HttpFolder() string

func (*NiceApp) LoadAppConfig

func (app *NiceApp) LoadAppConfig(kv map[string]string)

LoadAppConfig 加载配置map

func (NiceApp) LogFolder

func (app NiceApp) LogFolder() string

LogFolder 表示日志存放地址

func (NiceApp) MiddlewareFolder

func (app NiceApp) MiddlewareFolder() string

MiddlewareFolder 定义业务自己定义的中间件

func (NiceApp) ProviderFolder

func (app NiceApp) ProviderFolder() string

ProviderFolder 定义业务自己的服务提供者地址

func (NiceApp) RuntimeFolder

func (app NiceApp) RuntimeFolder() string

RuntimeFolder 定义业务的运行中间态信息

func (NiceApp) StorageFolder

func (app NiceApp) StorageFolder() string

func (NiceApp) TestFolder

func (app NiceApp) TestFolder() string

TestFolder 定义测试需要的信息

func (NiceApp) Version

func (app NiceApp) Version() string

Version 实现版本

type NiceAppProvider

type NiceAppProvider struct {
	BaseFolder string
}

NiceAppProvider 提供App的具体实现方法

func (*NiceAppProvider) Boot

func (h *NiceAppProvider) Boot(container framework.Container) error

Boot 启动调用

func (*NiceAppProvider) IsDefer

func (h *NiceAppProvider) IsDefer() bool

IsDefer 是否延迟初始化

func (*NiceAppProvider) Name

func (h *NiceAppProvider) Name() string

Name 获取字符串凭证

func (*NiceAppProvider) Params

func (h *NiceAppProvider) Params(container framework.Container) []interface{}

Params 获取初始化参数

func (*NiceAppProvider) Register

func (h *NiceAppProvider) Register(container framework.Container) framework.NewInstance

Register 注册NiceApp方法

Jump to

Keyboard shortcuts

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