Documentation ¶
Index ¶
- Constants
- func AuthId(c *fiber.Ctx) uint
- func AuthUser(c *fiber.Ctx) models.User
- func FindFollowId(follows []models.Follow, followId uint) uint
- func FindUser(users []models.User, userId uint) models.User
- func FollowerCount(userId uint) int64
- func FollowingCount(userId uint) int64
- func GetOffset(c *fiber.Ctx) int
- func GetUser(uuid string) (models.User, error)
- func HasLiked(userId uint, postId uint, likes []models.Like) bool
- func HashCheck(password, hash string) bool
- func HashMake(password string) string
- func IsFollowRequested(userId uint, by uint) bool
- func IsFollowed(userId uint, by uint) bool
- func IsFollower(userId uint, by uint) bool
- func LikeCount(postId uint) int64
- func LikedPosts(userId uint, postIds []uint) []models.Like
- func MakeAccessToken(c *fiber.Ctx, user *models.User) error
- func MakeCode() string
- func MakePostsResponse(c *fiber.Ctx, posts []models.Post) error
- func MakeToken() string
- func MakeUsersResponse(c *fiber.Ctx, users []models.User) error
- func PostCount(userId uint) int64
- func PostLikes(postId uint, postLikeCounts []PostLikeCount) uint
- func ProcessNotificationResponse(c *fiber.Ctx, notifications []models.Notification) []resources.NotificationResource
- func ProcessPostsResponse(c *fiber.Ctx, posts []models.Post) []resources.PostResource
- func ProcessProfileResponse(user models.User) resources.ProfileResource
- func ProcessUsersResponse(c *fiber.Ctx, users []models.User) []resources.UserResource
- func RandString(n int) string
- func RandStringCharset(charset string, n int) string
- func SendPasswordResetCode(email string, name string, code string)
- func TotalPostCount() int64
- func TotalUserCount() int64
- func UserFollowers(userId uint) []models.User
- func UserFollowing(userId uint) []models.User
- func UserPosts(userId uint) []models.Post
- type PostLikeCount
Constants ¶
View Source
const ItemsPerPage = 30
Variables ¶
This section is empty.
Functions ¶
func FollowerCount ¶
func FollowingCount ¶
func IsFollowRequested ¶
func IsFollowed ¶
func IsFollower ¶
func MakeAccessToken ¶
func MakePostsResponse ¶
func MakeUsersResponse ¶
func PostLikes ¶
func PostLikes(postId uint, postLikeCounts []PostLikeCount) uint
func ProcessNotificationResponse ¶
func ProcessNotificationResponse(c *fiber.Ctx, notifications []models.Notification) []resources.NotificationResource
func ProcessPostsResponse ¶
func ProcessPostsResponse(c *fiber.Ctx, posts []models.Post) []resources.PostResource
func ProcessProfileResponse ¶
func ProcessProfileResponse(user models.User) resources.ProfileResource
func ProcessUsersResponse ¶
func ProcessUsersResponse(c *fiber.Ctx, users []models.User) []resources.UserResource
func RandString ¶
func RandStringCharset ¶
func SendPasswordResetCode ¶
func TotalPostCount ¶
func TotalPostCount() int64
func TotalUserCount ¶
func TotalUserCount() int64
func UserFollowers ¶
func UserFollowing ¶
Types ¶
type PostLikeCount ¶
func LikeCounts ¶
func LikeCounts(postIds []uint) []PostLikeCount
Click to show internal directories.
Click to hide internal directories.