types

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigDir = "./config/"

ConfigDir the directory for config files

View Source
const CoreModulesDir = "./core/Modules"

CoreModulesDir set the directory for modules

View Source
const ModulesDir = "./src/Modules"

ModulesDir set the directory for modules

Variables

This section is empty.

Functions

This section is empty.

Types

type Dependencies

type Dependencies struct {
	XMLName      xml.Name `xml:"dependencies"`
	Dependencies []string `xml:"dependency"`
}

Dependencies struct - dependencies xml interface

type EventFunc

type EventFunc func(data ...interface{})

EventFunc type of events func

type Events

type Events struct {
	XMLName   xml.Name   `xml:"events"`
	Listeners []Listener `xml:"listener"`
}

Events struct - events xml interface

type Exception

type Exception struct {
	Message string `json:"message"`
}

Exception struct declaration

type Listener

type Listener struct {
	XMLName xml.Name `xml:"listener"`
	For     string   `xml:"for,attr"`
	Call    string   `xml:"call,attr"`
	Name    string   `xml:"name,attr"`
}

Listener struct - listener xml interface

type Module

type Module interface {
	GetEventFuncs() map[string]EventFunc
	Install()
	Upgrade(version string)
	MapRoutes()
}

Module interface

type ModuleConfig

type ModuleConfig struct {
	XMLName xml.Name `xml:"module"`
	Name    string   `xml:"name"`
	Enabled bool     `xml:"enabled"`
}

ModuleConfig structure for specific module

type ModuleXML

type ModuleXML struct {
	XMLName      xml.Name     `xml:"module"`
	Name         string       `xml:"name"`
	Func         string       `xml:"func"`
	Version      string       `xml:"version"`
	Events       Events       `xml:"events"`
	Dependencies Dependencies `xml:"dependencies"`
	Dir          string
}

ModuleXML struct - xml interface

type ModulesConfigXML

type ModulesConfigXML struct {
	XMLName xml.Name       `xml:"modules"`
	Modules []ModuleConfig `xml:"module"`
}

ModulesConfigXML structure for XML of modules config

Jump to

Keyboard shortcuts

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