framework

package module
v0.0.0-...-0fa948f Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBFramework

type DBFramework struct {
	MantiClient *manticoresearch.APIClient
}

func NewDBModulehandler

func NewDBModulehandler(DBHost string) *DBFramework
func NewDBModulehandler (handler func(map[string]interface{}) (map[string]interface{}, error), DBHost string) *DBFramework {
	newconfig := manticoresearch.NewConfiguration()
	newconfig.Servers[0].URL = DBHost
	client := manticoresearch.NewAPIClient(newconfig)
	db := &DBFramework{
		MantiClient: client,
		handler: handler,
	}
	return db
}

func (*DBFramework) AddLog

func (s *DBFramework) AddLog(log map[string]interface{}, index string, timestamp string) (err error)

func (*DBFramework) MatchJSON

func (s *DBFramework) MatchJSON(match_value string, matchKey string, indexName string, limit *int32) (result map[string]interface{}, err error)

func (*DBFramework) MatchLargerThanJSON

func (s *DBFramework) MatchLargerThanJSON(match_value string, matchKey string, largerThan any, limit *int32, indexName string) (result map[string]interface{}, err error)

func (*DBFramework) SQL

func (s *DBFramework) SQL(query string) (final_result map[string]interface{}, err error)

type ModuleHTTPFramework

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

func NewModuleHTTP

func NewModuleHTTP(handler func(map[string]interface{}) (map[string]interface{}, error)) *ModuleHTTPFramework

func (*ModuleHTTPFramework) RunModuleHTTP

func (s *ModuleHTTPFramework) RunModuleHTTP(port string) error

Jump to

Keyboard shortcuts

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