harukap

package module
v0.0.0-...-22883c6 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2025 License: MIT Imports: 11 Imported by: 0

README

harukap

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthPlugin

type AuthPlugin interface {
	GetAuthInfo() (*commons.AuthInfo, error)
	AuthName() string
	GetAuthUserByToken(token string) (commons.AuthUser, error)
	TokenTypeName() string
}

type HarukaAppEngine

type HarukaAppEngine struct {
	ConfigProvider       *config.Provider
	Plugins              []HarukaPlugin
	LoggerPlugin         *youlog.Plugin
	HttpService          *haruka.Engine
	RPCService           *rpc.HarukaRPCService
	OnPluginInitComplete func()
}

func NewHarukaAppEngine

func NewHarukaAppEngine() *HarukaAppEngine

func (*HarukaAppEngine) GetPluginsConfig

func (e *HarukaAppEngine) GetPluginsConfig() map[string]map[string]interface{}

GetPluginsConfig 汇总所有实现了 PluginWithConfig 的插件配置

func (*HarukaAppEngine) Run

func (e *HarukaAppEngine) Run()

func (*HarukaAppEngine) RunRPC

func (e *HarukaAppEngine) RunRPC()

func (*HarukaAppEngine) UsePlugin

func (e *HarukaAppEngine) UsePlugin(plugins ...HarukaPlugin)

type HarukaPlugin

type HarukaPlugin interface {
	OnInit(e *HarukaAppEngine) error
}

type PluginWithConfig

type PluginWithConfig interface {
	GetPluginConfig() map[string]interface{}
}

PluginWithConfig 可选接口:插件实现后即可提供其配置快照

Jump to

Keyboard shortcuts

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