Documentation
¶
Index ¶
- Variables
- func Meta[R any, T IMetaSource](metaSource T) (res R)
- func MetaSetValue[R any, T IMetaSource](metaSource T, key string, value R) error
- func MetaTryValue[R any, T IMetaSource](metaSource T, key string, d R) (res R, ok bool)
- func MetaTryValue2[R any, T IMetaSource](metaSource T, key string) (res R, ok bool)
- func MetaValue[R any, T IMetaSource](metaSource T, key string, d R) (res R)
- func MetaValueOrErr[R any, T IMetaSource](metaSource T, key string) (res R, err error)
- func TryMeta[R any, T IMetaSource](metaSource T) (res R, ok bool)
- type Action
- type Category
- type DataProto
- type DataType
- type Event2MapOpts
- type EventCloneOpts
- type ICommandSignature
- type IData
- type IDataFromFile
- type IDataFromMem
- type IEngine
- type IEngineConfig
- type IEvent
- type IMeta
- type IMetaSource
- type Kind
- type NewEventArgs
- type Opt
- type OwnerType
- type Priority
- type RawEvent
- type SetDataProto
- type Status
- type Type
- type UUID
Constants ¶
This section is empty.
Variables ¶
View Source
var MaxMetaSize func() int64
dconfig.go
event_new.go
View Source
var NewEvent2 func(opts NewEventArgs) IEvent
View Source
var NewEvent3 func(opts EventCloneOpts) IEvent
View Source
var NewMeta func(value map[string]any) IMeta
meta.go
View Source
var NewMeta2 func(value map[string]any, size int64) IMeta
View Source
var SetCommandSignature func(ctx context.Context, rawEvent *RawEvent, cmdId int64) error
utils.go
View Source
var SetEventDataFunc func(cfg IEngineConfig, fn DataProto) error
View Source
var SetEventSetDataFunc func(cfg IEngineConfig, fn SetDataProto) error
View Source
var SetEventSetDataRawFunc func(cfg IEngineConfig, fn SetDataProto) error
Functions ¶
func Meta ¶
func Meta[R any, T IMetaSource](metaSource T) (res R)
func MetaSetValue ¶
func MetaSetValue[R any, T IMetaSource](metaSource T, key string, value R) error
func MetaTryValue ¶
func MetaTryValue[R any, T IMetaSource](metaSource T, key string, d R) (res R, ok bool)
func MetaTryValue2 ¶
func MetaTryValue2[R any, T IMetaSource](metaSource T, key string) (res R, ok bool)
func MetaValue ¶
func MetaValue[R any, T IMetaSource](metaSource T, key string, d R) (res R)
func MetaValueOrErr ¶
func MetaValueOrErr[R any, T IMetaSource](metaSource T, key string) (res R, err error)
func TryMeta ¶
func TryMeta[R any, T IMetaSource](metaSource T) (res R, ok bool)
Types ¶
type Action ¶
type Action = include.EventAction
type Category ¶
type Category = include.EventCategory
func NormalizeCategory ¶
func NormalizeCategory[T constraints.Integer](category []T) []Category
type DataProto ¶
type DataProto = include.EventDataProto
type DataType ¶
type DataType = include.EventDataType
type Event2MapOpts ¶
type Event2MapOpts = include.Event2MapOpts
type EventCloneOpts ¶
type EventCloneOpts = include.EventCloneOpts
type ICommandSignature ¶
type ICommandSignature = include.ICommandSignature
type IDataFromFile ¶
type IDataFromFile = include.IDataFromFile
type IDataFromMem ¶
type IDataFromMem = include.IDataFromMem
type IEngineConfig ¶
type IEngineConfig = include.IEngineConfig
type IMetaSource ¶
type IMetaSource = include.IMetaSource
type NewEventArgs ¶
type NewEventArgs = include.NewEventArgs
type OwnerType ¶
type OwnerType = include.EventOwnerType
type Priority ¶
type Priority = include.EventPriority
type RawEvent ¶
type RawEvent struct {
// Уникальный идентификатор
VirtualUuid UUID `json:"virtual_uuid" xml:"virtual_uuid" form:"virtual_uuid"`
// Уникальный тег
Uuid UUID `json:"uuid" xml:"uuid" form:"uuid"`
// Вид (направление) ивента (number)
Kind Kind `json:"kind" xml:"kind" form:"kind"`
// Категория ивента (number)
Category []Category `json:"category" xml:"category" form:"category"`
// Операция (number)
Action Action `json:"action" xml:"action" form:"action"`
// Тип ивента
Type Type `json:"type" xml:"type" form:"type"`
// Статус
Status Status `json:"status,omitempty" xml:"status" form:"status"`
// Приоритет
Priority Priority `json:"priority,omitempty" xml:"priority" form:"priority"`
// Метаданные
Meta map[string]any `json:"meta" xml:"meta" form:"meta"`
// Размер метаданных
MetaSize int64 `json:"meta_size,omitempty" xml:"meta_size" form:"meta_size"`
// Размер данных привязанных к ивенту
DataSize int64 `json:"data_size" xml:"data_size" form:"data_size"`
// Максимальный размер данных, который может содержать ивент.
// Если значение не задано, оно определяется из конфига
DataMaxSize int64 `json:"data_max_size" xml:"data_max_size" form:"data_max_size"`
// Тип данных
DataType DataType `json:"data_type,omitempty" xml:"data_type" form:"data_type"`
// Владелец
OwnerUuid UUID `json:"owner_uuid" xml:"owner_uuid" form:"owner_uuid"`
// Тип владелеца
OwnerType OwnerType `json:"owner_type" xml:"owner_type" form:"owner_type"`
// Время создания
Created int64 `json:"created,omitempty" xml:"created" form:"created"`
// Время когда ивент станет просроченным
Expired int64 `json:"expired,omitempty" xml:"expired" form:"expired"`
// Произвольные настройки. Могут отсутствовать.
// Настраиваются кодом, в момент получения ивента.
Opts map[Opt]any
}
func (*RawEvent) CommandSignature ¶
func (w *RawEvent) CommandSignature() ICommandSignature
func (*RawEvent) SetCommandSignature ¶
func (w *RawEvent) SetCommandSignature(sig ICommandSignature)
type SetDataProto ¶
type SetDataProto = include.EventSetDataProto
type Status ¶
type Status = include.EventStatus
Click to show internal directories.
Click to hide internal directories.