gofks

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExceptionResp

func ExceptionResp(ctx *gin.Context, resp errorx.ErrCode)

func InternalResp

func InternalResp(ctx *gin.Context, err *errorx.Error)

func Successful

func Successful(ctx *gin.Context, data interface{})

Types

type CronInter

type CronInter interface {
	Get() *cron.Cron
	Close()
}

func NewCronTask

func NewCronTask() CronInter

type Gofk

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

func Ignite

func Ignite(rootPath string, middles ...gin.HandlerFunc) *Gofk

Ignite 加载web路由

func NewRpcServer

func NewRpcServer(conf *pkgConf.Config) *Gofk

func WebSocket

func WebSocket(conf *gofkConf.Config, root string) *Gofk

WebSocket 简单封装

func (*Gofk) Attach

func (gk *Gofk) Attach(opts ...grpc.ServerOption) *Gofk

func (*Gofk) Cron

func (g *Gofk) Cron(cron string, expr interface{}) *Gofk

Cron 计划任务

func (*Gofk) GetGroup

func (g *Gofk) GetGroup() *gin.RouterGroup

GetGroup 获取当前路由

func (*Gofk) Group

func (g *Gofk) Group(path string) *gin.RouterGroup

Group 设置web子路由

func (*Gofk) Launch

func (g *Gofk) Launch()

Launch 启动 web 服务

func (*Gofk) LoadWatch

func (g *Gofk) LoadWatch(conf *gofkConf.Config) *Gofk

LoadWatch 加载配置文件与监听

func (*Gofk) Mount

func (g *Gofk) Mount(classes ...GofkCase) *Gofk

Mount 挂载 web、plugin 服务插件

func (*Gofk) PProf

func (g *Gofk) PProf(path string)

PProf 程序火箭图

func (*Gofk) Register

func (gk *Gofk) Register(servers ...zrpc.RpcRegisterInter) *Gofk

func (*Gofk) Start

func (gk *Gofk) Start() *Gofk

func (*Gofk) Stop

func (gk *Gofk) Stop()

func (*Gofk) WireApply

func (g *Gofk) WireApply(beans ...interface{}) *Gofk

WireApply 配置依赖,注入注册

type GofkCase

type GofkCase interface {
	Build(*Gofk)
	Name() string
}

type PluginManager

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

func Plugin

func Plugin(conf *gofkConf.Config) *PluginManager

func (*PluginManager) Attach

func (p *PluginManager) Attach(opts ...plugin.OptionFunc) *PluginManager

func (*PluginManager) Mount

func (p *PluginManager) Mount(access ...plugin.PluginItem) *PluginManager

func (*PluginManager) Run

func (p *PluginManager) Run()

type Resp

type Resp struct {
	Code    uint64
	Reason  string
	Message string
	Data    interface{}
}

Jump to

Keyboard shortcuts

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