app

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigFileName = "xodbox.yaml"
View Source
const DefaultNotifyFilter = "^/l"

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	TemplateData map[string]string `yaml:"template_data"`
	Handlers     []types.Handler
	Notifiers    []types.Notifier
}

func LoadApp

func LoadApp(configFile string) *AppConfig

type ConfigFile

type ConfigFile struct {
	Defaults  map[string]string   `yaml:"defaults"`
	Handlers  []map[string]string `yaml:"handlers"`
	Notifiers []map[string]string `yaml:"notifiers"`
}

func ConfigFromFile

func ConfigFromFile(configFile string) (*ConfigFile, error)

func (*ConfigFile) ToAppConfig

func (conf *ConfigFile) ToAppConfig() *AppConfig

type Xodbox

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

func NewXodbox

func NewXodbox(config *AppConfig) *Xodbox

func (*Xodbox) GetTemplateData

func (x *Xodbox) GetTemplateData() map[string]string

func (*Xodbox) RegisterNotificationHandler

func (x *Xodbox) RegisterNotificationHandler(n types.Notifier)

func (*Xodbox) Run

func (x *Xodbox) Run()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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