pkg

package
v0.0.0-...-a19e633 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHealthStatus

func GetHealthStatus(m *nmodule.Module, r *router.Request) ([]byte, error)

func GetWeather

func GetWeather(m *nmodule.Module, r *router.Request) ([]byte, error)

func InitRouter

func InitRouter()

Types

type Config

type Config struct {
	Town     string        `yaml:"town"`
	LoopTime time.Duration `yaml:"loop_time"`
	LogLevel string        `yaml:"log_level"`
}

type Module

type Module struct {
	ErrorOnDB bool
	// contains filtered or unexported fields
}

func (*Module) CallModule

func (m *Module) CallModule(method nhttp.Method, urlString string, headers http.Header, body []byte) ([]byte, error)

func (*Module) DefaultConfig

func (m *Module) DefaultConfig() *Config

func (*Module) Disable

func (m *Module) Disable() error

func (*Module) Enable

func (m *Module) Enable() error

func (*Module) GetConfig

func (m *Module) GetConfig() interface{}

func (*Module) GetInfo

func (m *Module) GetInfo() (*nmodule.Info, error)

func (*Module) Init

func (m *Module) Init(dbHelper nmodule.DBHelper, moduleName string) error

func (*Module) ValidateAndSetConfig

func (m *Module) ValidateAndSetConfig(config []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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