mirror of
https://github.com/mariocandela/beelzebub.git
synced 2025-07-01 18:47:26 -04:00
Feat: beelzebub cloud integrations (#117)
* improve beelzebub cloud integration * refactoring cloud integration, fix unit test * add unit test get honeypots * improve code coverage
This commit is contained in:
@ -3,7 +3,6 @@ package parser
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/mariocandela/beelzebub/v3/plugins"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
@ -15,9 +14,10 @@ import (
|
||||
// BeelzebubCoreConfigurations is the struct that contains the configurations of the core
|
||||
type BeelzebubCoreConfigurations struct {
|
||||
Core struct {
|
||||
Logging Logging `yaml:"logging"`
|
||||
Tracings Tracings `yaml:"tracings"`
|
||||
Prometheus Prometheus `yaml:"prometheus"`
|
||||
Logging Logging `yaml:"logging"`
|
||||
Tracings Tracings `yaml:"tracings"`
|
||||
Prometheus Prometheus `yaml:"prometheus"`
|
||||
BeelzebubCloud BeelzebubCloud `yaml:"beelzebub-cloud"`
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,8 +31,7 @@ type Logging struct {
|
||||
|
||||
// Tracings is the struct that contains the configurations of the tracings
|
||||
type Tracings struct {
|
||||
RabbitMQ `yaml:"rabbit-mq"`
|
||||
BeelzebubCloud `yaml:"beelzebub-cloud"`
|
||||
RabbitMQ `yaml:"rabbit-mq"`
|
||||
}
|
||||
|
||||
type BeelzebubCloud struct {
|
||||
@ -55,17 +54,6 @@ type Plugin struct {
|
||||
LLMModel string `yaml:"llmModel"`
|
||||
}
|
||||
|
||||
func FromString(llmModel string) (plugins.LLMModel, error) {
|
||||
switch llmModel {
|
||||
case "llama3":
|
||||
return plugins.LLAMA3, nil
|
||||
case "gpt4-o":
|
||||
return plugins.GPT4O, nil
|
||||
default:
|
||||
return -1, fmt.Errorf("model %s not found", llmModel)
|
||||
}
|
||||
}
|
||||
|
||||
// BeelzebubServiceConfiguration is the struct that contains the configurations of the honeypot service
|
||||
type BeelzebubServiceConfiguration struct {
|
||||
ApiVersion string `yaml:"apiVersion"`
|
||||
|
Reference in New Issue
Block a user