Documentation ¶
Index ¶
- func DeleteUser(id ss.UserID, db ddb.Client) (bool, error)
- func NewConnectionKey(id ss.ConnectionID) connectionKey
- func NewUserAnonymousRecordExpirationTime(start ss.Time) *ss.Time
- type Connection
- type ConnectionIDByUser
- type ConnectionKeyValue
- type ConnectionUserIndex
- func (ConnectionUserIndex) GetIndex() string
- func (ConnectionUserIndex) GetIndexPartitionField() string
- func (ConnectionUserIndex) GetIndexSortField() string
- func (ConnectionUserIndex) GetKeyPartitionField() string
- func (ConnectionUserIndex) GetKeySortField() string
- func (ConnectionUserIndex) GetProjection() []string
- func (ConnectionUserIndex) GetTable() string
- type Device
- type DeviceCryptoKey
- type DeviceKey
- type DeviceKeyValue
- type DeviceRecord
- type DeviceUserIndex
- type FindUserConnectionsIterator
- type User
- type UserExternalFirabaseIDIndex
- type UserKey
- type UserRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConnectionKey ¶
func NewConnectionKey(id ss.ConnectionID) connectionKey
Types ¶
type Connection ¶
type Connection struct { ConnectionKeyValue User ss.UserID `json:"user"` Version string `json:"ver"` ExpirationTime ss.Time `json:"expiration"` // contains filtered or unexported fields }
Connection describes the record of a table with active connections.
func NewConnection ¶
func NewConnection( id ss.ConnectionID, user ss.UserID, version string, ) Connection
NewConnection creates new connection record.
func (Connection) GetData ¶
func (record Connection) GetData() interface{}
GetData returns record's data.
func (Connection) GetKeyPartitionField ¶
func (Connection) GetKeyPartitionField() string
GetKeyPartitionField returns partition field name.
func (Connection) GetKeySortField ¶
func (Connection) GetKeySortField() string
GetKeySortField returns sort field name.
type ConnectionIDByUser ¶
type ConnectionIDByUser struct { ConnectionUserIndex ID ss.ConnectionID `json:"id"` }
func (*ConnectionIDByUser) Clear ¶
func (record *ConnectionIDByUser) Clear()
func (ConnectionIDByUser) GetKeyPartitionField ¶
func (ConnectionIDByUser) GetKeyPartitionField() string
GetKeyPartitionField returns partition field name.
func (ConnectionIDByUser) GetKeySortField ¶
func (ConnectionIDByUser) GetKeySortField() string
GetKeySortField returns sort field name.
type ConnectionKeyValue ¶
type ConnectionKeyValue struct {
ID ss.ConnectionID `json:"id"`
}
type ConnectionUserIndex ¶
type ConnectionUserIndex struct {
// contains filtered or unexported fields
}
ConnectionUserIndex describes connection index "bu user".
func (ConnectionUserIndex) GetIndex ¶
func (ConnectionUserIndex) GetIndex() string
GetIndex returns index name.
func (ConnectionUserIndex) GetIndexPartitionField ¶
func (ConnectionUserIndex) GetIndexPartitionField() string
GetIndexPartitionField returns index partition field name.
func (ConnectionUserIndex) GetIndexSortField ¶
func (ConnectionUserIndex) GetIndexSortField() string
GetIndexSortField returns index sort field name.
func (ConnectionUserIndex) GetKeyPartitionField ¶
func (ConnectionUserIndex) GetKeyPartitionField() string
GetKeyPartitionField returns partition field name.
func (ConnectionUserIndex) GetKeySortField ¶
func (ConnectionUserIndex) GetKeySortField() string
GetKeySortField returns sort field name.
func (ConnectionUserIndex) GetProjection ¶
func (ConnectionUserIndex) GetProjection() []string
type Device ¶
type Device struct { DeviceRecord DeviceKeyValue ID ss.DeviceID `json:"id"` User ss.UserID `json:"user"` Key DeviceCryptoKey `json:"key"` }
func NewDevice ¶
func NewDevice( id ss.DeviceID, fcmToken ss.FirebaseCloudMessagingToken, user ss.UserID, key DeviceCryptoKey, ) Device
func (Device) MarshalLogMsg ¶
type DeviceCryptoKey ¶
type DeviceKey ¶
type DeviceKey struct { DeviceRecord DeviceKeyValue }
func NewDeviceKey ¶
func NewDeviceKey(fcmToken ss.FirebaseCloudMessagingToken) DeviceKey
type DeviceKeyValue ¶
type DeviceKeyValue struct {
FCMToken ss.FirebaseCloudMessagingToken `json:"fcm"`
}
type DeviceRecord ¶
type DeviceRecord struct{}
func (DeviceRecord) GetKeyPartitionField ¶
func (DeviceRecord) GetKeyPartitionField() string
func (DeviceRecord) GetKeySortField ¶
func (DeviceRecord) GetKeySortField() string
func (DeviceRecord) GetTable ¶
func (DeviceRecord) GetTable() string
type DeviceUserIndex ¶
type DeviceUserIndex struct{ DeviceRecord }
func (DeviceUserIndex) GetIndex ¶
func (DeviceUserIndex) GetIndex() string
GetIndex returns index name.
func (DeviceUserIndex) GetIndexPartitionField ¶
func (DeviceUserIndex) GetIndexPartitionField() string
GetIndexPartitionField returns index partition field name.
func (DeviceUserIndex) GetIndexSortField ¶
func (DeviceUserIndex) GetIndexSortField() string
GetIndexSortField returns index sort field name.
func (DeviceUserIndex) GetProjection ¶
func (DeviceUserIndex) GetProjection() []string
type FindUserConnectionsIterator ¶
type FindUserConnectionsIterator interface { Next() bool Get() ss.ConnectionID }
IteratorMover describes intreface to move iterator.
func FindUserConnections ¶
func FindUserConnections( user ss.UserID, db ddb.Client, ) FindUserConnectionsIterator
type User ¶
type User struct { UserRecord FirebaseID string `json:"fId"` CreationTime ss.Time `json:"created"` // SpotMembershipVersion increases each time when the user joins an event // spot or leaves it. SpotMembershipVersion ddb.MembershipVersion `json:"spotsVer"` // OriginalName is the name from the user record source (like Firbase). OriginalName string `json:"origName"` // OwnName is the name that user set by the app. OwnName string `json:"ownName,omitempty"` Email string `json:"email,omitempty"` PhoneNumber string `json:"phone,omitempty"` PhotoURL string `json:"photoUrl,omitempty"` AnonymousRecordExpirationTime *ss.Time `json:"anonymExpiration,omitempty"` // contains filtered or unexported fields }
User describes user record fields.
func NewFirebaseUser ¶
NewUser generates new user record.
func (User) IsAnonymous ¶
type UserExternalFirabaseIDIndex ¶
type UserExternalFirabaseIDIndex struct{ UserRecord }
func (UserExternalFirabaseIDIndex) GetIndex ¶
func (UserExternalFirabaseIDIndex) GetIndex() string
func (UserExternalFirabaseIDIndex) GetIndexPartitionField ¶
func (UserExternalFirabaseIDIndex) GetIndexPartitionField() string
func (UserExternalFirabaseIDIndex) GetIndexSortField ¶
func (UserExternalFirabaseIDIndex) GetIndexSortField() string
func (UserExternalFirabaseIDIndex) GetProjection ¶
func (UserExternalFirabaseIDIndex) GetProjection() []string
type UserKey ¶
type UserKey struct { UserRecord // contains filtered or unexported fields }
UserKey is an object ot looks for user by primary key.
type UserRecord ¶
type UserRecord struct{}
func (UserRecord) GetKeyPartitionField ¶
func (UserRecord) GetKeyPartitionField() string
func (UserRecord) GetKeySortField ¶
func (UserRecord) GetKeySortField() string
func (UserRecord) GetTable ¶
func (UserRecord) GetTable() string