Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Listener struct { Proto string ConnInfo string } DB struct { ConnString string } FCM struct { SenderID uint64 APIKey string } }
Config represents the configuration that should be provided to uplink.Start to fully initialize a Server instance.
func ReadConfig ¶
ReadConfig reads the configuration for uplink from a file specified by path. See provided example for syntax.
type Conversation ¶
type Conversation struct { ID int64 `igor:"primary_key"` Name string `sql:"default:''"` Creator int64 CreationTime time.Time `sql:"default:(now() at time zone 'utc')"` }
Conversation represents a conversation between many Users.
func (Conversation) TableName ¶
func (Conversation) TableName() string
TableName returns the name of the table associated with Conversation.
type FCMSubscription ¶
FCMSubscription represents the RegId of a mobile user associated with FCM.
func (FCMSubscription) TableName ¶
func (FCMSubscription) TableName() string
TableName returns the name of the table associated with Session.
type Friendship ¶
type Friendship struct { ID int64 `igor:"primary_key"` Sender int64 Receiver int64 Established bool }
Friendship represents a relationship between two users that contacted each other, and appear in each friendlist.
func (Friendship) TableName ¶
func (Friendship) TableName() string
TableName returns the name of the table associated with Friendship.
type Invite ¶
type Invite struct { ID int64 `igor:"primary_key"` Conversation int64 Sender int64 Receiver int64 RecvTime time.Time `sql:"default:(now() at time zone 'utc')"` }
Invite represents an invite to a given Conversation.
type Member ¶
type Member struct { ID int64 `igor:"primary_key"` UID int64 Conversation int64 JoinTime time.Time `sql:"default:(now() at time zone 'utc')"` }
Member represents the membership of a given User to a Conversation.
type Message ¶
type Message struct { ID int64 `igor:"primary_key"` Tag int64 Conversation int64 Sender int64 RecvTime time.Time `sql:"default:(now() at time zone 'utc')"` Body string }
Message represents a message belonging to a Conversation.
type Session ¶
type Session struct { ID int64 `igor:"primary_key"` SessionID string `sql:"default:encode(digest(gen_random_bytes(256),'sha256'),'hex')"` UID int64 }
Session represents a session.
type Uplink ¶
Uplink instance structure.