op

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WORK     = "work"
	RootName = "root"
)

Variables

View Source
var (
	ObjsUpdateHooks = make([]ObjsUpdateHook, 0)
)

Functions

func CallStorageHooks

func CallStorageHooks(typ string, storage driver.Driver)

func GetDriverInfoMap

func GetDriverInfoMap() map[string][]driver.Item
func GetDriverInfoMap() map[string]driver.Info {
	return driverInfoMap
}

func GetDriverNames

func GetDriverNames() []string

func HandleObjsUpdateHook

func HandleObjsUpdateHook(parent string, objs []model.Obj)

func HandleSettingItemHook

func HandleSettingItemHook(item *model.SettingItem) (hasHook bool, err error)

func RegisterDriver

func RegisterDriver(driver New)

func RegisterObjsUpdateHook

func RegisterObjsUpdateHook(hook ObjsUpdateHook)

func RegisterSettingItemHook

func RegisterSettingItemHook(key string, hook SettingItemHook)

func RegisterStorageHook

func RegisterStorageHook(hook StorageHook)

Types

type New

type New func() driver.Driver

func GetDriverNew

func GetDriverNew(name string) (New, error)

type ObjsUpdateHook

type ObjsUpdateHook = func(parent string, objs []model.Obj)

Obj

type SettingItemHook

type SettingItemHook func(item *model.SettingItem) error

Setting

type StorageHook

type StorageHook func(typ string, storage driver.Driver)

Storage

Jump to

Keyboard shortcuts

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