Documentation ¶
Index ¶
- type MapConn
- func (conn *MapConn) AddRelation(user string, name string, targetUser string) error
- func (conn *MapConn) Close() error
- func (conn *MapConn) CreateUser(userinfo *skydb.UserInfo) error
- func (conn *MapConn) DeleteDevice(id string) error
- func (conn *MapConn) DeleteDeviceByToken(token string, t time.Time) error
- func (conn *MapConn) DeleteEmptyDevicesByTime(t time.Time) error
- func (conn *MapConn) DeleteUser(id string) error
- func (conn *MapConn) GetAsset(name string, asset *skydb.Asset) error
- func (conn *MapConn) GetDevice(id string, device *skydb.Device) error
- func (conn *MapConn) GetUser(id string, userinfo *skydb.UserInfo) error
- func (conn *MapConn) GetUserByPrincipalID(principalID string, userinfo *skydb.UserInfo) error
- func (conn *MapConn) GetUserByUsernameEmail(username string, email string, userinfo *skydb.UserInfo) error
- func (conn *MapConn) PrivateDB(userKey string) skydb.Database
- func (conn *MapConn) PublicDB() skydb.Database
- func (conn *MapConn) QueryDevicesByUser(user string) ([]skydb.Device, error)
- func (conn *MapConn) QueryRelation(user string, name string, direction string, config skydb.QueryConfig) []skydb.UserInfo
- func (conn *MapConn) QueryRelationCount(user string, name string, direction string) (uint64, error)
- func (conn *MapConn) QueryUser(emails []string) ([]skydb.UserInfo, error)
- func (conn *MapConn) RemoveRelation(user string, name string, targetUser string) error
- func (conn *MapConn) SaveAsset(asset *skydb.Asset) error
- func (conn *MapConn) SaveDevice(device *skydb.Device) error
- func (conn *MapConn) Subscribe(recordEventChan chan skydb.RecordEvent) error
- func (conn *MapConn) UpdateUser(userinfo *skydb.UserInfo) error
- type MapDB
- func (db *MapDB) Delete(id skydb.RecordID) error
- func (db *MapDB) DeleteSubscription(name string, deviceID string) error
- func (db *MapDB) Extend(recordType string, schema skydb.RecordSchema) error
- func (db *MapDB) Get(id skydb.RecordID, record *skydb.Record) error
- func (db *MapDB) GetSubscription(name string, deviceID string, subscription *skydb.Subscription) error
- func (db *MapDB) ID() string
- func (db *MapDB) Query(query *skydb.Query) (*skydb.Rows, error)
- func (db *MapDB) Save(record *skydb.Record) error
- func (db *MapDB) SaveSubscription(subscription *skydb.Subscription) error
- type RecordMap
- type SubscriptionMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MapConn ¶
MapConn is a naive memory implementation of skydb.Conn
func (*MapConn) AddRelation ¶
AddRelation is not implemented.
func (*MapConn) CreateUser ¶
CreateUser creates a UserInfo in UserMap.
func (*MapConn) DeleteDevice ¶
DeleteDevice is not implemented.
func (*MapConn) DeleteDeviceByToken ¶
DeleteDeviceByToken is not implemented.
func (*MapConn) DeleteEmptyDevicesByTime ¶
DeleteEmptyDevicesByTime is not implemented.
func (*MapConn) DeleteUser ¶
DeleteUser remove an existing in UserMap.
func (*MapConn) GetUserByPrincipalID ¶
GetUserByPrincipalID returns a UserInfo by its principalID.
func (*MapConn) GetUserByUsernameEmail ¶
func (conn *MapConn) GetUserByUsernameEmail(username string, email string, userinfo *skydb.UserInfo) error
GetUserByUsernameEmail returns a UserInfo in UserMap by email address.
func (*MapConn) QueryDevicesByUser ¶
QueryDevicesByUser is not implemented.
func (*MapConn) QueryRelation ¶
func (conn *MapConn) QueryRelation(user string, name string, direction string, config skydb.QueryConfig) []skydb.UserInfo
QueryRelation is not implemented.
func (*MapConn) QueryRelationCount ¶
QueryRelationCount is not implemented.
func (*MapConn) RemoveRelation ¶
RemoveRelation is not implemented.
func (*MapConn) SaveDevice ¶
SaveDevice is not implemented.
type MapDB ¶
type MapDB struct { RecordMap RecordMap SubscriptionMap SubscriptionMap skydb.Database }
MapDB is a naive memory implementation of skydb.Database.
func (*MapDB) DeleteSubscription ¶
DeleteSubscription deletes the specified key from SubscriptionMap.
func (*MapDB) Extend ¶
func (db *MapDB) Extend(recordType string, schema skydb.RecordSchema) error
Extend does nothing.
func (*MapDB) GetSubscription ¶
func (db *MapDB) GetSubscription(name string, deviceID string, subscription *skydb.Subscription) error
GetSubscription return a Subscription from SubscriptionMap.
func (*MapDB) SaveSubscription ¶
func (db *MapDB) SaveSubscription(subscription *skydb.Subscription) error
SaveSubscription assigns to SubscriptionMap.
type SubscriptionMap ¶
type SubscriptionMap map[string]skydb.Subscription
SubscriptionMap is a string=>Subscription map