Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FriendItem ¶ added in v0.30.3
type FriendItem struct{}
type FullUser ¶ added in v0.34.0
type FullUser struct { RegistrationTime time.Time NickName string Avatar string Sign string UserName string ID model.UserID UserGroup GroupID TimeOffset int8 }
FullUser is for current user or admin only.
type PrivacySettings ¶ added in v0.30.3
type PrivacySettings struct { ReceivePrivateMessage ReceiveFilter ReceiveTimelineReply ReceiveFilter ReceiveMentionNotification ReceiveFilter ReceiveCommentNotification ReceiveFilter }
func (*PrivacySettings) Unmarshal ¶ added in v0.30.3
func (settings *PrivacySettings) Unmarshal(s []byte)
type PrivacySettingsField ¶ added in v0.30.3
type PrivacySettingsField int
const ( PrivacyReceivePrivateMessage PrivacySettingsField = 1 PrivacyReceiveTimelineReply PrivacySettingsField = 30 PrivacyReceiveMentionNotification PrivacySettingsField = 20 PrivacyReceiveCommentNotification PrivacySettingsField = 21 )
type ReceiveFilter ¶ added in v0.30.3
type ReceiveFilter uint8
const ( ReceiveFilterAll ReceiveFilter = iota ReceiveFilterFriends ReceiveFilterNone )
type Repo ¶ added in v0.30.3
type Repo interface { // GetFullUser find a user by uid. GetFullUser(ctx context.Context, userID model.UserID) (FullUser, error) // GetByID find a user by uid. GetByID(ctx context.Context, userID model.UserID) (User, error) // GetByName find a user by username. GetByName(ctx context.Context, username string) (User, error) GetByIDs(ctx context.Context, ids []model.UserID) (map[model.UserID]User, error) GetFriends(ctx context.Context, userID model.UserID) (map[model.UserID]FriendItem, error) CheckIsFriendToOthers(ctx context.Context, selfID model.UserID, otherIDs ...model.UserID) (bool, error) GetFieldsByIDs(ctx context.Context, ids []model.UserID) (map[model.UserID]Fields, error) }
Click to show internal directories.
Click to hide internal directories.