mock_skydb

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockConn

type MockConn struct {
	// contains filtered or unexported fields
}

Mock of Conn interface

func NewMockConn

func NewMockConn(ctrl *gomock.Controller) *MockConn

func (*MockConn) AddRelation

func (_m *MockConn) AddRelation(_param0 string, _param1 string, _param2 string) error

func (*MockConn) AssignRoles added in v1.1.0

func (_m *MockConn) AssignRoles(_param0 []string, _param1 []string) error

func (*MockConn) Close

func (_m *MockConn) Close() error

func (*MockConn) CreateAuth added in v1.1.0

func (_m *MockConn) CreateAuth(_param0 *skydb.AuthInfo) error

func (*MockConn) DeleteAuth added in v1.1.0

func (_m *MockConn) DeleteAuth(_param0 string) error

func (*MockConn) DeleteDevice

func (_m *MockConn) DeleteDevice(_param0 string) error

func (*MockConn) DeleteDevicesByToken

func (_m *MockConn) DeleteDevicesByToken(_param0 string, _param1 time.Time) error

func (*MockConn) DeleteEmptyDevicesByTime

func (_m *MockConn) DeleteEmptyDevicesByTime(_param0 time.Time) error

func (*MockConn) EXPECT

func (_m *MockConn) EXPECT() *_MockConnRecorder

func (*MockConn) EnsureAuthRecordKeysExist added in v1.1.0

func (_m *MockConn) EnsureAuthRecordKeysExist(_param0 [][]string) error

func (*MockConn) EnsureAuthRecordKeysIndexesMatch added in v1.1.0

func (_m *MockConn) EnsureAuthRecordKeysIndexesMatch(_param0 [][]string) error

func (*MockConn) GetAdminRoles

func (_m *MockConn) GetAdminRoles() ([]string, error)

func (*MockConn) GetAsset

func (_m *MockConn) GetAsset(_param0 string, _param1 *skydb.Asset) error

func (*MockConn) GetAssets added in v0.22.2

func (_m *MockConn) GetAssets(_param0 []string) ([]skydb.Asset, error)

func (*MockConn) GetAuth added in v1.1.0

func (_m *MockConn) GetAuth(_param0 string, _param1 *skydb.AuthInfo) error

func (*MockConn) GetAuthByPrincipalID added in v1.1.0

func (_m *MockConn) GetAuthByPrincipalID(_param0 string, _param1 *skydb.AuthInfo) error

func (*MockConn) GetDefaultRoles

func (_m *MockConn) GetDefaultRoles() ([]string, error)

func (*MockConn) GetDevice

func (_m *MockConn) GetDevice(_param0 string, _param1 *skydb.Device) error

func (*MockConn) GetRecordAccess

func (_m *MockConn) GetRecordAccess(_param0 string) (skydb.RecordACL, error)

func (*MockConn) GetRecordDefaultAccess added in v0.23.0

func (_m *MockConn) GetRecordDefaultAccess(_param0 string) (skydb.RecordACL, error)

func (*MockConn) GetRecordFieldAccess added in v1.1.0

func (_m *MockConn) GetRecordFieldAccess() (skydb.FieldACL, error)

func (*MockConn) GetRoles added in v1.1.0

func (_m *MockConn) GetRoles(_param0 []string) (map[string][]string, error)

func (*MockConn) PrivateDB

func (_m *MockConn) PrivateDB(_param0 string) skydb.Database

func (*MockConn) PublicDB

func (_m *MockConn) PublicDB() skydb.Database

func (*MockConn) QueryDevicesByUser

func (_m *MockConn) QueryDevicesByUser(_param0 string) ([]skydb.Device, error)

func (*MockConn) QueryDevicesByUserAndTopic added in v0.21.0

func (_m *MockConn) QueryDevicesByUserAndTopic(_param0 string, _param1 string) ([]skydb.Device, error)

func (*MockConn) QueryRelation

func (_m *MockConn) QueryRelation(_param0 string, _param1 string, _param2 string, _param3 skydb.QueryConfig) []skydb.AuthInfo

func (*MockConn) QueryRelationCount

func (_m *MockConn) QueryRelationCount(_param0 string, _param1 string, _param2 string) (uint64, error)

func (*MockConn) RemoveRelation

func (_m *MockConn) RemoveRelation(_param0 string, _param1 string, _param2 string) error

func (*MockConn) RevokeRoles added in v1.1.0

func (_m *MockConn) RevokeRoles(_param0 []string, _param1 []string) error

func (*MockConn) SaveAsset

func (_m *MockConn) SaveAsset(_param0 *skydb.Asset) error

func (*MockConn) SaveDevice

func (_m *MockConn) SaveDevice(_param0 *skydb.Device) error

func (*MockConn) SetAdminRoles

func (_m *MockConn) SetAdminRoles(_param0 []string) error

func (*MockConn) SetDefaultRoles

func (_m *MockConn) SetDefaultRoles(_param0 []string) error

