entities

package
v0.0.0-...-4604430 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrCodeParsingFailed                   = 1
	ErrCodeInvalidRuleEngineName           = 2
	ErrCodeInvalidTagName                  = 3
	ErrCodeInvalidRuleEngineConfig         = 4
	ErrCodeDatastoreFailed                 = 5
	ErrCodeRuleEngineNotFound              = 6
	ErrCodeTagNotFound                     = 7
	ErrCodeTagDeleteNotAllowed             = 8
	ErrCodeTagDisableNotAllowed            = 9
	ErrCodeDefaultTagExistAndMustBeEnabled = 10
	ErrCodeTagAlreadyExist                 = 11
	ErrCodeEvaluationFailed                = 12
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CompleteRuleEngine

type CompleteRuleEngine struct {
	Name       string                  `json:"name"`
	DefaultTag string                  `json:"defaultTag"`
	Tags       map[string]*TagResponse `json:"tags"`
}

type EngineConfig

type EngineConfig struct {
	ID               primitive.ObjectID               `bson:"_id"`
	EngineCoreConfig *ruleenginecore.RuleEngineConfig `bson:"config"`
}

type Error

type Error struct {
	ErrCode  uint   `json:"errCode"`
	ErrMsg   string `json:"errMsg"`
	OtherMsg string `json:"otherMsg"`
}

func NewError

func NewError(errCode uint) *Error

func NewErrorWithMsg

func NewErrorWithMsg(errCode uint, otherMsg string) *Error

func (*Error) Error

func (err *Error) Error() string

type RuleEngine

type RuleEngine struct {
	Name           string          `bson:"name"`
	DefaultTag     string          `bson:"defaultTag"`
	Tags           map[string]*Tag `bson:"tags"`
	LastUpdateTime int64           `bson:"lastUpdateTime"`
}

type Tag

type Tag struct {
	Name           string             `bson:"name"`
	EngineConfigID primitive.ObjectID `bson:"engineConfigId"`
	IsEnable       bool               `bson:"isEnable"`
}

type TagResponse

type TagResponse struct {
	IsEnable bool                             `json:"isEnable"`
	Config   *ruleenginecore.RuleEngineConfig `json:"config"`
}

Jump to

Keyboard shortcuts

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