Documentation
¶
Index ¶
- Constants
- Variables
- type AppQName
- func (aqn AppQName) IsSys() bool
- func (aqn *AppQName) MarshalJSON() ([]byte, error)
- func (aqn AppQName) MarshalText() (text []byte, err error)
- func (aqn *AppQName) Name() string
- func (aqn *AppQName) Owner() string
- func (aqn AppQName) String() string
- func (aqn *AppQName) UnmarshalJSON(text []byte) (err error)
- func (aqn *AppQName) UnmarshalText(text []byte) (err error)
- type CUDValidator
- type ClusterAppID
- type ClusterID
- type CommandPrepareArgs
- type ConnectedDeviceID
- type EventValidator
- type ExecCommandArgs
- type ExecQueryArgs
- type ExecQueryCallback
- type GenericPayload
- type GenericRawEventBuilderParams
- type IAbstractEvent
- type IAppStructs
- type IAppStructsProvider
- type IAppTokens
- type ICRecord
- type ICUD
- type ICUDRow
- type ICommandFunction
- type IDType
- type IDbEvent
- type IEditableRecord
- type IEventError
- type IEvents
- type IFunction
- type IGRecord
- type IIDGenerator
- type IIntents
- type IKey
- type IKeyBuilder
- type IORecord
- type IObject
- type IObjectBuilder
- type IPLogEvent
- type IPkgNameResolver
- type IQueryFunction
- type IRawEvent
- type IRawEventBuilder
- type IRecord
- type IRecords
- type IResource
- type IResources
- type IRowReader
- type IRowWriter
- type IState
- type IStateKeyBuilder
- type IStateValue
- type IStateValueBuilder
- type IValue
- type IValueBuilder
- type IViewRecords
- type IWLogEvent
- type NewRawEventBuilderParams
- type NullObject
- func (no *NullObject) AsRecord() IRecord
- func (*NullObject) Children(container string, cb func(IObject))
- func (no *NullObject) Container() string
- func (*NullObject) Containers(func(string))
- func (no *NullObject) FieldNames(func(string))
- func (no *NullObject) ID() RecordID
- func (no *NullObject) Parent() RecordID
- func (*NullObject) QName() appdef.QName
- type NullObjectBuilder
- type NullRowReader
- func (*NullRowReader) AsBool(name string) bool
- func (*NullRowReader) AsBytes(name string) []byte
- func (*NullRowReader) AsFloat32(name string) float32
- func (*NullRowReader) AsFloat64(name string) float64
- func (*NullRowReader) AsInt32(name string) int32
- func (*NullRowReader) AsInt64(name string) int64
- func (*NullRowReader) AsQName(name string) appdef.QName
- func (*NullRowReader) AsRecordID(name string) RecordID
- func (*NullRowReader) AsString(name string) string
- func (*NullRowReader) RecordIDs(includeNulls bool, cb func(name string, value RecordID))
- type NullRowWriter
- func (*NullRowWriter) PutBool(string, bool)
- func (*NullRowWriter) PutBytes(string, []byte)
- func (*NullRowWriter) PutChars(string, string)
- func (*NullRowWriter) PutFloat32(string, float32)
- func (*NullRowWriter) PutFloat64(string, float64)
- func (*NullRowWriter) PutFromJSON(map[string]any)
- func (*NullRowWriter) PutInt32(string, int32)
- func (*NullRowWriter) PutInt64(string, int64)
- func (*NullRowWriter) PutNumber(string, float64)
- func (*NullRowWriter) PutQName(string, appdef.QName)
- func (*NullRowWriter) PutRecordID(string, RecordID)
- func (*NullRowWriter) PutString(string, string)
- type NumAppPartitions
- type NumAppWorkspaces
- type NumCommandProcessors
- type NumQueryProcessors
- type Offset
- type PLogEventsReaderCallback
- type PartitionID
- type PrepareArgs
- type Projector
- type Projectors
- type RateLimit
- type RateLimitKind
- type RecordGetBatchItem
- type RecordID
- type ResourceKindType
- type StateValueCallback
- type SubjectKindType
- type SubjectLogin
- type SyncRawEventBuilderParams
- type UnixMilli
- type ValidatorMatchFunc
- type ValueCallback
- type ValuesCallback
- type ViewKV
- type ViewRecordGetBatchItem
- type WLogEventsReaderCallback
- type WSID
Constants ¶
const ( // RecordID = RegisterID * RegisterFactor + BaseRecordID RegisterFactor = 5000000000 // ClusterDBSer is used to generate cluster-side IDs // ID = PrimaryDCBaseID + some sequenced number ClusterAsRegisterID = 0xFFFF - 1000 + iota ClusterAsCRecordRegisterID )
RecordID generation
const ( NullClusterID = ClusterID(iota) MainClusterID )
const ( ClusterAppID_null = ClusterAppID(0) + iota ClusterAppID_sys_registry ClusterAppID_untill_airs_bp ClusterAppID_test1_app1 ClusterAppID_test1_app2 ClusterAppID_test2_app1 ClusterAppID_test2_app2 ClusterAppID_sys_blobber ClusterAppID_sys_router ClusterAppID_untill_resellerportal ClusterAppID_sys_cluster ClusterAppID_FakeLast )
const AppQNameQualifierChar = "/"
AppQNameQualifierChar: char to separate application owner (provider) from application name
const DefaultNumAppWorkspaces = NumAppWorkspaces(10)
const FirstBaseAppWSID = MaxPseudoBaseWSID + 1
Application Workspaces
const FirstBaseRecordID = MaxReservedBaseRecordID + 1
This is the first value which must be returned by the IDGenerator (in the Command Processor) for the given workspace
const FirstBaseUserWSID = FirstBaseAppWSID + 0xffff
User Workspaces
const FirstGeneratedAppID = ClusterAppID(0x100)
const FirstOffset = Offset(1)
const FirstPseudoBaseWSID = NullWSID
Pseudo Workspaces
const FirstSingletonID = MinReservedBaseRecordID
Singleton - CDoc which has at most one record
const MaxClusterID = ClusterID(0xffff)
const MaxPseudoBaseWSID = WSID(0xffff)
const MaxRawRecordID = RecordID(0xffff)
const MaxReservedBaseRecordID = MinReservedBaseRecordID + 0xffff
const MaxSingletonID = FirstSingletonID + 0x1ff
const MinRawRecordID = RecordID(1)
MinRawRecordID and MaxRawRecordID: range bounds for "raw" RecordIDs which are generated by client and must be re-generated
const MinReservedBaseRecordID = MaxRawRecordID + 1
const NonExistingRecordID = MaxSingletonID + 1
Used to test behaviour on providing the unexisting record ID
const NullClusterAppID = ClusterAppID_null
const NullOffset = Offset(0)
const NullRecordID = RecordID(0)
const NullWSID = WSID(0)
const ReadToTheEnd = int(^uint(0) >> 1)
It is 0x7FFF_FFFF_FFFF_FFFF for x64 architecture, ref. https://play.golang.org/p/HBoCflcoERV Used by IEvents.Read* methods
const SysOwner = "sys"
const WSIDClusterLShift = 64 - 16 - 1
WSID = ClusterID << WSIDClusterLShift + NextWSID()
Variables ¶
var ( // QNameForError is a marker of error in log QNameForError = appdef.NewQName(appdef.SysPackage, "Error") // QNameCommand is used in core-irates QNameCommand = appdef.NewQName(appdef.SysPackage, "Command") // QNameQuery is used in core-irates QNameQuery = appdef.NewQName(appdef.SysPackage, "Query") QNameCommandCUD = appdef.NewQName(appdef.SysPackage, "CUD") // QNameRaw denotes that Function argument comes as a JSON object QNameRaw = appdef.NewQName(appdef.SysPackage, "Raw") QNameCDoc = appdef.NewQName(appdef.SysPackage, "CDoc") QNameWDoc = appdef.NewQName(appdef.SysPackage, "WDoc") QNameODoc = appdef.NewQName(appdef.SysPackage, "ODoc") QNameCRecord = appdef.NewQName(appdef.SysPackage, "CRecord") QNameWRecord = appdef.NewQName(appdef.SysPackage, "WRecord") QNameORecord = appdef.NewQName(appdef.SysPackage, "ORecord") )
var AppQName_null = NullAppQName
var AppQName_sys_blobber = NewAppQName(SysOwner, "blobber")
var AppQName_sys_cluster = NewAppQName(SysOwner, "cluster")
var AppQName_sys_registry = NewAppQName(SysOwner, "registry")
var AppQName_sys_router = NewAppQName(SysOwner, "router") // For ACME certificates
var AppQName_test1_app1 = NewAppQName("test1", "app1")
var AppQName_test1_app2 = NewAppQName("test1", "app2")
var AppQName_test2_app1 = NewAppQName("test2", "app1")
var AppQName_test2_app2 = NewAppQName("test2", "app2")
var AppQName_untill_airs_bp = NewAppQName("untill", "airs-bp")
var AppQName_untill_resellerportal = NewAppQName("untill", "resellerportal")
var ClusterApps = map[AppQName]ClusterAppID{ AppQName_null: ClusterAppID_null, AppQName_sys_registry: ClusterAppID_sys_registry, AppQName_test1_app1: ClusterAppID_test1_app1, AppQName_test1_app2: ClusterAppID_test1_app2, AppQName_test2_app1: ClusterAppID_test2_app1, AppQName_test2_app2: ClusterAppID_test2_app2, AppQName_untill_airs_bp: ClusterAppID_untill_airs_bp, AppQName_sys_blobber: ClusterAppID_sys_blobber, AppQName_sys_router: ClusterAppID_sys_router, AppQName_untill_resellerportal: ClusterAppID_untill_resellerportal, AppQName_sys_cluster: ClusterAppID_sys_cluster, }
var ErrAppNotFound = errors.New("application not found")
var MinClusterRecordID = NewRecordID(NullRecordID)
var NullAppQName = NewAppQName(appdef.NullName, appdef.NullName)
NullAppQName is undefined (or empty) application name
Functions ¶
This section is empty.
Types ¶
type AppQName ¶
type AppQName struct {
// contains filtered or unexported fields
}
AppQName is unique in cluster federation <owner>/<name> sys/registry unTill/airs-bp test1/app1 test1/app2 test2/app1 test2/app2 Ref. utils.go for methods
func MustParseAppQName ¶
func NewAppQName ¶
func ParseAppQName ¶
func (*AppQName) MarshalJSON ¶
func (AppQName) MarshalText ¶
need to marshal map[AppQName]any
func (*AppQName) UnmarshalJSON ¶
func (*AppQName) UnmarshalText ¶
need to unmarshal map[AppQName]any golang json looks on UnmarshalText presence only on unmarshal map[QName]any. UnmarshalJSON() will be used anyway but no UnmarshalText -> fail to unmarshal map[AppQName]any see https://github.com/golang/go/issues/29732
type CUDValidator ¶
type CUDValidator struct { Match ValidatorMatchFunc Validate func(ctx context.Context, appStructs IAppStructs, cudRow ICUDRow, wsid WSID, cmdQName appdef.QName) error }
type ClusterAppID ¶
type ClusterAppID = uint32
Unique per cluster (Different clusters might have different ID for the same App) 2^32 apps per clusters
type CommandPrepareArgs ¶
type CommandPrepareArgs struct { PrepareArgs ArgumentUnloggedObject IObject }
type EventValidator ¶
type ExecCommandArgs ¶
type ExecCommandArgs struct { CommandPrepareArgs State IState Intents IIntents }
type ExecQueryArgs ¶
type ExecQueryArgs struct { PrepareArgs State IState }
type ExecQueryCallback ¶
type GenericPayload ¶
All payloads must inherit this payload
type GenericRawEventBuilderParams ¶
type GenericRawEventBuilderParams struct { // Bytes from which events are built // If error happens these bytes are stored and returned as part of the IDbEvent.Error() result EventBytes []byte HandlingPartition PartitionID PLogOffset Offset Workspace WSID WLogOffset Offset QName appdef.QName RegisteredAt UnixMilli }
type IAbstractEvent ¶
type IAppStructs ¶
type IAppStructs interface { Events() IEvents Records() IRecords ViewRecords() IViewRecords ObjectBuilder(appdef.QName) IObjectBuilder // Working with resources like functions, images (in the future) // Function can be inside WASM, container, executable, jar, zip etc. Resources() IResources // AppDef AppDef() appdef.IAppDef ClusterAppID() ClusterAppID AppQName() AppQName IsFunctionRateLimitsExceeded(funcQName appdef.QName, wsid WSID) bool // Describe package names DescribePackageNames() []string // Describe package content DescribePackage(pkgName string) interface{} SyncProjectors() Projectors AsyncProjectors() Projectors CUDValidators() []CUDValidator EventValidators() []EventValidator NumAppWorkspaces() NumAppWorkspaces AppTokens() IAppTokens }
type IAppStructsProvider ¶
type IAppStructsProvider interface { // ErrAppNotFound can be returned // @ConcurrentAccess AppStructs(aqn AppQName) (structs IAppStructs, err error) AppStructsByDef(aqn AppQName, appDef appdef.IAppDef) (structs IAppStructs, err error) }
Structs can be changed on-the-fly, so AppStructs() are taken for each message (request) to be handled
type IAppTokens ¶
type IAppTokens interface { // Calls istructs.IssueToken for given App IssueToken(duration time.Duration, pointerToPayload interface{}) (token string, err error) // ErrTokenIssuedForAnotherApp is returned (check using errors.Is(...)) when token is issued for another application ValidateToken(token string, pointerToPayload interface{}) (gp GenericPayload, err error) }
Same as itokens.ITokens but works for App specified in IAppTokensFactory App is configured per interface instance placed here because otherwise IAppStructs.AppTokens() would depend on itokens-payloads
type ICRecord ¶
type ICRecord interface { IEditableRecord }
type ICUD ¶
type ICUD interface { // Container argument can be empty for root records (documents) Create(qName appdef.QName) IRowWriter // Only record's ID and QName will be kept in the resulting event // It is possible to submit NullRecord (when record not found) Update(record IRecord) IRowWriter }
type ICommandFunction ¶
type ICommandFunction interface { IFunction Exec(args ExecCommandArgs) error }
type IDbEvent ¶
type IDbEvent interface { IAbstractEvent // originalQName is a string which potentially contains QName representation // May be in a form which is not possible to convert to QName Error() IEventError }
What is kept in database
type IEditableRecord ¶
type IEventError ¶
type IEventError interface { ErrStr() string QNameFromParams() appdef.QName // If true event data can be taken from I*Event fields ValidEvent() bool // Original bytes the event was deserialized from // nil if ValidEvent == true // Function with unlogged params can have ValidEvent == false and EventBytes == nil // DO NOT CHANGE OriginalEventBytes() []byte }
type IEvents ¶
type IEvents interface { GetSyncRawEventBuilder(params SyncRawEventBuilderParams) IRawEventBuilder GetNewRawEventBuilder(params NewRawEventBuilderParams) IRawEventBuilder // @ConcurrentAccess RW // buildOrValidationErr taken either BuildRawEvent() or from extra validation // // Raw event `ev` valid until `event.Release()` PutPlog(ev IRawEvent, buildOrValidationErr error, generator IIDGenerator) (event IPLogEvent, saveErr error) // @ConcurrentAccess RW PutWlog(IPLogEvent) error // @ConcurrentAccess R // consts.ReadToTheEnd can be used for the toReadCount parameter ReadPLog(ctx context.Context, partition PartitionID, offset Offset, toReadCount int, cb PLogEventsReaderCallback) (err error) ReadWLog(ctx context.Context, workspace WSID, offset Offset, toReadCount int, cb WLogEventsReaderCallback) (err error) }
type IGRecord ¶
type IGRecord interface { IEditableRecord }
type IIDGenerator ¶
type IIntents ¶
type IIntents interface { // NewValue returns a new value builder for given get // If a value with the same get already exists in storage, it will be replaced NewValue(key IStateKeyBuilder) (builder IStateValueBuilder, err error) // UpdateValue returns a value builder to update existing value UpdateValue(key IStateKeyBuilder, existingValue IStateValue) (builder IStateValueBuilder, err error) // returns nil when not found FindIntent(key IStateKeyBuilder) IStateValueBuilder }
type IKey ¶
type IKey interface { IRowReader }
type IKeyBuilder ¶
type IKeyBuilder interface { IRowWriter PartitionKey() IRowWriter ClusteringColumns() IRowWriter // Equals returns is src key builder has the same QName and field values. See #!21906 Equals(src IKeyBuilder) bool // Puts key to bytes for specified workspace id // // Returns error if there were errors when calling Put-methods ToBytes(WSID) (pk, cc []byte, err error) }
ref. also https://cassandra.apache.org/doc/latest/cassandra/cql/ddl.html FIXME implement IRowWriter
type IObject ¶
type IObject interface { IRowReader QName() appdef.QName // Children in given container // // if container is empty string then enums all children Children(container string, cb func(IObject)) // First level qname-s Containers(func(string)) // Does NOT panic if it is not actually IRecord // Just a wrapper which uses consts.SystemField* // If element does not have some IRecord-related field, panic occurs when the field is read AsRecord() IRecord }
func NewNullObject ¶
func NewNullObject() IObject
type IObjectBuilder ¶
type IObjectBuilder interface { IRowWriter // Fill object from JSON FillFromJSON(map[string]any) // Build child for nested container ChildBuilder(containerName string) IObjectBuilder // Function validates object structure Build() (object IObject, err error) }
func NewNullObjectBuilder ¶
func NewNullObjectBuilder() IObjectBuilder
type IPLogEvent ¶
What is kept in database
type IPkgNameResolver ¶
type IQueryFunction ¶
type IQueryFunction interface { IFunction // panics if created by not NewQueryFunctionCustomResult(). Actually needed for q.sys.Collection only ResultType(args PrepareArgs) appdef.QName Exec(ctx context.Context, args ExecQueryArgs, callback ExecQueryCallback) error }
type IRawEvent ¶
type IRawEvent interface { IAbstractEvent ArgumentUnloggedObject() IObject HandlingPartition() PartitionID PLogOffset() Offset Workspace() WSID WLogOffset() Offset }
type IRawEventBuilder ¶
type IRawEventBuilder interface { // For sys.CUD command it is not called ArgumentObjectBuilder() IObjectBuilder ArgumentUnloggedObjectBuilder() IObjectBuilder CUDBuilder() ICUD // Must be last call to IRawEventBuilder // If err is not nil IRawEvent contains event with error BuildRawEvent() (raw IRawEvent, buildError error) }
type IRecord ¶
type IRecord interface { IRowReader QName() appdef.QName ID() RecordID // NullRecordID for documents Parent() RecordID // Container is empty for documents Container() string }
Base abstract record
type IRecords ¶
type IRecords interface { // Apply all CUDs, ODocs and WDocs from the given IPLogEvent // @ConcurrentAccess RW // Panics if event is not valid Apply(event IPLogEvent) (err error) // cb gets new version of each record affected by CUDs // Panics if event is not valid Apply2(event IPLogEvent, cb func(r IRecord)) (err error) // @ConcurrentAccess RW // // Record system fields sys.QName and sys.ID should be filled. // Data type name in sys.QName should be storable record type. // Record ID in sys.ID should not be a raw ID. // // Attention! This method does not perform a full validation of the recorded data : // - The values of referenced record IDs are not checked // - The fullness of the required fields is not checked PutJSON(WSID, map[appdef.FieldName]any) error // @ConcurrentAccess R // Can read GDoc, CDoc, ODoc, WDoc records // If record not found NullRecord with QName() == NullQName is returned // NullRecord.WSID & ID will be taken from arguments Get(workspace WSID, highConsistency bool, id RecordID) (record IRecord, err error) GetBatch(workspace WSID, highConsistency bool, ids []RecordGetBatchItem) (err error) // @ConcurrentAccess R // qName must be a singleton // If record not found NullRecord with QName() == NullQName is returned GetSingleton(workspace WSID, qName appdef.QName) (record IRecord, err error) }
type IResource ¶
type IResource interface { // Ref. ResourceKind_* constants Kind() ResourceKindType QName() appdef.QName }
type IResources ¶
type IResources interface { // If resource not found then {ResourceKind_null, QNameForNullResource) is returned // Currently resources are ICommandFunction and IQueryFunction QueryResource(resource appdef.QName) (r IResource) // Enumerates all application resources Resources(func(resName appdef.QName)) }
type IRowReader ¶
type IRowReader interface { AsInt32(appdef.FieldName) int32 AsInt64(appdef.FieldName) int64 AsFloat32(appdef.FieldName) float32 AsFloat64(appdef.FieldName) float64 // Returns bytes or raw field value AsBytes(appdef.FieldName) []byte // Returns string or raw field value AsString(appdef.FieldName) string AsQName(appdef.FieldName) appdef.QName AsBool(appdef.FieldName) bool AsRecordID(appdef.FieldName) RecordID // consts.NullRecord will be returned as null-values RecordIDs(includeNulls bool, cb func(appdef.FieldName, RecordID)) FieldNames(cb func(appdef.FieldName)) }
panics if name does not exist in type If field is nil zero value is returned
type IRowWriter ¶
type IRowWriter interface { PutInt32(appdef.FieldName, int32) PutInt64(appdef.FieldName, int64) PutFloat32(appdef.FieldName, float32) PutFloat64(appdef.FieldName, float64) // Puts value into bytes or raw data field. PutBytes(appdef.FieldName, []byte) // Puts value into string or raw data field. PutString(appdef.FieldName, string) PutQName(appdef.FieldName, appdef.QName) PutBool(appdef.FieldName, bool) PutRecordID(appdef.FieldName, RecordID) // Puts value into int23, int64, float32, float64 or RecordID data type fields. // // Tries to make conversion from value to a name type PutNumber(appdef.FieldName, float64) // Puts value into string, bytes or QName data type field. // // Tries to make conversion from value to a name type PutChars(appdef.FieldName, string) // Puts value into fields. Field names are taken from map keys, values are taken from map values. // // Calls PutNumber for numbers and RecordIDs, PutChars for strings, bytes and QNames. PutFromJSON(map[appdef.FieldName]any) }
type IState ¶
type IState interface { // NewKey returns a Key builder for specified storage and entity name KeyBuilder(storage, entity appdef.QName) (builder IStateKeyBuilder, err error) CanExist(key IStateKeyBuilder) (value IStateValue, ok bool, err error) CanExistAll(keys []IStateKeyBuilder, callback StateValueCallback) (err error) MustExist(key IStateKeyBuilder) (value IStateValue, err error) MustExistAll(keys []IStateKeyBuilder, callback StateValueCallback) (err error) MustNotExist(key IStateKeyBuilder) (err error) MustNotExistAll(keys []IStateKeyBuilder) (err error) // Read reads all values according to the get and return them in callback Read(key IStateKeyBuilder, callback ValueCallback) (err error) // For projectors PLogEvent() IPLogEvent App() AppQName }
type IStateKeyBuilder ¶
type IStateKeyBuilder interface { IKeyBuilder Storage() appdef.QName Entity() appdef.QName }
type IStateValue ¶
type IStateValue interface { IValue AsValue(name string) IStateValue Length() int GetAsString(index int) string GetAsBytes(index int) []byte GetAsInt32(index int) int32 GetAsInt64(index int) int64 GetAsFloat32(index int) float32 GetAsFloat64(index int) float64 GetAsQName(index int) appdef.QName GetAsBool(index int) bool GetAsValue(index int) IStateValue }
type IStateValueBuilder ¶
type IStateValueBuilder interface { IValueBuilder BuildValue() IStateValue Equal(to IStateValueBuilder) bool // used in TestState }
type IValue ¶
type IValue interface { IRowReader AsRecord(appdef.FieldName) IRecord AsEvent(appdef.FieldName) IDbEvent }
@Tricky
type IValueBuilder ¶
type IViewRecords ¶
type IViewRecords interface { KeyBuilder(view appdef.QName) IKeyBuilder NewValueBuilder(view appdef.QName) IValueBuilder UpdateValueBuilder(view appdef.QName, existing IValue) IValueBuilder // All key fields must be specified (panic) // Key & value must be from the same QName (panic) Put(workspace WSID, key IKeyBuilder, value IValueBuilder) (err error) PutBatch(workspace WSID, batch []ViewKV) (err error) // @ConcurrentAccess RW // // View name should be passed in sys.QName field. // All key fields should be filled. // // Attention! This method does not perform a full validation of the recorded data : // - The values of referenced record IDs are not checked // - The fullness of the required view value fields is not checked PutJSON(WSID, map[appdef.FieldName]any) error // All fields must be filled in in the key (panic otherwise) Get(workspace WSID, key IKeyBuilder) (value IValue, err error) GetBatch(workspace WSID, kv []ViewRecordGetBatchItem) (err error) // All fields of key.PartitionKey MUST be specified (panic) // Zero or more fields of key.ClusteringColumns can be specified // If last clustering column has variable length it can be filled partially Read(ctx context.Context, workspace WSID, key IKeyBuilder, cb ValuesCallback) (err error) }
type IWLogEvent ¶
type IWLogEvent interface { IDbEvent Release() }
type NewRawEventBuilderParams ¶
type NewRawEventBuilderParams struct {
GenericRawEventBuilderParams
}
type NullObject ¶
type NullObject struct{ NullRowReader }
Implements IObject
func (*NullObject) AsRecord ¶
func (no *NullObject) AsRecord() IRecord
func (*NullObject) Children ¶
func (*NullObject) Children(container string, cb func(IObject))
func (*NullObject) Container ¶
func (no *NullObject) Container() string
func (*NullObject) Containers ¶
func (*NullObject) Containers(func(string))
func (*NullObject) FieldNames ¶
func (no *NullObject) FieldNames(func(string))
func (*NullObject) ID ¶
func (no *NullObject) ID() RecordID
func (*NullObject) Parent ¶
func (no *NullObject) Parent() RecordID
func (*NullObject) QName ¶
func (*NullObject) QName() appdef.QName
type NullObjectBuilder ¶
type NullObjectBuilder struct{ NullRowWriter }
Implements IObjectBuilder
func (*NullObjectBuilder) Build ¶
func (*NullObjectBuilder) Build() (IObject, error)
func (*NullObjectBuilder) ChildBuilder ¶
func (*NullObjectBuilder) ChildBuilder(string) IObjectBuilder
func (*NullObjectBuilder) FillFromJSON ¶
func (*NullObjectBuilder) FillFromJSON(map[string]any)
type NullRowReader ¶
type NullRowReader struct{}
Implements IRowReader
func (*NullRowReader) AsBool ¶
func (*NullRowReader) AsBool(name string) bool
func (*NullRowReader) AsBytes ¶
func (*NullRowReader) AsBytes(name string) []byte
func (*NullRowReader) AsFloat32 ¶
func (*NullRowReader) AsFloat32(name string) float32
func (*NullRowReader) AsFloat64 ¶
func (*NullRowReader) AsFloat64(name string) float64
func (*NullRowReader) AsInt32 ¶
func (*NullRowReader) AsInt32(name string) int32
func (*NullRowReader) AsInt64 ¶
func (*NullRowReader) AsInt64(name string) int64
func (*NullRowReader) AsRecordID ¶
func (*NullRowReader) AsRecordID(name string) RecordID
func (*NullRowReader) AsString ¶
func (*NullRowReader) AsString(name string) string
type NullRowWriter ¶
type NullRowWriter struct{}
Implements IRowWriter
func (*NullRowWriter) PutBool ¶
func (*NullRowWriter) PutBool(string, bool)
func (*NullRowWriter) PutBytes ¶
func (*NullRowWriter) PutBytes(string, []byte)
func (*NullRowWriter) PutChars ¶
func (*NullRowWriter) PutChars(string, string)
func (*NullRowWriter) PutFloat32 ¶
func (*NullRowWriter) PutFloat32(string, float32)
func (*NullRowWriter) PutFloat64 ¶
func (*NullRowWriter) PutFloat64(string, float64)
func (*NullRowWriter) PutFromJSON ¶
func (*NullRowWriter) PutFromJSON(map[string]any)
func (*NullRowWriter) PutInt32 ¶
func (*NullRowWriter) PutInt32(string, int32)
func (*NullRowWriter) PutInt64 ¶
func (*NullRowWriter) PutInt64(string, int64)
func (*NullRowWriter) PutNumber ¶
func (*NullRowWriter) PutNumber(string, float64)
func (*NullRowWriter) PutRecordID ¶
func (*NullRowWriter) PutRecordID(string, RecordID)
func (*NullRowWriter) PutString ¶
func (*NullRowWriter) PutString(string, string)
type NumAppPartitions ¶
type NumAppPartitions int
type NumAppWorkspaces ¶
type NumAppWorkspaces int
type NumCommandProcessors ¶
type NumCommandProcessors int
type NumQueryProcessors ¶
type NumQueryProcessors int
type PLogEventsReaderCallback ¶
type PLogEventsReaderCallback func(plogOffset Offset, event IPLogEvent) (err error)
It's desirable but not necessary to call event.Release() after event using
type PartitionID ¶
type PartitionID uint16
type PrepareArgs ¶
type PrepareArgs struct { Workpiece interface{} ArgumentObject IObject WSID WSID Workspace appdef.IWorkspace }
type Projectors ¶
type RateLimitKind ¶
type RateLimitKind uint8
const ( RateLimitKind_byApp RateLimitKind = iota RateLimitKind_byWorkspace RateLimitKind_byID RateLimitKind_FakeLast )
func (RateLimitKind) MarshalText ¶
func (k RateLimitKind) MarshalText() ([]byte, error)
func (RateLimitKind) String ¶
func (i RateLimitKind) String() string
type RecordGetBatchItem ¶
type RecordID ¶
type RecordID IDType
func NewCDocCRecordID ¶
Used to generate IDs for CDoc/CRecord
func NewRecordID ¶
func (RecordID) BaseRecordID ¶
type ResourceKindType ¶
type ResourceKindType uint8
const ( ResourceKind_null ResourceKindType = iota ResourceKind_CommandFunction ResourceKind_QueryFunction ResourceKind_FakeLast )
func (ResourceKindType) MarshalText ¶
func (k ResourceKindType) MarshalText() ([]byte, error)
func (ResourceKindType) String ¶
func (i ResourceKindType) String() string
type StateValueCallback ¶
type StateValueCallback func(key IKeyBuilder, value IStateValue, ok bool) (err error)
type SubjectKindType ¶
type SubjectKindType uint8
const ( SubjectKind_null SubjectKindType = iota SubjectKind_User SubjectKind_Device SubjectKind_FakeLast )
type SubjectLogin ¶
type SubjectLogin string
type SyncRawEventBuilderParams ¶
type SyncRawEventBuilderParams struct { GenericRawEventBuilderParams Device ConnectedDeviceID SyncedAt UnixMilli }
type ValidatorMatchFunc ¶
type ValueCallback ¶
type ValueCallback func(key IKey, value IStateValue) (err error)
type ValuesCallback ¶
type ViewKV ¶
type ViewKV struct { Key IKeyBuilder Value IValueBuilder }
type ViewRecordGetBatchItem ¶
type ViewRecordGetBatchItem struct { Key IKeyBuilder // in Ok bool // out Value IValue // out }
type WLogEventsReaderCallback ¶
type WLogEventsReaderCallback func(wlogOffset Offset, event IWLogEvent) (err error)
It's desirable but not necessary to call event.Release() after event using