repository

package
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FollowFindOption

type FollowFindOption struct {
	Follower domain.Account

	CountPerPage int
	PageNum      int
}

type FollowerUserInfos

type FollowerUserInfos struct {
	Users []domain.FollowerUserInfo
	Total int
}

type User

type User interface {
	Save(*domain.User) (domain.User, error)
	GetByAccount(domain.Account) (domain.User, error)
	GetByFollower(owner, follower domain.Account) (domain.User, bool, error)
	FindUsersInfo([]domain.Account) ([]domain.UserInfo, error)
	GetUserAvatarId(domain.Account) (domain.AvatarId, error)

	Search(*UserSearchOption) (UserSearchResult, error)

	AddFollowing(*domain.FollowerInfo) error
	RemoveFollowing(*domain.FollowerInfo) error
	FindFollowing(domain.Account, *FollowFindOption) (FollowerUserInfos, error)

	AddFollower(*domain.FollowerInfo) error
	RemoveFollower(*domain.FollowerInfo) error
	FindFollower(domain.Account, *FollowFindOption) (FollowerUserInfos, error)
}

type UserReg

type UserReg interface {
	AddUserRegInfo(*domain.UserRegInfo) error
	GetUserRegInfo(types.Account) (domain.UserRegInfo, error)
	UpdateUserRegInfo(u *domain.UserRegInfo, version int) error
}

type UserSearchOption

type UserSearchOption struct {
	// can't define Name as domain.Account
	// because the Name can be subpart of the real account
	Name   string
	TopNum int
}

type UserSearchResult

type UserSearchResult struct {
	Top []domain.Account

	Total int
}

type WhiteList

type WhiteList interface {
	GetWhiteListInfo(types.Account, string) (domain.WhiteListInfo, error)
	FindByAccountAndWhitelistType(types.Account, []string) ([]domain.WhiteListInfo, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL