Documentation ¶
Index ¶
- Constants
- Variables
- func GetPrincipalTokenFromState(st istructs.IState) (token string, err error)
- type ActualizerStateOptFunc
- type AppStructsFunc
- type ApplyBatchItem
- type ArgFunc
- type AsyncActualizerStateFactory
- type CUDFunc
- type CommandProcessorStateFactory
- type ExecQueryCallbackFunc
- type GetBatchItem
- type IBundledHostState
- type IHostState
- type IHttpClient
- type IState
- type IStateStorage
- type IWithApplyBatch
- type IWithGet
- type IWithGetBatch
- type IWithInsert
- type IWithRead
- type IWithUpdate
- type N10nFunc
- type ObjectBuilderFunc
- type PLogEventFunc
- type PartitionIDFunc
- type PrincipalsFunc
- type QNameFunc
- type QPStateOptFunc
- type QueryProcessorStateFactory
- type SyncActualizerStateFactory
- type TokenFunc
- type UnloggedArgFunc
- type WLogOffsetFunc
- type WSIDFunc
Constants ¶
View Source
const ( S_GET = 1 S_GET_BATCH = 2 S_READ = 4 S_INSERT = 8 S_UPDATE = 16 )
View Source
const ( Field_Url = "Url" Field_Method = "Method" Field_Header = "Header" Field_Offset = "Offset" Field_Error = "Error" Field_ErrStr = "ErrStr" Field_QNameFromParams = "QNameFromParams" Field_ValidEvent = "ValidEvent" Field_QName = "QName" Field_ArgumentObject = "ArgumentObject" Field_ArgumentUnloggedObject = "ArgumentUnloggedObject" Field_Synced = "Synced" Field_Count = "Count" Field_ID = "ID" Field_From = "From" Field_To = "To" Field_CC = "CC" Field_BCC = "BCC" Field_Subject = "Subject" Field_Body = "Body" Field_PartitionID = "PartitionID" Field_WSID = "WSID" Field_HTTPClientTimeoutMilliseconds = "HTTPClientTimeoutMilliseconds" Field_Singleton = "Singleton" Field_Secret = "Secret" Field_RegisteredAt = "RegisteredAt" Field_DeviceID = "DeviceID" Field_SyncedAt = "SyncedAt" Field_WLogOffset = "WLogOffset" Field_Workspace = "Workspace" Field_Username = "Username" Field_Password = "Password" Field_Host = "Host" Field_Port = "Port" Field_StatusCode = "StatusCode" Field_Kind = "Kind" Field_ProfileWSID = "ProfileWSID" Field_CUDs = "CUDs" Field_IsNew = "IsNew" Field_Name = "Name" Field_Token = "Token" Field_ErrorMessage = "ErrorMessage" )
View Source
const (
ColOffset = "offs"
)
Variables ¶
View Source
var ( View = appdef.NewQName(appdef.SysPackage, "View") Record = appdef.NewQName(appdef.SysPackage, "Record") WLog = appdef.NewQName(appdef.SysPackage, "WLog") Http = appdef.NewQName(appdef.SysPackage, "Http") SendMail = appdef.NewQName(appdef.SysPackage, "SendMail") AppSecret = appdef.NewQName(appdef.SysPackage, "AppSecret") RequestSubject = appdef.NewQName(appdef.SysPackage, "RequestSubject") Result = appdef.NewQName(appdef.SysPackage, "Result") Event = appdef.NewQName(appdef.SysPackage, "Event") CommandContext = appdef.NewQName(appdef.SysPackage, "CommandContext") QueryContext = appdef.NewQName(appdef.SysPackage, "QueryContext") Response = appdef.NewQName(appdef.SysPackage, "Response") )
View Source
var ErrExists = errors.New("exists")
View Source
var ErrGetNotSupportedByStorage = errors.New("get not supported by storage")
View Source
var ErrInsertNotSupportedByStorage = errors.New("insert not supported by storage")
View Source
var ErrIntentsLimitExceeded = errors.New("intents limit exceeded")
View Source
var ErrNotExists = errors.New("not exists")
View Source
var ErrNotFound = errors.New("not found")
View Source
var ErrNotSupported = errors.New("not supported")
View Source
var ErrReadNotSupportedByStorage = errors.New("read not supported by storage")
View Source
var ErrUnknownStorage = errors.New("unknown storage")
View Source
var ErrUpdateNotSupportedByStorage = errors.New("update not supported by storage")
Functions ¶
Types ¶
type ActualizerStateOptFunc ¶
type ActualizerStateOptFunc func(opts *actualizerStateOpts)
func WithCustomHttpClient ¶
func WithCustomHttpClient(client IHttpClient) ActualizerStateOptFunc
func WithEmailMessagesChan ¶
func WithEmailMessagesChan(messages chan smtptest.Message) ActualizerStateOptFunc
type AppStructsFunc ¶
type AppStructsFunc func() istructs.IAppStructs
type ApplyBatchItem ¶
type ApplyBatchItem struct {
// contains filtered or unexported fields
}
type AsyncActualizerStateFactory ¶
type AsyncActualizerStateFactory func(ctx context.Context, appStructsFunc AppStructsFunc, partitionIDFunc PartitionIDFunc, wsidFunc WSIDFunc, n10nFunc N10nFunc, secretReader isecrets.ISecretReader, eventFunc PLogEventFunc, intentsLimit, bundlesLimit int, opts ...ActualizerStateOptFunc) IBundledHostState
func ProvideAsyncActualizerStateFactory ¶
func ProvideAsyncActualizerStateFactory() AsyncActualizerStateFactory
type CommandProcessorStateFactory ¶
type CommandProcessorStateFactory func(ctx context.Context, appStructsFunc AppStructsFunc, partitionIDFunc PartitionIDFunc, wsidFunc WSIDFunc, secretReader isecrets.ISecretReader, cudFunc CUDFunc, principalPayloadFunc PrincipalsFunc, tokenFunc TokenFunc, intentsLimit int, cmdResultBuilderFunc ObjectBuilderFunc, argFunc ArgFunc, unloggedArgFunc UnloggedArgFunc, wlogOffsetFunc WLogOffsetFunc) IHostState
func ProvideCommandProcessorStateFactory ¶
func ProvideCommandProcessorStateFactory() CommandProcessorStateFactory
type ExecQueryCallbackFunc ¶
type ExecQueryCallbackFunc func() istructs.ExecQueryCallback
type GetBatchItem ¶
type GetBatchItem struct {
// contains filtered or unexported fields
}
type IBundledHostState ¶
type IBundledHostState interface { IState // ApplyIntents validates and stores intents to bundles ApplyIntents() (readyToFlushBundle bool, err error) // FlushBundles flushes bundles to underlying storage and resets the bundles FlushBundles() (err error) }
IBundledHostState buffers changes in "bundles" when ApplyIntents is called. Further Read- and *Exist operations see these changes.
type IHostState ¶
type IHttpClient ¶
type IStateStorage ¶
type IStateStorage interface {
NewKeyBuilder(entity appdef.QName, existingKeyBuilder istructs.IStateKeyBuilder) (newKeyBuilder istructs.IStateKeyBuilder)
}
type IWithApplyBatch ¶
type IWithApplyBatch interface { // Validate validates batch before store Validate(items []ApplyBatchItem) (err error) // ApplyBatch applies batch to storage ApplyBatch(items []ApplyBatchItem) (err error) }
type IWithGet ¶
type IWithGet interface { // Get reads item from storage // Nil value returned when item not found Get(key istructs.IStateKeyBuilder) (value istructs.IStateValue, err error) }
type IWithGetBatch ¶
type IWithGetBatch interface { // GetBatch reads items from storage GetBatch(items []GetBatchItem) (err error) }
type IWithInsert ¶
type IWithInsert interface { IWithApplyBatch // ProvideValueBuilder provides value builder. ExistingBuilder can be null ProvideValueBuilder(key istructs.IStateKeyBuilder, existingBuilder istructs.IStateValueBuilder) (istructs.IStateValueBuilder, error) }
type IWithRead ¶
type IWithRead interface { // Read reads items with callback. Can return many more than 1 item for the same get Read(key istructs.IStateKeyBuilder, callback istructs.ValueCallback) (err error) }
type IWithUpdate ¶
type IWithUpdate interface { IWithApplyBatch // ProvideValueBuilderForUpdate provides value builder to update the value. ExistingBuilder can be null ProvideValueBuilderForUpdate(key istructs.IStateKeyBuilder, existingValue istructs.IStateValue, existingBuilder istructs.IStateValueBuilder) (istructs.IStateValueBuilder, error) }
type ObjectBuilderFunc ¶
type ObjectBuilderFunc func() istructs.IObjectBuilder
type PLogEventFunc ¶
type PLogEventFunc func() istructs.IPLogEvent
type PartitionIDFunc ¶
type PartitionIDFunc func() istructs.PartitionID
func SimplePartitionIDFunc ¶
func SimplePartitionIDFunc(partitionID istructs.PartitionID) PartitionIDFunc
type PrincipalsFunc ¶
type QPStateOptFunc ¶
type QPStateOptFunc func(opts *qpStateOpts)
func QPWithCustomHttpClient ¶
func QPWithCustomHttpClient(client IHttpClient) QPStateOptFunc
type QueryProcessorStateFactory ¶
type QueryProcessorStateFactory func(ctx context.Context, appStructsFunc AppStructsFunc, partitionIDFunc PartitionIDFunc, wsidFunc WSIDFunc, secretReader isecrets.ISecretReader, principalPayloadFunc PrincipalsFunc, tokenFunc TokenFunc, argFunc ArgFunc, resultBuilderFunc ObjectBuilderFunc, queryCallbackFunc ExecQueryCallbackFunc, opts ...QPStateOptFunc) IHostState
func ProvideQueryProcessorStateFactory ¶
func ProvideQueryProcessorStateFactory() QueryProcessorStateFactory
type SyncActualizerStateFactory ¶
type SyncActualizerStateFactory func(ctx context.Context, appStructsFunc AppStructsFunc, partitionIDFunc PartitionIDFunc, wsidFunc WSIDFunc, n10nFunc N10nFunc, secretReader isecrets.ISecretReader, eventFunc PLogEventFunc, intentsLimit int) IHostState
func ProvideSyncActualizerStateFactory ¶
func ProvideSyncActualizerStateFactory() SyncActualizerStateFactory
type UnloggedArgFunc ¶
type WLogOffsetFunc ¶
Source Files ¶
- consts.go
- errors.go
- impl.go
- impl_app_secrets_storage.go
- impl_async_actualizer_state.go
- impl_bundled_host_state.go
- impl_command_processor_state.go
- impl_commandcontext_storage.go
- impl_event_storage.go
- impl_host_state.go
- impl_http_storage.go
- impl_query_processor_state.go
- impl_querycontext_storage.go
- impl_records_storage.go
- impl_response_storage.go
- impl_result_storage.go
- impl_send_mail_storage.go
- impl_subject_storage.go
- impl_sync_actualizer_state.go
- impl_view_records_storage.go
- impl_wlog_storage.go
- interface.go
- provide.go
- types.go
- utils.go
Directories ¶
Path | Synopsis |
---|---|
* Copyright (c) 2024-present unTill Software Development Group B. V. * @author Michael Saigachenko
|
* Copyright (c) 2024-present unTill Software Development Group B. V. * @author Michael Saigachenko |
* Copyright (c) 2024-present unTill Software Development Group B. V. * @author Michael Saigachenko
|
* Copyright (c) 2024-present unTill Software Development Group B. V. * @author Michael Saigachenko |
Click to show internal directories.
Click to hide internal directories.