func (*MockConn) SetRecordAccess

func (_m *MockConn) SetRecordAccess(_param0 string, _param1 skydb.RecordACL) error

func (*MockConn) SetRecordDefaultAccess added in v0.23.0

func (_m *MockConn) SetRecordDefaultAccess(_param0 string, _param1 skydb.RecordACL) error

func (*MockConn) SetRecordFieldAccess added in v1.1.0

func (_m *MockConn) SetRecordFieldAccess(_param0 skydb.FieldACL) error

func (*MockConn) Subscribe

func (_m *MockConn) Subscribe(_param0 chan skydb.RecordEvent) error

func (*MockConn) UnionDB

func (_m *MockConn) UnionDB() skydb.Database

func (*MockConn) UpdateAuth added in v1.1.0

func (_m *MockConn) UpdateAuth(_param0 *skydb.AuthInfo) error

type MockDatabase

type MockDatabase struct {
	// contains filtered or unexported fields
}

Mock of Database interface

func NewMockDatabase

func NewMockDatabase(ctrl *gomock.Controller) *MockDatabase

func (*MockDatabase) Conn

func (_m *MockDatabase) Conn() skydb.Conn

func (*MockDatabase) DatabaseType

func (_m *MockDatabase) DatabaseType() skydb.DatabaseType

func (*MockDatabase) Delete

func (_m *MockDatabase) Delete(_param0 skydb.RecordID) error

func (*MockDatabase) DeleteIndex added in v1.1.0

func (_m *MockDatabase) DeleteIndex(_param0 string, _param1 string) error

func (*MockDatabase) DeleteSchema

func (_m *MockDatabase) DeleteSchema(_param0 string, _param1 string) error

func (*MockDatabase) DeleteSubscription

func (_m *MockDatabase) DeleteSubscription(_param0 string, _param1 string) error

func (*MockDatabase) EXPECT

func (_m *MockDatabase) EXPECT() *_MockDatabaseRecorder

func (*MockDatabase) Extend

func (_m *MockDatabase) Extend(_param0 string, _param1 skydb.RecordSchema) (bool, error)

func (*MockDatabase) Get

func (_m *MockDatabase) Get(_param0 skydb.RecordID, _param1 *skydb.Record) error

func (*MockDatabase) GetByIDs

func (_m *MockDatabase) GetByIDs(_param0 []skydb.RecordID) (*skydb.Rows, error)

func (*MockDatabase) GetIndexesByRecordType added in v1.1.0

func (_m *MockDatabase) GetIndexesByRecordType(_param0 string) (map[string]skydb.Index, error)

func (*MockDatabase) GetMatchingSubscriptions

func (_m *MockDatabase) GetMatchingSubscriptions(_param0 *skydb.Record) []skydb.Subscription

func (*MockDatabase) GetRecordSchemas

func (_m *MockDatabase) GetRecordSchemas() (map[string]skydb.RecordSchema, error)

func (*MockDatabase) GetSchema

func (_m *MockDatabase) GetSchema(_param0 string) (skydb.RecordSchema, error)

func (*MockDatabase) GetSubscription

func (_m *MockDatabase) GetSubscription(_param0 string, _param1 string, _param2 *skydb.Subscription) error

func (*MockDatabase) GetSubscriptionsByDeviceID

func (_m *MockDatabase) GetSubscriptionsByDeviceID(_param0 string) []skydb.Subscription

func (*MockDatabase) ID

func (_m *MockDatabase) ID() string

func (*MockDatabase) IsReadOnly

func (_m *MockDatabase) IsReadOnly() bool

func (*MockDatabase) Query

func (_m *MockDatabase) Query(_param0 *skydb.Query) (*skydb.Rows, error)

func (*MockDatabase) QueryCount

func (_m *MockDatabase) QueryCount(_param0 *skydb.Query) (uint64, error)

func (*MockDatabase) RemoteColumnTypes added in v0.23.0

func (_m *MockDatabase) RemoteColumnTypes(_param0 string) (skydb.RecordSchema, error)

func (*MockDatabase) RenameSchema

func (_m *MockDatabase) RenameSchema(_param0 string, _param1 string, _param2 string) error

func (*MockDatabase) Save

func (_m *MockDatabase) Save(_param0 *skydb.Record) error

func (*MockDatabase) SaveIndex added in v1.1.0

func (_m *MockDatabase) SaveIndex(_param0 string, _param1 string, _param2 skydb.Index) error

func (*MockDatabase) SaveSubscription

func (_m *MockDatabase) SaveSubscription(_param0 *skydb.Subscription) error

func (*MockDatabase) TableName added in v0.23.0

func (_m *MockDatabase) TableName(_param0 string) string

func (*MockDatabase) UserRecordType

func (_m *MockDatabase) UserRecordType() string

type MockTxDatabase added in v1.1.0

type MockTxDatabase struct {
	// contains filtered or unexported fields
}

Mock of TxDatabase interface

