handlers

package
v0.0.0-...-58afb8c Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const UpdateAllType = 0
View Source
const UpdateGeneralType = 1
View Source
const UpdateSocialInfoType = 2

Variables

View Source
var NotFoundHTTPStatusError = errors.New("NotFoundHTTPStatusError")

Functions

func CreateDtoProfileHandle

func CreateDtoProfileHandle(c *fiber.Ctx) error

CreateProfileHandle handle create a new profile

func DispatchProfilesHandle

func DispatchProfilesHandle(c *fiber.Ctx) error

DispatchProfilesHandle a function invocation to read authed user profile

func GetActionAccessKey

func GetActionAccessKey(userInfoInReq *UserInfoInReq) (*models.ActionAccessKeyModel, error)

GetActionAccessKey get action access key

func GetActionAccessKeyAsync

func GetActionAccessKeyAsync(userInfoInReq *UserInfoInReq) <-chan GetActionAccessKeyResultAsync

GetActionAccessKeyAsync get action access key async (async call to get action access key) and return a channel to receive the result

func GetBySocialName

func GetBySocialName(c *fiber.Ctx) error

GetBySocialName get user profile by social name

func GetProfileByIds

func GetProfileByIds(c *fiber.Ctx) error

GetProfileByIds a function invocation to profiles by ids

func IncreaseFollowCount

func IncreaseFollowCount(c *fiber.Ctx) error

IncreaseFollowCount a function invocation

func IncreaseFollowerCount

func IncreaseFollowerCount(c *fiber.Ctx) error

IncreaseFollowerCount a function invocation

func InitProfileIndexHandle

func InitProfileIndexHandle(c *fiber.Ctx) error

InitProfileIndexHandle handle create a new index

func QueryUserProfileHandle

func QueryUserProfileHandle(c *fiber.Ctx) error

QueryUserProfileHandle handle queru on userProfile

func ReadDtoProfileHandle

func ReadDtoProfileHandle(c *fiber.Ctx) error

ReadDtoProfileHandle a function invocation

func ReadMyProfileHandle

func ReadMyProfileHandle(c *fiber.Ctx) error

ReadMyProfileHandle a function invocation to read authed user profile

func ReadProfileHandle

func ReadProfileHandle(c *fiber.Ctx) error

ReadProfileHandle a function invocation

func UpdateLastSeen

func UpdateLastSeen(c *fiber.Ctx) error

UpdateLastSeen a function invocation

func UpdateProfileHandle

func UpdateProfileHandle(c *fiber.Ctx) error

UpdateProfileHandle a function invocation

Types

type Action

type Action struct {
	Type    string      `json:"type"`
	Payload interface{} `json:"payload"`
}

type GetActionAccessKeyResultAsync

type GetActionAccessKeyResultAsync struct {
	AccessKey string `json:"accessKey"`
	Error     error
}

type JWTCookie

type JWTCookie struct {
	Payload   string `json:"payload"`
	Signature string `json:"signature"`
	Header    string `json:"header"`
}

type MembersPayload

type MembersPayload struct {
	Users map[string]interface{} `json:"users"`
}

type UpdateProfileQueryModel

type UpdateProfileQueryModel struct {
	UpdateType int `query:"updateType"`
}

type UserInfoInReq

type UserInfoInReq struct {
	UserId      uuid.UUID `json:"userId"`
	Username    string    `json:"username"`
	Avatar      string    `json:"avatar"`
	DisplayName string    `json:"displayName"`
	SystemRole  string    `json:"systemRole"`
}

type UserProfileQueryModel

type UserProfileQueryModel struct {
	Search     string      `query:"search"`
	Page       int64       `query:"page"`
	NotInclude []uuid.UUID `query:"nin"`
}

Jump to

Keyboard shortcuts

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