app

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HeadersSSE

func HeadersSSE(c *router.Context)

Types

type AppsRegistry

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

func NewAppsRegistry

func NewAppsRegistry(ctx *types.VertexContext) *AppsRegistry

func (*AppsRegistry) Apps

func (registry *AppsRegistry) Apps() map[string]Interface

func (*AppsRegistry) RegisterApp

func (registry *AppsRegistry) RegisterApp(app Interface)

type Context

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

func NewContext

func NewContext(vertexCtx *types.VertexContext) *Context

func (*Context) AddListener

func (ctx *Context) AddListener(listener event.Listener)

func (*Context) Db added in v0.16.0

func (ctx *Context) Db() *types.DB

func (*Context) DispatchEvent

func (ctx *Context) DispatchEvent(event event.Event)

func (*Context) DispatchEventWithErr added in v0.16.0

func (ctx *Context) DispatchEventWithErr(event event.Event) error

func (*Context) RemoveListener

func (ctx *Context) RemoveListener(listener event.Listener)

type DbSchemaProvider added in v0.16.0

type DbSchemaProvider interface {
	DbSchema(driver string) string
}

type HttpHandler

type HttpHandler func(r *router.Group)

type Initializable

type Initializable interface {
	Interface
	Initialize(r *router.Group) error
}

type Interface

type Interface interface {
	Load(ctx *Context)
	Meta() Meta
}

type KernelInitializable

type KernelInitializable interface {
	Interface
	InitializeKernel(r *router.Group) error
}

type KernelUninitializable

type KernelUninitializable interface {
	Interface
	UninitializeKernel() error
}

type Meta

type Meta struct {
	// ID is the unique identifier of the app.
	ID string `json:"id"`

	// Name is the name of the app visible to the user.
	Name string `json:"name"`

	// Description is a brief description of the app.
	Description string `json:"description"`

	// Icon is the material symbol name for the app.
	Icon string `json:"icon"`

	// Category is the category of the app.
	Category string `json:"category"`

	// Hidden is a flag that indicates if the app does only backend work and should be hidden from the frontend.
	Hidden bool `json:"hidden"`
}

type Service

type Service interface {
	OnEvent(e event.Event) error
}

type Uninitializable

type Uninitializable interface {
	Interface
	Uninitialize() error
}

Jump to

Keyboard shortcuts

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