Package sqlite
- type EntityDatabase
- func OpenEntityDatabase(fileName string) (*EntityDatabase, error)
- func (d *EntityDatabase) Close() error
- func (d *EntityDatabase) GetMessage(eid *entity.ID) (*entity.Message, error)
- func (d *EntityDatabase) GetMessagesStoredAfter(ts time.Time, limit int) ([]*entity.StoredMessage, error)
- func (d *EntityDatabase) GetNearMessageID(m *entity.Message, diff time.Duration) (*entity.ID, error)
- func (d *EntityDatabase) GetOperation(oid *entity.ID) (*entity.Operation, error)
- func (d *EntityDatabase) GetOperationsOnMessage(mid *entity.ID) ([]*entity.Operation, error)
- func (d *EntityDatabase) GetOperationsOnUser(uid *entity.ID) ([]*entity.Operation, error)
- func (d *EntityDatabase) GetOperationsStoredAfter(ts time.Time, limit int) ([]*entity.StoredOperation, error)
- func (d *EntityDatabase) GetReplies(eid *entity.ID) ([]*entity.Message, error)
- func (d *EntityDatabase) GetRootMessages(offset, limit int) ([]*entity.Message, error)
- func (d *EntityDatabase) GetThread(eid *entity.ID) (*thread.Node, error)
- func (d *EntityDatabase) GetTopicMessages(topic subs.Topic, offset, limit int) ([]*entity.Message, error)
- func (d *EntityDatabase) GetUser(eid *entity.ID) (*entity.User, error)
- func (d *EntityDatabase) HasMessage(eid *entity.ID) (bool, error)
- func (d *EntityDatabase) HasOperation(eid *entity.ID) (bool, error)
- func (d *EntityDatabase) HasUser(eid *entity.ID) (bool, error)
- func (d *EntityDatabase) PutMessage(msg *entity.Message, ts time.Time) error
- func (d *EntityDatabase) PutOperation(oper *entity.Operation, ts time.Time) error
- func (d *EntityDatabase) PutUser(user *entity.User, ts time.Time) error
- type ProfileDatabase
- func OpenProfileDatabase(fileName string) (*ProfileDatabase, error)
- func (pd *ProfileDatabase) Close() error
- func (pd *ProfileDatabase) GetFullHistory() ([]*entity.UserHistory, error)
- func (pd *ProfileDatabase) GetModerators() ([]*entity.ID, error)
- func (pd *ProfileDatabase) GetSubscriptions() (subs.Subscriptions, error)
- func (pd *ProfileDatabase) GetUserHistory(id *entity.ID) (*entity.UserHistory, error)
- func (pd *ProfileDatabase) PutModerator(id *entity.ID) error
- func (pd *ProfileDatabase) PutSubscription(t subs.Topic) error
- func (pd *ProfileDatabase) PutUserHistory(h *entity.UserHistory) error
- func (pd *ProfileDatabase) RemoveModerator(id *entity.ID) error
- func (pd *ProfileDatabase) RemoveSubscription(t subs.Topic) error
Package files
entity_database.go
profile_database.go
In the call graph viewer below, each node
is a function belonging to this package
and its children are the functions it
calls—perhaps dynamically.
The root nodes are the entry points of the
package: functions that may be called from
outside the package.
There may be non-exported or anonymous
functions among them if they are called
dynamically from another package.
Click a node to visit that function's source code.
From there you can visit its callers by
clicking its declaring func
token.
Functions may be omitted if they were
determined to be unreachable in the
particular programs or tests that were
analyzed.
EntityDatabase stores Entities.
type EntityDatabase sql.DB
func OpenEntityDatabase(fileName string) (*EntityDatabase, error)
func (*EntityDatabase) Close
¶
func (d *EntityDatabase) Close() error
func (*EntityDatabase) GetMessage
¶
func (d *EntityDatabase) GetMessage(eid *entity.ID) (*entity.Message, error)
func (d *EntityDatabase) GetMessagesStoredAfter(ts time.Time, limit int) ([]*entity.StoredMessage, error)
func (d *EntityDatabase) GetNearMessageID(
m *entity.Message,
diff time.Duration,
) (*entity.ID, error)
func (d *EntityDatabase) GetOperation(oid *entity.ID) (*entity.Operation, error)
func (d *EntityDatabase) GetOperationsOnMessage(mid *entity.ID) ([]*entity.Operation, error)
func (d *EntityDatabase) GetOperationsOnUser(uid *entity.ID) ([]*entity.Operation, error)
func (d *EntityDatabase) GetOperationsStoredAfter(ts time.Time, limit int) ([]*entity.StoredOperation, error)
func (*EntityDatabase) GetReplies
¶
func (d *EntityDatabase) GetReplies(eid *entity.ID) ([]*entity.Message, error)
func (d *EntityDatabase) GetRootMessages(offset, limit int) ([]*entity.Message, error)
func (*EntityDatabase) GetThread
¶
func (d *EntityDatabase) GetThread(eid *entity.ID) (*thread.Node, error)
func (d *EntityDatabase) GetTopicMessages(topic subs.Topic, offset, limit int) ([]*entity.Message, error)
func (*EntityDatabase) GetUser
¶
func (d *EntityDatabase) GetUser(eid *entity.ID) (*entity.User, error)
func (*EntityDatabase) HasMessage
¶
func (d *EntityDatabase) HasMessage(eid *entity.ID) (bool, error)
func (d *EntityDatabase) HasOperation(eid *entity.ID) (bool, error)
func (*EntityDatabase) HasUser
¶
func (d *EntityDatabase) HasUser(eid *entity.ID) (bool, error)
func (*EntityDatabase) PutMessage
¶
func (d *EntityDatabase) PutMessage(msg *entity.Message, ts time.Time) error
func (d *EntityDatabase) PutOperation(oper *entity.Operation, ts time.Time) error
func (*EntityDatabase) PutUser
¶
func (d *EntityDatabase) PutUser(user *entity.User, ts time.Time) error
ProfileDatabase stores personal settings of the owner.
It includes owner's subscriptions, list of chosen moderators. flags
that message has been read (TBD) and so on.
type ProfileDatabase sql.DB
func OpenProfileDatabase(fileName string) (*ProfileDatabase, error)
func (*ProfileDatabase) Close
¶
func (pd *ProfileDatabase) Close() error
func (pd *ProfileDatabase) GetFullHistory() ([]*entity.UserHistory, error)
func (pd *ProfileDatabase) GetModerators() ([]*entity.ID, error)
func (pd *ProfileDatabase) GetSubscriptions() (subs.Subscriptions, error)
func (pd *ProfileDatabase) GetUserHistory(id *entity.ID) (*entity.UserHistory, error)
func (pd *ProfileDatabase) PutModerator(id *entity.ID) error
func (pd *ProfileDatabase) PutSubscription(t subs.Topic) error
func (pd *ProfileDatabase) PutUserHistory(h *entity.UserHistory) error
func (pd *ProfileDatabase) RemoveModerator(id *entity.ID) error
func (pd *ProfileDatabase) RemoveSubscription(t subs.Topic) error