Documentation
¶
Overview ¶
Package types contains common types used across the backend.
Index ¶
- func AccountStateToAccountProto(accountState *stpb.AccountState) *pb.Account
- func SettingListCount(s *settingspb.Settings) int64
- func SettingSeenReblogs(s *settingspb.Settings) settingspb.SettingSeenReblogs_Values
- func StreamStateToStreamInfo(ss *stpb.StreamState) *pb.StreamInfo
- type ASID
- type AppRegInfo
- type SID
- type SQLProto
- type SQLStatus
- type StID
- type UID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccountStateToAccountProto ¶
func AccountStateToAccountProto(accountState *stpb.AccountState) *pb.Account
func SettingListCount ¶
func SettingListCount(s *settingspb.Settings) int64
func SettingSeenReblogs ¶
func SettingSeenReblogs(s *settingspb.Settings) settingspb.SettingSeenReblogs_Values
func StreamStateToStreamInfo ¶
func StreamStateToStreamInfo(ss *stpb.StreamState) *pb.StreamInfo
Types ¶
type AppRegInfo ¶
type AppRegInfo struct { // Mastodon server address. ServerAddr string `json:"server_addr"` // Scopes used when registering the app. Scopes string `json:"scopes"` // Where the oauth should redirect - incl. /_redirect. RedirectURI string `json:"redirect_uri"` }
AppRegInfo is what identify a given app registration on a Mastodon server. It is used to identify which app registration is needed when interacting with a Mastodon server. It is not serialized - see AppRegState for that. AppRegState is a strict superset.
func (*AppRegInfo) Key ¶
func (nfo *AppRegInfo) Key() string
Key computes a string key for that entry, for indexing. It is unique for a given AppRegKey content.
type SID ¶
type SID int64
SID is the type of status IDs in `statuses` and `streamcontent` databases.
type SQLProto ¶
SQLProto encapsulate a protobuf message to make suitable as value of SQL queries - both as source data and as destination data. E.g.,: SQLProto{myMsg}
Click to show internal directories.
Click to hide internal directories.