func NewMockTxDatabase added in v1.1.0

func NewMockTxDatabase(ctrl *gomock.Controller) *MockTxDatabase

func (*MockTxDatabase) Begin added in v1.1.0

func (_m *MockTxDatabase) Begin() error

func (*MockTxDatabase) Commit added in v1.1.0

func (_m *MockTxDatabase) Commit() error

func (*MockTxDatabase) Conn added in v1.1.0

func (_m *MockTxDatabase) Conn() skydb.Conn

func (*MockTxDatabase) DatabaseType added in v1.1.0

func (_m *MockTxDatabase) DatabaseType() skydb.DatabaseType

func (*MockTxDatabase) Delete added in v1.1.0

func (_m *MockTxDatabase) Delete(_param0 skydb.RecordID) error

func (*MockTxDatabase) DeleteIndex added in v1.1.0

func (_m *MockTxDatabase) DeleteIndex(_param0 string, _param1 string) error

func (*MockTxDatabase) DeleteSchema added in v1.1.0

func (_m *MockTxDatabase) DeleteSchema(_param0 string, _param1 string) error

func (*MockTxDatabase) DeleteSubscription added in v1.1.0

func (_m *MockTxDatabase) DeleteSubscription(_param0 string, _param1 string) error

func (*MockTxDatabase) EXPECT added in v1.1.0

func (_m *MockTxDatabase) EXPECT() *_MockTxDatabaseRecorder

func (*MockTxDatabase) Extend added in v1.1.0

func (_m *MockTxDatabase) Extend(_param0 string, _param1 skydb.RecordSchema) (bool, error)

func (*MockTxDatabase) Get added in v1.1.0

func (_m *MockTxDatabase) Get(_param0 skydb.RecordID, _param1 *skydb.Record) error

func (*MockTxDatabase) GetByIDs added in v1.1.0

func (_m *MockTxDatabase) GetByIDs(_param0 []skydb.RecordID) (*skydb.Rows, error)

func (*MockTxDatabase) GetIndexesByRecordType added in v1.1.0

func (_m *MockTxDatabase) GetIndexesByRecordType(_param0 string) (map[string]skydb.Index, error)

func (*MockTxDatabase) GetMatchingSubscriptions added in v1.1.0

func (_m *MockTxDatabase) GetMatchingSubscriptions(_param0 *skydb.Record) []skydb.Subscription

func (*MockTxDatabase) GetRecordSchemas added in v1.1.0

func (_m *MockTxDatabase) GetRecordSchemas() (map[string]skydb.RecordSchema, error)

func (*MockTxDatabase) GetSchema added in v1.1.0

func (_m *MockTxDatabase) GetSchema(_param0 string) (skydb.RecordSchema, error)

func (*MockTxDatabase) GetSubscription added in v1.1.0

func (_m *MockTxDatabase) GetSubscription(_param0 string, _param1 string, _param2 *skydb.Subscription) error

func (*MockTxDatabase) GetSubscriptionsByDeviceID added in v1.1.0

func (_m *MockTxDatabase) GetSubscriptionsByDeviceID(_param0 string) []skydb.Subscription

func (*MockTxDatabase) ID added in v1.1.0

func (_m *MockTxDatabase) ID() string

func (*MockTxDatabase) IsReadOnly added in v1.1.0

func (_m *MockTxDatabase) IsReadOnly() bool

func (*MockTxDatabase) Query added in v1.1.0

func (_m *MockTxDatabase) Query(_param0 *skydb.Query) (*skydb.Rows, error)

func (*MockTxDatabase) QueryCount added in v1.1.0

func (_m *MockTxDatabase) QueryCount(_param0 *skydb.Query) (uint64, error)

func (*MockTxDatabase) RemoteColumnTypes added in v1.1.0

func (_m *MockTxDatabase) RemoteColumnTypes(_param0 string) (skydb.RecordSchema, error)

func (*MockTxDatabase) RenameSchema added in v1.1.0

func (_m *MockTxDatabase) RenameSchema(_param0 string, _param1 string, _param2 string) error

func (*MockTxDatabase) Rollback added in v1.1.0

func (_m *MockTxDatabase) Rollback() error

func (*MockTxDatabase) Save added in v1.1.0

func (_m *MockTxDatabase) Save(_param0 *skydb.Record) error

func (*MockTxDatabase) SaveIndex added in v1.1.0

func (_m *MockTxDatabase) SaveIndex(_param0 string, _param1 string, _param2 skydb.Index) error

func (*MockTxDatabase) SaveSubscription added in v1.1.0

func (_m *MockTxDatabase) SaveSubscription(_param0 *skydb.Subscription) error

func (*MockTxDatabase) TableName added in v1.1.0

func (_m *MockTxDatabase) TableName(_param0 string) string

func (*MockTxDatabase) UserRecordType added in v1.1.0

func (_m *MockTxDatabase) UserRecordType() string

Jump to

Keyboard shortcuts

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