config

package
v0.0.0-...-e7e2df9 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: MIT Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SessionCache        cache.Cache
	SessionCacheTimeout float64

	ObjectCache        cache.Cache
	ObjectCacheTimeout float64

	TestSessionCache        cache.Cache
	TestSessionCacheTimeout float64
)
View Source
var ActiveMQs map[string]*activemq.ActiveMQ
View Source
var ApiKey string
View Source
var MQTTClients map[string]*mqttclient.MqttClient
View Source
var OpenAiKey string
View Source
var OpenAiModel string

Functions

This section is empty.

Types

type Config

type Config struct {
	Port              int                `json:"port"`
	Timeout           int                `json:"timeout"`
	Controllers       []Controller       `json:"controllers"`
	PluginControllers []PluginController `json:"plugins"`
	Portal            Portal             `json:"portal"`
	ApiKey            string             `json:"apikey"`
	OpenAiKey         string             `json:"openaikey"`
	OpenAiModel       string             `json:"openaimodel"`
}

func LoadConfig

func LoadConfig() (*Config, error)

type Controller

type Controller struct {
	Path      string     `json:"path"`
	Module    string     `json:"module"`
	Timeout   int        `json:"timeout"`
	Endpoints []Endpoint `json:"endpoints"`
}

type Endpoint

type Endpoint struct {
	Path    string `json:"path"`
	Method  string `json:"method"`
	Handler string `json:"handler"`
}

type GlobalConfig

type GlobalConfig struct {
	Instance           string                   `json:"instance"`
	InstanceType       string                   `json:"type"`
	InstanceName       string                   `json:"name"`
	SingalRConfig      map[string]interface{}   `json:"singalrconfig"`
	LogConfig          map[string]interface{}   `json:"log"`
	DocumentConfig     map[string]interface{}   `json:"documentdb"`
	DatabaseConfig     map[string]interface{}   `json:"database"`
	AltDatabasesConfig []map[string]interface{} `json:"altdatabases"`
	CacheConfig        map[string]interface{}   `json:"cache"`
	TranslationConfig  map[string]interface{}   `json:"translation"`
	WebServerConfig    map[string]interface{}   `json:"webserver"`
	Transaction        map[string]interface{}   `json:"transaction"`
	AppServer          map[string]interface{}   `json:"appserver"`
	Services           []map[string]interface{} `json:"services"`
}
var GlobalConfiguration *GlobalConfig

func LoadGlobalConfig

func LoadGlobalConfig() (*GlobalConfig, error)

type PluginController

type PluginController struct {
	Path      string     `json:"path"`
	Endpoints []Endpoint `json:"endpoints"`
}

type Portal

type Portal struct {
	Port  int    `json:"port"`
	Path  string `json:"path"`
	Home  string `json:"home"`
	Logon string `json:"logon"`
}

Jump to

Keyboard shortcuts

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