Documentation ¶
Index ¶
- Constants
- Variables
- func AppPartitionID(wsid istructs.WSID, numAppPartitions istructs.NumAppPartitions) istructs.PartitionID
- func AppWSIDToPseudoWSID(appWSID istructs.WSID) (pseudoWSID istructs.WSID)
- func CRC16(entity []byte) uint16
- func CUDsToMap(event istructs.IDbEvent, appDef appdef.IAppDef, optFuncs ...CUDsOpt) []map[string]interface{}
- func CheckValueByKind(val interface{}, kind appdef.DataKind) error
- func CopyDir(src, dst string, optFuncs ...CopyOpt) error
- func CopyDirFS(srcFS IReadFS, src, dst string, optFuncs ...CopyOpt) error
- func CopyFile(src, dstDir string, optFuncs ...CopyOpt) error
- func CopyFileFS(srcFS fs.FS, srcFileName, dstDir string, optFuncs ...CopyOpt) error
- func EmailVerificationCode() (verificationCode string, err error)
- func Exists(filePath string) (exists bool, err error)
- func FieldsToMap(obj istructs.IRowReader, appDef appdef.IAppDef, optFuncs ...MapperOpt) (res map[string]interface{})
- func GetAppWSID(wsid istructs.WSID, numAppWorkspaces istructs.NumAppWorkspaces) istructs.WSID
- func GetCatalogFromTranslations(t Translations) catalog.Catalog
- func GetPseudoWSID(ownerWSID istructs.WSID, entity string, clusterID istructs.ClusterID) istructs.WSID
- func GetTestBusTimeout() time.Duration
- func HashBytes(b []byte) int64
- func IsBlank(str string) bool
- func IsCassandraStorage() bool
- func IsDebug() bool
- func IsDynamoDBStorage() bool
- func IsTest() bool
- func IsValidEmailTemplate(emailTemplate string) bool
- func IsWSAEError(err error, errno syscall.Errno) bool
- func JSONMapToCUDBody(data []map[string]interface{}) string
- func MapToObject(data map[string]interface{}, rw istructs.IRowWriter) (err error)
- func MatchQName(qNames ...appdef.QName) func(cud istructs.ICUDRow, wsid istructs.WSID, cmdQName appdef.QName) bool
- func NewSysError(statusCode int) error
- func NilAdminPortGetter() int
- func ObjectToMap(obj istructs.IObject, appDef appdef.IAppDef, opts ...MapperOpt) (res map[string]interface{})
- func PairsToMap(pairs []string, m map[string]string) error
- func ReadByKind(name appdef.FieldName, kind appdef.DataKind, rr istructs.IRowReader) interface{}
- func ReplyAccessDeniedForbidden(sender ibus.ISender, message string)
- func ReplyAccessDeniedUnauthorized(sender ibus.ISender, message string)
- func ReplyBadRequest(sender ibus.ISender, message string)
- func ReplyErr(sender ibus.ISender, err error)
- func ReplyErrDef(sender ibus.ISender, err error, defaultStatusCode int)
- func ReplyErrf(sender ibus.ISender, status int, args ...interface{})
- func ReplyInternalServerError(sender ibus.ISender, message string, err error)
- func ReplyJSON(sender ibus.ISender, httpCode int, body string)
- func ReplyUnauthorized(sender ibus.ISender, message string)
- func ResetTimer(t *time.Timer, timeout time.Duration)
- func ScanSSE(data []byte, atEOF bool) (advance int, token []byte, err error)
- func ServerAddress(port int) string
- func SplitErrors(joinedError error) (errs []error)
- func TruncateEmailTemplate(emailTemplate string) string
- func Unzip(zipFileName, destDir string) error
- func WrapSysError(err error, defaultStatusCode int) error
- func Zip(zipFilePath string, objectToZip any) error
- type BLOB
- type CUD
- type CUDs
- type CUDsOpt
- type CopyOpt
- type EmbedFS
- type FuncError
- type FuncResponse
- type HTTPResponse
- type IErrUnwrapper
- type IHTTPClient
- type IReadFS
- type MapObject
- func (m MapObject) AsBoolean(name string) (val bool, ok bool, err error)
- func (m MapObject) AsFloat64(name string) (val float64, ok bool, err error)
- func (m MapObject) AsInt64(name string) (val int64, ok bool, err error)
- func (m MapObject) AsObject(name string) (val MapObject, ok bool, err error)
- func (m MapObject) AsObjects(name string) (val []interface{}, ok bool, err error)
- func (m MapObject) AsString(name string) (val string, ok bool, err error)
- func (m MapObject) AsStringRequired(name string) (val string, err error)
- type MapperOpt
- type MockCUDRow
- func (m *MockCUDRow) AsBool(name appdef.FieldName) bool
- func (m *MockCUDRow) AsBytes(name appdef.FieldName) []byte
- func (m *MockCUDRow) AsFloat32(name appdef.FieldName) float32
- func (m *MockCUDRow) AsFloat64(name appdef.FieldName) float64
- func (m *MockCUDRow) AsInt32(name appdef.FieldName) int32
- func (m *MockCUDRow) AsInt64(name appdef.FieldName) int64
- func (m *MockCUDRow) AsQName(name appdef.FieldName) appdef.QName
- func (m *MockCUDRow) AsRecordID(name appdef.FieldName) istructs.RecordID
- func (m *MockCUDRow) AsString(name appdef.FieldName) string
- func (m *MockCUDRow) FieldNames(cb func(appdef.FieldName))
- func (m *MockCUDRow) ID() istructs.RecordID
- func (m *MockCUDRow) IsNew() bool
- func (m *MockCUDRow) ModifiedFields(cb func(fieldName appdef.FieldName, newValue interface{}))
- func (m *MockCUDRow) QName() appdef.QName
- func (m *MockCUDRow) RecordIDs(includeNulls bool, cb func(appdef.FieldName, istructs.RecordID))
- type MockIntents
- func (m *MockIntents) FindIntent(key istructs.IStateKeyBuilder) istructs.IStateValueBuilder
- func (m *MockIntents) NewValue(key istructs.IStateKeyBuilder) (istructs.IStateValueBuilder, error)
- func (m *MockIntents) UpdateValue(key istructs.IStateKeyBuilder, existingValue istructs.IStateValue) (istructs.IStateValueBuilder, error)
- type MockKey
- func (m *MockKey) AsBool(name appdef.FieldName) bool
- func (m *MockKey) AsBytes(name appdef.FieldName) []byte
- func (m *MockKey) AsFloat32(name appdef.FieldName) float32
- func (m *MockKey) AsFloat64(name appdef.FieldName) float64
- func (m *MockKey) AsInt32(name appdef.FieldName) int32
- func (m *MockKey) AsInt64(name appdef.FieldName) int64
- func (m *MockKey) AsQName(name appdef.FieldName) appdef.QName
- func (m *MockKey) AsRecordID(name appdef.FieldName) istructs.RecordID
- func (m *MockKey) AsString(name appdef.FieldName) string
- func (m *MockKey) FieldNames(cb func(appdef.FieldName))
- func (m *MockKey) RecordIDs(includeNulls bool, cb func(appdef.FieldName, istructs.RecordID))
- type MockObject
- func (m *MockObject) AsBool(name appdef.FieldName) bool
- func (m *MockObject) AsBytes(name appdef.FieldName) []byte
- func (m *MockObject) AsFloat32(name appdef.FieldName) float32
- func (m *MockObject) AsFloat64(name appdef.FieldName) float64
- func (m *MockObject) AsInt32(name appdef.FieldName) int32
- func (m *MockObject) AsInt64(name appdef.FieldName) int64
- func (m *MockObject) AsQName(name appdef.FieldName) appdef.QName
- func (m *MockObject) AsRecord() istructs.IRecord
- func (m *MockObject) AsRecordID(name appdef.FieldName) istructs.RecordID
- func (m *MockObject) AsString(name appdef.FieldName) string
- func (m *MockObject) Children(container string, cb func(istructs.IObject))
- func (m *MockObject) Containers(cb func(container string))
- func (m *MockObject) FieldNames(cb func(appdef.FieldName))
- func (m *MockObject) QName() appdef.QName
- func (m *MockObject) RecordIDs(includeNulls bool, cb func(appdef.FieldName, istructs.RecordID))
- type MockPLogEvent
- func (m *MockPLogEvent) ArgumentObject() istructs.IObject
- func (m *MockPLogEvent) Bytes() []byte
- func (m *MockPLogEvent) CUDs(cb func(rec istructs.ICUDRow))
- func (m *MockPLogEvent) DeviceID() istructs.ConnectedDeviceID
- func (m *MockPLogEvent) Error() istructs.IEventError
- func (m *MockPLogEvent) QName() appdef.QName
- func (m *MockPLogEvent) RegisteredAt() istructs.UnixMilli
- func (m *MockPLogEvent) Release()
- func (m *MockPLogEvent) Synced() bool
- func (m *MockPLogEvent) SyncedAt() istructs.UnixMilli
- func (m *MockPLogEvent) WLogOffset() istructs.Offset
- func (m *MockPLogEvent) Workspace() istructs.WSID
- type MockRawEvent
- func (m *MockRawEvent) ArgumentObject() istructs.IObject
- func (m *MockRawEvent) ArgumentUnloggedObject() istructs.IObject
- func (m *MockRawEvent) CUDs(cb func(rec istructs.ICUDRow))
- func (m *MockRawEvent) DeviceID() istructs.ConnectedDeviceID
- func (m *MockRawEvent) HandlingPartition() istructs.PartitionID
- func (m *MockRawEvent) PLogOffset() istructs.Offset
- func (m *MockRawEvent) QName() appdef.QName
- func (m *MockRawEvent) RegisteredAt() istructs.UnixMilli
- func (m *MockRawEvent) Synced() bool
- func (m *MockRawEvent) SyncedAt() istructs.UnixMilli
- func (m *MockRawEvent) WLogOffset() istructs.Offset
- func (m *MockRawEvent) Workspace() istructs.WSID
- type MockState
- func (m *MockState) App() istructs.AppQName
- func (m *MockState) CanExist(key istructs.IStateKeyBuilder) (value istructs.IStateValue, ok bool, err error)
- func (m *MockState) CanExistAll(keys []istructs.IStateKeyBuilder, callback istructs.StateValueCallback) (err error)
- func (m *MockState) KeyBuilder(storage, entity appdef.QName) (builder istructs.IStateKeyBuilder, err error)
- func (m *MockState) MustExist(key istructs.IStateKeyBuilder) (value istructs.IStateValue, err error)
- func (m *MockState) MustExistAll(keys []istructs.IStateKeyBuilder, callback istructs.StateValueCallback) (err error)
- func (m *MockState) MustNotExist(key istructs.IStateKeyBuilder) (err error)
- func (m *MockState) MustNotExistAll(keys []istructs.IStateKeyBuilder) (err error)
- func (m *MockState) PLogEvent() istructs.IPLogEvent
- func (m *MockState) Read(key istructs.IStateKeyBuilder, callback istructs.ValueCallback) (err error)
- type MockStateKeyBuilder
- func (m *MockStateKeyBuilder) ClusteringColumns() istructs.IRowWriter
- func (m *MockStateKeyBuilder) Entity() appdef.QName
- func (m *MockStateKeyBuilder) Equals(src istructs.IKeyBuilder) bool
- func (m *MockStateKeyBuilder) PartitionKey() istructs.IRowWriter
- func (m *MockStateKeyBuilder) PutBool(name appdef.FieldName, value bool)
- func (m *MockStateKeyBuilder) PutBytes(name appdef.FieldName, value []byte)
- func (m *MockStateKeyBuilder) PutChars(name appdef.FieldName, value string)
- func (m *MockStateKeyBuilder) PutFloat32(name appdef.FieldName, value float32)
- func (m *MockStateKeyBuilder) PutFloat64(name appdef.FieldName, value float64)
- func (m *MockStateKeyBuilder) PutFromJSON(map[string]any)
- func (m *MockStateKeyBuilder) PutInt32(name appdef.FieldName, value int32)
- func (m *MockStateKeyBuilder) PutInt64(name appdef.FieldName, value int64)
- func (m *MockStateKeyBuilder) PutNumber(name appdef.FieldName, value float64)
- func (m *MockStateKeyBuilder) PutQName(name appdef.FieldName, value appdef.QName)
- func (m *MockStateKeyBuilder) PutRecordID(name appdef.FieldName, value istructs.RecordID)
- func (m *MockStateKeyBuilder) PutString(name appdef.FieldName, value string)
- func (m *MockStateKeyBuilder) Storage() appdef.QName
- func (m *MockStateKeyBuilder) ToBytes(wsid istructs.WSID) ([]byte, []byte, error)
- type MockStateValue
- func (m *MockStateValue) AsBool(name appdef.FieldName) bool
- func (m *MockStateValue) AsBytes(name appdef.FieldName) []byte
- func (m *MockStateValue) AsEvent(name appdef.FieldName) istructs.IDbEvent
- func (m *MockStateValue) AsFloat32(name appdef.FieldName) float32
- func (m *MockStateValue) AsFloat64(name appdef.FieldName) float64
- func (m *MockStateValue) AsInt32(name appdef.FieldName) int32
- func (m *MockStateValue) AsInt64(name appdef.FieldName) int64
- func (m *MockStateValue) AsQName(name appdef.FieldName) appdef.QName
- func (m *MockStateValue) AsRecord(name appdef.FieldName) istructs.IRecord
- func (m *MockStateValue) AsRecordID(name appdef.FieldName) istructs.RecordID
- func (m *MockStateValue) AsString(name appdef.FieldName) string
- func (m *MockStateValue) AsValue(name string) istructs.IStateValue
- func (m *MockStateValue) FieldNames(cb func(appdef.FieldName))
- func (m *MockStateValue) GetAsBool(index int) bool
- func (m *MockStateValue) GetAsBytes(index int) []byte
- func (m *MockStateValue) GetAsFloat32(index int) float32
- func (m *MockStateValue) GetAsFloat64(index int) float64
- func (m *MockStateValue) GetAsInt32(index int) int32
- func (m *MockStateValue) GetAsInt64(index int) int64
- func (m *MockStateValue) GetAsQName(index int) appdef.QName
- func (m *MockStateValue) GetAsString(index int) string
- func (m *MockStateValue) GetAsValue(index int) istructs.IStateValue
- func (m *MockStateValue) Length() int
- func (m *MockStateValue) RecordIDs(includeNulls bool, cb func(appdef.FieldName, istructs.RecordID))
- type MockStateValueBuilder
- func (m *MockStateValueBuilder) Build() istructs.IValue
- func (m *MockStateValueBuilder) BuildValue() istructs.IStateValue
- func (m *MockStateValueBuilder) Equal(src istructs.IStateValueBuilder) bool
- func (m *MockStateValueBuilder) PutBool(name appdef.FieldName, value bool)
- func (m *MockStateValueBuilder) PutBytes(name appdef.FieldName, value []byte)
- func (m *MockStateValueBuilder) PutChars(name appdef.FieldName, value string)
- func (m *MockStateValueBuilder) PutEvent(name appdef.FieldName, event istructs.IDbEvent)
- func (m *MockStateValueBuilder) PutFloat32(name appdef.FieldName, value float32)
- func (m *MockStateValueBuilder) PutFloat64(name appdef.FieldName, value float64)
- func (m *MockStateValueBuilder) PutFromJSON(map[string]any)
- func (m *MockStateValueBuilder) PutInt32(name appdef.FieldName, value int32)
- func (m *MockStateValueBuilder) PutInt64(name appdef.FieldName, value int64)
- func (m *MockStateValueBuilder) PutNumber(name appdef.FieldName, value float64)
- func (m *MockStateValueBuilder) PutQName(name appdef.FieldName, value appdef.QName)
- func (m *MockStateValueBuilder) PutRecord(name appdef.FieldName, record istructs.IRecord)
- func (m *MockStateValueBuilder) PutRecordID(name appdef.FieldName, value istructs.RecordID)
- func (m *MockStateValueBuilder) PutString(name appdef.FieldName, value string)
- func (m *MockStateValueBuilder) ToBytes() ([]byte, error)
- type PathReader
- type ReqOptFunc
- func Expect400(expectErrorContains ...string) ReqOptFunc
- func Expect400RefIntegrity_Existence() ReqOptFunc
- func Expect400RefIntegrity_QName() ReqOptFunc
- func Expect401() ReqOptFunc
- func Expect403(expectedMessages ...string) ReqOptFunc
- func Expect404() ReqOptFunc
- func Expect409(expected ...string) ReqOptFunc
- func Expect410() ReqOptFunc
- func Expect429() ReqOptFunc
- func Expect500() ReqOptFunc
- func Expect503() ReqOptFunc
- func ExpectSysError500() ReqOptFunc
- func WithAuthorizeBy(principalToken string) ReqOptFunc
- func WithAuthorizeByIfNot(principalToken string) ReqOptFunc
- func WithCookies(cookiesPairs ...string) ReqOptFunc
- func WithDiscardResponse() ReqOptFunc
- func WithExpectedCode(expectedHTTPCode int, expectErrorContains ...string) ReqOptFunc
- func WithHeaders(headersPairs ...string) ReqOptFunc
- func WithLongPolling() ReqOptFunc
- func WithMethod(m string) ReqOptFunc
- func WithRelativeURL(relativeURL string) ReqOptFunc
- func WithResponseHandler(responseHandler func(httpResp *http.Response)) ReqOptFunc
- func WithRetryOnAnyError(timeout time.Duration, retryDelay time.Duration) ReqOptFunc
- func WithRetryOnCertainError(errMatcher func(err error) bool, timeout time.Duration, ...) ReqOptFunc
- type SysError
- type TestObject
- func (o *TestObject) AsBool(name string) bool
- func (o *TestObject) AsBytes(name string) []byte
- func (o *TestObject) AsFloat32(name string) float32
- func (o *TestObject) AsFloat64(name string) float64
- func (o *TestObject) AsInt32(name string) int32
- func (o *TestObject) AsInt64(name string) int64
- func (o *TestObject) AsQName(name string) appdef.QName
- func (o *TestObject) AsRecord() istructs.IRecord
- func (o *TestObject) AsRecordID(name string) istructs.RecordID
- func (o *TestObject) AsString(name string) string
- func (o *TestObject) Children(container string, cb func(istructs.IObject))
- func (o *TestObject) Containers(cb func(container string))
- func (o *TestObject) FieldNames(cb func(name string))
- func (o *TestObject) ID() istructs.RecordID
- func (o *TestObject) IsNew() bool
- func (o *TestObject) ModifiedFields(cb func(string, interface{}))
- func (o *TestObject) Parent() istructs.RecordID
- func (o *TestObject) PutBool(name string, value bool)
- func (o *TestObject) PutBytes(name string, value []byte)
- func (o *TestObject) PutChars(name string, value string)
- func (o *TestObject) PutFloat32(name string, value float32)
- func (o *TestObject) PutFloat64(name string, value float64)
- func (o *TestObject) PutFromJSON(value map[string]any)
- func (o *TestObject) PutInt32(name string, value int32)
- func (o *TestObject) PutInt64(name string, value int64)
- func (o *TestObject) PutNumber(name string, value float64)
- func (o *TestObject) PutQName(name string, value appdef.QName)
- func (o *TestObject) PutRecordID(name string, value istructs.RecordID)
- func (o *TestObject) PutString(name, value string)
- func (o *TestObject) QName() appdef.QName
- type TestValue
- type TimeFunc
- type Translations
Constants ¶
const ( Authorization = "Authorization" ContentType = "Content-Type" ContentDisposition = "Content-Disposition" ApplicationJSON = "application/json" ApplicationXBinary = "application/x-binary" BearerPrefix = "Bearer " CRC16Mask = uint32(math.MaxUint32 >> 16) EmailTemplatePrefix_Text = "text:" WSAECONNRESET syscall.Errno = 10054 WSAECONNREFUSED syscall.Errno = 10061 FileMode_rwxrwxrwx fs.FileMode = 0777 // default for directory FileMode_rw_rw_rw_ fs.FileMode = 0666 // default for file )
Variables ¶
Functions ¶
func AppPartitionID ¶
func AppPartitionID(wsid istructs.WSID, numAppPartitions istructs.NumAppPartitions) istructs.PartitionID
used in BuildAppWorkspaces() only because there are no apps in IAppPartitions on that moment
func AppWSIDToPseudoWSID ¶
resulting pseudoWSID leads to the initial appWSID note: there could be many different pseudoWSIDs that leads to the same appWSID
func CheckValueByKind ¶
func CopyDirFS ¶
copies the specified dir from the provided FS to disk to path specified by dst use "." src to copy the entire srcFS content
func CopyFileFS ¶
copies the specified file from the provided FS to disk to path specified by dstDir
func EmailVerificationCode ¶
generates cryptographically secure random verification code. Len - 6 bytes, each value is 0-9
func FieldsToMap ¶
func GetAppWSID ¶
func GetCatalogFromTranslations ¶
func GetCatalogFromTranslations(t Translations) catalog.Catalog
func GetPseudoWSID ¶
func GetPseudoWSID(ownerWSID istructs.WSID, entity string, clusterID istructs.ClusterID) istructs.WSID
for Login use NullWSID as ownerWSID
func GetTestBusTimeout ¶
func IsCassandraStorage ¶
func IsCassandraStorage() bool
func IsDynamoDBStorage ¶
func IsDynamoDBStorage() bool
func IsValidEmailTemplate ¶
func JSONMapToCUDBody ¶
func MapToObject ¶
func MapToObject(data map[string]interface{}, rw istructs.IRowWriter) (err error)
func MatchQName ¶
func NewSysError ¶
func NilAdminPortGetter ¶
func NilAdminPortGetter() int
func ObjectToMap ¶
func PairsToMap ¶
converts slice of "k=v" to map[k]v
func ReadByKind ¶
panics on an unsupported kind guessing that pair <name, kind> could be taken from IDef.Fields() callback only
func ReplyBadRequest ¶
func ReplyUnauthorized ¶
func ResetTimer ¶
func ServerAddress ¶
func SplitErrors ¶
func TruncateEmailTemplate ¶
func WrapSysError ¶
Types ¶
type BLOB ¶
moved here to avoid import cycle: state -> federation (for cmd storage) -> blobber (IFederation.UploadBLOBs([]blobber.BLOB)) -> state
type CopyOpt ¶
type CopyOpt func(co *copyOpts)
func WithFileMode ¶
func WithNewName ¶
func WithSkipExisting ¶
func WithSkipExisting() CopyOpt
type FuncResponse ¶
type FuncResponse struct { *HTTPResponse Sections []struct { Elements [][][][]interface{} `json:"elements"` } `json:"sections"` NewIDs map[string]int64 CurrentWLogOffset istructs.Offset SysError SysError `json:"sys.Error"` CmdResult map[string]interface{} `json:"Result"` }
func (*FuncResponse) IsEmpty ¶
func (resp *FuncResponse) IsEmpty() bool
func (*FuncResponse) SectionRow ¶
func (resp *FuncResponse) SectionRow(rowIdx ...int) []interface{}
type HTTPResponse ¶
type HTTPResponse struct { Body string HTTPResp *http.Response // contains filtered or unexported fields }
func (*HTTPResponse) ExpectedHTTPCodes ¶
func (resp *HTTPResponse) ExpectedHTTPCodes() []int
func (*HTTPResponse) ExpectedSysErrorCode ¶
func (resp *HTTPResponse) ExpectedSysErrorCode() int
func (*HTTPResponse) Println ¶
func (resp *HTTPResponse) Println()
func (*HTTPResponse) RequireContainsError ¶
func (resp *HTTPResponse) RequireContainsError(t *testing.T, messagePart string)
func (*HTTPResponse) RequireError ¶
func (resp *HTTPResponse) RequireError(t *testing.T, message string)
type IErrUnwrapper ¶
type IErrUnwrapper interface {
Unwrap() []error
}
type IHTTPClient ¶
type IHTTPClient interface { Req(urlStr string, body string, optFuncs ...ReqOptFunc) (*HTTPResponse, error) CloseIdleConnections() }
func NewIHTTPClient ¶
func NewIHTTPClient() (client IHTTPClient, clenup func())
type MapObject ¶
type MapObject map[string]interface{}
type MapperOpt ¶
type MapperOpt func(opt *mapperOpts)
func WithNonNilsOnly ¶
func WithNonNilsOnly() MapperOpt
type MockCUDRow ¶
func (*MockCUDRow) AsRecordID ¶
func (m *MockCUDRow) AsRecordID(name appdef.FieldName) istructs.RecordID
func (*MockCUDRow) FieldNames ¶
func (m *MockCUDRow) FieldNames(cb func(appdef.FieldName))
func (*MockCUDRow) ID ¶
func (m *MockCUDRow) ID() istructs.RecordID
func (*MockCUDRow) IsNew ¶
func (m *MockCUDRow) IsNew() bool
func (*MockCUDRow) ModifiedFields ¶
func (m *MockCUDRow) ModifiedFields(cb func(fieldName appdef.FieldName, newValue interface{}))
func (*MockCUDRow) QName ¶
func (m *MockCUDRow) QName() appdef.QName
type MockIntents ¶
func (*MockIntents) FindIntent ¶
func (m *MockIntents) FindIntent(key istructs.IStateKeyBuilder) istructs.IStateValueBuilder
func (*MockIntents) NewValue ¶
func (m *MockIntents) NewValue(key istructs.IStateKeyBuilder) (istructs.IStateValueBuilder, error)
func (*MockIntents) UpdateValue ¶
func (m *MockIntents) UpdateValue(key istructs.IStateKeyBuilder, existingValue istructs.IStateValue) (istructs.IStateValueBuilder, error)
type MockKey ¶
func (*MockKey) FieldNames ¶
type MockObject ¶
func (*MockObject) AsRecord ¶
func (m *MockObject) AsRecord() istructs.IRecord
func (*MockObject) AsRecordID ¶
func (m *MockObject) AsRecordID(name appdef.FieldName) istructs.RecordID
func (*MockObject) Children ¶
func (m *MockObject) Children(container string, cb func(istructs.IObject))
func (*MockObject) Containers ¶
func (m *MockObject) Containers(cb func(container string))
func (*MockObject) FieldNames ¶
func (m *MockObject) FieldNames(cb func(appdef.FieldName))
func (*MockObject) QName ¶
func (m *MockObject) QName() appdef.QName
type MockPLogEvent ¶
func (*MockPLogEvent) ArgumentObject ¶
func (m *MockPLogEvent) ArgumentObject() istructs.IObject
func (*MockPLogEvent) Bytes ¶
func (m *MockPLogEvent) Bytes() []byte
func (*MockPLogEvent) CUDs ¶
func (m *MockPLogEvent) CUDs(cb func(rec istructs.ICUDRow))
func (*MockPLogEvent) DeviceID ¶
func (m *MockPLogEvent) DeviceID() istructs.ConnectedDeviceID
func (*MockPLogEvent) Error ¶
func (m *MockPLogEvent) Error() istructs.IEventError
func (*MockPLogEvent) QName ¶
func (m *MockPLogEvent) QName() appdef.QName
func (*MockPLogEvent) RegisteredAt ¶
func (m *MockPLogEvent) RegisteredAt() istructs.UnixMilli
func (*MockPLogEvent) Release ¶
func (m *MockPLogEvent) Release()
func (*MockPLogEvent) Synced ¶
func (m *MockPLogEvent) Synced() bool
func (*MockPLogEvent) SyncedAt ¶
func (m *MockPLogEvent) SyncedAt() istructs.UnixMilli
func (*MockPLogEvent) WLogOffset ¶
func (m *MockPLogEvent) WLogOffset() istructs.Offset
func (*MockPLogEvent) Workspace ¶
func (m *MockPLogEvent) Workspace() istructs.WSID
type MockRawEvent ¶
func (*MockRawEvent) ArgumentObject ¶
func (m *MockRawEvent) ArgumentObject() istructs.IObject
func (*MockRawEvent) ArgumentUnloggedObject ¶
func (m *MockRawEvent) ArgumentUnloggedObject() istructs.IObject
func (*MockRawEvent) CUDs ¶
func (m *MockRawEvent) CUDs(cb func(rec istructs.ICUDRow))
func (*MockRawEvent) DeviceID ¶
func (m *MockRawEvent) DeviceID() istructs.ConnectedDeviceID
func (*MockRawEvent) HandlingPartition ¶
func (m *MockRawEvent) HandlingPartition() istructs.PartitionID
func (*MockRawEvent) PLogOffset ¶
func (m *MockRawEvent) PLogOffset() istructs.Offset
func (*MockRawEvent) QName ¶
func (m *MockRawEvent) QName() appdef.QName
func (*MockRawEvent) RegisteredAt ¶
func (m *MockRawEvent) RegisteredAt() istructs.UnixMilli
func (*MockRawEvent) Synced ¶
func (m *MockRawEvent) Synced() bool
func (*MockRawEvent) SyncedAt ¶
func (m *MockRawEvent) SyncedAt() istructs.UnixMilli
func (*MockRawEvent) WLogOffset ¶
func (m *MockRawEvent) WLogOffset() istructs.Offset
func (*MockRawEvent) Workspace ¶
func (m *MockRawEvent) Workspace() istructs.WSID
type MockState ¶
func (*MockState) CanExist ¶
func (m *MockState) CanExist(key istructs.IStateKeyBuilder) (value istructs.IStateValue, ok bool, err error)
func (*MockState) CanExistAll ¶
func (m *MockState) CanExistAll(keys []istructs.IStateKeyBuilder, callback istructs.StateValueCallback) (err error)
func (*MockState) KeyBuilder ¶
func (*MockState) MustExist ¶
func (m *MockState) MustExist(key istructs.IStateKeyBuilder) (value istructs.IStateValue, err error)
func (*MockState) MustExistAll ¶
func (m *MockState) MustExistAll(keys []istructs.IStateKeyBuilder, callback istructs.StateValueCallback) (err error)
func (*MockState) MustNotExist ¶
func (m *MockState) MustNotExist(key istructs.IStateKeyBuilder) (err error)
func (*MockState) MustNotExistAll ¶
func (m *MockState) MustNotExistAll(keys []istructs.IStateKeyBuilder) (err error)
func (*MockState) PLogEvent ¶
func (m *MockState) PLogEvent() istructs.IPLogEvent
func (*MockState) Read ¶
func (m *MockState) Read(key istructs.IStateKeyBuilder, callback istructs.ValueCallback) (err error)
type MockStateKeyBuilder ¶
func (*MockStateKeyBuilder) ClusteringColumns ¶
func (m *MockStateKeyBuilder) ClusteringColumns() istructs.IRowWriter
func (*MockStateKeyBuilder) Entity ¶
func (m *MockStateKeyBuilder) Entity() appdef.QName
func (*MockStateKeyBuilder) Equals ¶
func (m *MockStateKeyBuilder) Equals(src istructs.IKeyBuilder) bool
func (*MockStateKeyBuilder) PartitionKey ¶
func (m *MockStateKeyBuilder) PartitionKey() istructs.IRowWriter
func (*MockStateKeyBuilder) PutBool ¶
func (m *MockStateKeyBuilder) PutBool(name appdef.FieldName, value bool)
func (*MockStateKeyBuilder) PutBytes ¶
func (m *MockStateKeyBuilder) PutBytes(name appdef.FieldName, value []byte)
func (*MockStateKeyBuilder) PutChars ¶
func (m *MockStateKeyBuilder) PutChars(name appdef.FieldName, value string)
func (*MockStateKeyBuilder) PutFloat32 ¶
func (m *MockStateKeyBuilder) PutFloat32(name appdef.FieldName, value float32)
func (*MockStateKeyBuilder) PutFloat64 ¶
func (m *MockStateKeyBuilder) PutFloat64(name appdef.FieldName, value float64)
func (*MockStateKeyBuilder) PutFromJSON ¶
func (m *MockStateKeyBuilder) PutFromJSON(map[string]any)
func (*MockStateKeyBuilder) PutInt32 ¶
func (m *MockStateKeyBuilder) PutInt32(name appdef.FieldName, value int32)
func (*MockStateKeyBuilder) PutInt64 ¶
func (m *MockStateKeyBuilder) PutInt64(name appdef.FieldName, value int64)
func (*MockStateKeyBuilder) PutNumber ¶
func (m *MockStateKeyBuilder) PutNumber(name appdef.FieldName, value float64)
func (*MockStateKeyBuilder) PutQName ¶
func (m *MockStateKeyBuilder) PutQName(name appdef.FieldName, value appdef.QName)
func (*MockStateKeyBuilder) PutRecordID ¶
func (m *MockStateKeyBuilder) PutRecordID(name appdef.FieldName, value istructs.RecordID)
func (*MockStateKeyBuilder) PutString ¶
func (m *MockStateKeyBuilder) PutString(name appdef.FieldName, value string)
func (*MockStateKeyBuilder) Storage ¶
func (m *MockStateKeyBuilder) Storage() appdef.QName
type MockStateValue ¶
func (*MockStateValue) AsEvent ¶
func (m *MockStateValue) AsEvent(name appdef.FieldName) istructs.IDbEvent
func (*MockStateValue) AsFloat32 ¶
func (m *MockStateValue) AsFloat32(name appdef.FieldName) float32
func (*MockStateValue) AsFloat64 ¶
func (m *MockStateValue) AsFloat64(name appdef.FieldName) float64
func (*MockStateValue) AsQName ¶
func (m *MockStateValue) AsQName(name appdef.FieldName) appdef.QName
func (*MockStateValue) AsRecord ¶
func (m *MockStateValue) AsRecord(name appdef.FieldName) istructs.IRecord
func (*MockStateValue) AsRecordID ¶
func (m *MockStateValue) AsRecordID(name appdef.FieldName) istructs.RecordID
func (*MockStateValue) AsValue ¶
func (m *MockStateValue) AsValue(name string) istructs.IStateValue
func (*MockStateValue) FieldNames ¶
func (m *MockStateValue) FieldNames(cb func(appdef.FieldName))
func (*MockStateValue) GetAsBool ¶
func (m *MockStateValue) GetAsBool(index int) bool
func (*MockStateValue) GetAsBytes ¶
func (m *MockStateValue) GetAsBytes(index int) []byte
func (*MockStateValue) GetAsFloat32 ¶
func (m *MockStateValue) GetAsFloat32(index int) float32
func (*MockStateValue) GetAsFloat64 ¶
func (m *MockStateValue) GetAsFloat64(index int) float64
func (*MockStateValue) GetAsInt32 ¶
func (m *MockStateValue) GetAsInt32(index int) int32
func (*MockStateValue) GetAsInt64 ¶
func (m *MockStateValue) GetAsInt64(index int) int64
func (*MockStateValue) GetAsQName ¶
func (m *MockStateValue) GetAsQName(index int) appdef.QName
func (*MockStateValue) GetAsString ¶
func (m *MockStateValue) GetAsString(index int) string
func (*MockStateValue) GetAsValue ¶
func (m *MockStateValue) GetAsValue(index int) istructs.IStateValue
func (*MockStateValue) Length ¶
func (m *MockStateValue) Length() int
type MockStateValueBuilder ¶
func (*MockStateValueBuilder) Build ¶
func (m *MockStateValueBuilder) Build() istructs.IValue
func (*MockStateValueBuilder) BuildValue ¶
func (m *MockStateValueBuilder) BuildValue() istructs.IStateValue
func (*MockStateValueBuilder) Equal ¶
func (m *MockStateValueBuilder) Equal(src istructs.IStateValueBuilder) bool
func (*MockStateValueBuilder) PutBool ¶
func (m *MockStateValueBuilder) PutBool(name appdef.FieldName, value bool)
func (*MockStateValueBuilder) PutBytes ¶
func (m *MockStateValueBuilder) PutBytes(name appdef.FieldName, value []byte)
func (*MockStateValueBuilder) PutChars ¶
func (m *MockStateValueBuilder) PutChars(name appdef.FieldName, value string)
func (*MockStateValueBuilder) PutEvent ¶
func (m *MockStateValueBuilder) PutEvent(name appdef.FieldName, event istructs.IDbEvent)
func (*MockStateValueBuilder) PutFloat32 ¶
func (m *MockStateValueBuilder) PutFloat32(name appdef.FieldName, value float32)
func (*MockStateValueBuilder) PutFloat64 ¶
func (m *MockStateValueBuilder) PutFloat64(name appdef.FieldName, value float64)
func (*MockStateValueBuilder) PutFromJSON ¶
func (m *MockStateValueBuilder) PutFromJSON(map[string]any)
func (*MockStateValueBuilder) PutInt32 ¶
func (m *MockStateValueBuilder) PutInt32(name appdef.FieldName, value int32)
func (*MockStateValueBuilder) PutInt64 ¶
func (m *MockStateValueBuilder) PutInt64(name appdef.FieldName, value int64)
func (*MockStateValueBuilder) PutNumber ¶
func (m *MockStateValueBuilder) PutNumber(name appdef.FieldName, value float64)
func (*MockStateValueBuilder) PutQName ¶
func (m *MockStateValueBuilder) PutQName(name appdef.FieldName, value appdef.QName)
func (*MockStateValueBuilder) PutRecord ¶
func (m *MockStateValueBuilder) PutRecord(name appdef.FieldName, record istructs.IRecord)
func (*MockStateValueBuilder) PutRecordID ¶
func (m *MockStateValueBuilder) PutRecordID(name appdef.FieldName, value istructs.RecordID)
func (*MockStateValueBuilder) PutString ¶
func (m *MockStateValueBuilder) PutString(name appdef.FieldName, value string)
func (*MockStateValueBuilder) ToBytes ¶
func (m *MockStateValueBuilder) ToBytes() ([]byte, error)
type PathReader ¶
type PathReader struct {
// contains filtered or unexported fields
}
func NewPathReader ¶
func NewPathReader(rootPath string) *PathReader
type ReqOptFunc ¶
type ReqOptFunc func(opts *reqOpts)
func Expect400 ¶
func Expect400(expectErrorContains ...string) ReqOptFunc
func Expect400RefIntegrity_Existence ¶
func Expect400RefIntegrity_Existence() ReqOptFunc
func Expect400RefIntegrity_QName ¶
func Expect400RefIntegrity_QName() ReqOptFunc
func Expect401 ¶
func Expect401() ReqOptFunc
func Expect403 ¶
func Expect403(expectedMessages ...string) ReqOptFunc
func Expect404 ¶
func Expect404() ReqOptFunc
func Expect409 ¶
func Expect409(expected ...string) ReqOptFunc
func Expect410 ¶
func Expect410() ReqOptFunc
func Expect429 ¶
func Expect429() ReqOptFunc
func Expect500 ¶
func Expect500() ReqOptFunc
func Expect503 ¶
func Expect503() ReqOptFunc
func ExpectSysError500 ¶
func ExpectSysError500() ReqOptFunc
func WithAuthorizeBy ¶
func WithAuthorizeBy(principalToken string) ReqOptFunc
has priority over WithAuthorizeByIfNot
func WithAuthorizeByIfNot ¶
func WithAuthorizeByIfNot(principalToken string) ReqOptFunc
func WithCookies ¶
func WithCookies(cookiesPairs ...string) ReqOptFunc
func WithDiscardResponse ¶
func WithDiscardResponse() ReqOptFunc
WithDiscardResponse, WithResponseHandler and WithLongPolling are mutual exclusive causes FederationReq() to return nil for *HTTPResponse
func WithExpectedCode ¶
func WithExpectedCode(expectedHTTPCode int, expectErrorContains ...string) ReqOptFunc
func WithHeaders ¶
func WithHeaders(headersPairs ...string) ReqOptFunc
func WithLongPolling ¶
func WithLongPolling() ReqOptFunc
WithLongPolling, WithResponseHandler and WithDiscardResponse are mutual exclusive
func WithMethod ¶
func WithMethod(m string) ReqOptFunc
func WithRelativeURL ¶
func WithRelativeURL(relativeURL string) ReqOptFunc
func WithResponseHandler ¶
func WithResponseHandler(responseHandler func(httpResp *http.Response)) ReqOptFunc
WithResponseHandler, WithLongPolling and WithDiscardResponse are mutual exclusive
func WithRetryOnAnyError ¶
func WithRetryOnAnyError(timeout time.Duration, retryDelay time.Duration) ReqOptFunc
func WithRetryOnCertainError ¶
type TestObject ¶
type TestObject struct { istructs.NullObject Name appdef.QName Id istructs.RecordID Parent_ istructs.RecordID Data map[string]interface{} Containers_ map[string][]*TestObject IsNew_ bool }
ICUDRow, IObject
func (*TestObject) AsBool ¶
func (o *TestObject) AsBool(name string) bool
func (*TestObject) AsBytes ¶
func (o *TestObject) AsBytes(name string) []byte
func (*TestObject) AsFloat32 ¶
func (o *TestObject) AsFloat32(name string) float32
func (*TestObject) AsFloat64 ¶
func (o *TestObject) AsFloat64(name string) float64
func (*TestObject) AsInt32 ¶
func (o *TestObject) AsInt32(name string) int32
func (*TestObject) AsInt64 ¶
func (o *TestObject) AsInt64(name string) int64
func (*TestObject) AsRecord ¶
func (o *TestObject) AsRecord() istructs.IRecord
func (*TestObject) AsRecordID ¶
func (o *TestObject) AsRecordID(name string) istructs.RecordID
func (*TestObject) AsString ¶
func (o *TestObject) AsString(name string) string
func (*TestObject) Children ¶
func (o *TestObject) Children(container string, cb func(istructs.IObject))
func (*TestObject) Containers ¶
func (o *TestObject) Containers(cb func(container string))
func (*TestObject) FieldNames ¶
func (o *TestObject) FieldNames(cb func(name string))
func (*TestObject) ID ¶
func (o *TestObject) ID() istructs.RecordID
func (*TestObject) IsNew ¶
func (o *TestObject) IsNew() bool
func (*TestObject) ModifiedFields ¶
func (o *TestObject) ModifiedFields(cb func(string, interface{}))
func (*TestObject) Parent ¶
func (o *TestObject) Parent() istructs.RecordID
func (*TestObject) PutBool ¶
func (o *TestObject) PutBool(name string, value bool)
func (*TestObject) PutBytes ¶
func (o *TestObject) PutBytes(name string, value []byte)
func (*TestObject) PutChars ¶
func (o *TestObject) PutChars(name string, value string)
func (*TestObject) PutFloat32 ¶
func (o *TestObject) PutFloat32(name string, value float32)
func (*TestObject) PutFloat64 ¶
func (o *TestObject) PutFloat64(name string, value float64)
func (*TestObject) PutFromJSON ¶
func (o *TestObject) PutFromJSON(value map[string]any)
func (*TestObject) PutInt32 ¶
func (o *TestObject) PutInt32(name string, value int32)
func (*TestObject) PutInt64 ¶
func (o *TestObject) PutInt64(name string, value int64)
func (*TestObject) PutNumber ¶
func (o *TestObject) PutNumber(name string, value float64)
func (*TestObject) PutRecordID ¶
func (o *TestObject) PutRecordID(name string, value istructs.RecordID)
func (*TestObject) PutString ¶
func (o *TestObject) PutString(name, value string)
func (*TestObject) QName ¶
func (o *TestObject) QName() appdef.QName
type TestValue ¶
type TestValue struct {
*TestObject
}