config

package
v0.0.0-...-33a1497 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigurations

func GetConfigurations() properties.Properties

Types

type MotionConfig

type MotionConfig struct {
	CacheTime    uint8
	ScrapingTime uint8
	HaveScraping bool
	InitialValue float32
}

func GetConfiguration

func GetConfiguration() MotionConfig

func GetMotionConfig

func GetMotionConfig() MotionConfig

func NewMotionConfig

func NewMotionConfig(p *properties.Properties) *MotionConfig

type MotionController

type MotionController struct {
	Path     string
	Handlers []MotionRouter
}

func NewMotionController

func NewMotionController(path string, controllers ...MotionRouter) MotionController

type MotionGo

type MotionGo struct {
	MotionEngine   *gin.Engine
	PropertiesFile *properties.Properties
	Routers        []RoutersVersion
}

func NewMotionGo

func NewMotionGo(propertiesFile string) *MotionGo

func (*MotionGo) AddRouter

func (m *MotionGo) AddRouter(version ...RoutersVersion)

func (*MotionGo) CreateRouters

func (m *MotionGo) CreateRouters(logger func() gin.HandlerFunc)

func (*MotionGo) RunEngine

func (m *MotionGo) RunEngine(serverPort string)

type MotionRouter

type MotionRouter struct {
	Path       string
	Method     string
	Service    func(*gin.Context)
	Middleware []gin.HandlerFunc
}

func NewMotionRouter

func NewMotionRouter(method, path string,
	service gin.HandlerFunc,
	middleware ...gin.HandlerFunc) MotionRouter

type RoutersVersion

type RoutersVersion struct {
	Version  string
	Handlers []func() MotionController
}

Jump to

Keyboard shortcuts

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