v1

package
v0.0.0-...-51970bc Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteUserProfileResponse

type DeleteUserProfileResponse struct {
	Result string `json:"result"`
}

func DeleteUserProfile

func DeleteUserProfile(userId models.UserId) (DeleteUserProfileResponse, int, error)

type GetUserProfileResponse

type GetUserProfileResponse struct {
	FileName string `json:"file_name"`
	FileData string `json:"file_data"`
	FileType string `json:"file_type"`
}

func GetUserProfile

func GetUserProfile(userId models.UserId) (GetUserProfileResponse, int, error)

type LoginRequest

type LoginRequest struct {
	Email    string `json:"email" binding:"required,email"`
	Password string `json:"password" binding:"required"` // TODO sha265
}

type LoginResponse

type LoginResponse struct {
	Token string `json:"token"`
	Uid   string `json:"uid"`
}

func LoginUser

func LoginUser(data LoginRequest) (LoginResponse, int, error)

type RefreshRequest

type RefreshRequest struct {
	Token string `json:"token" binding:"required,jwt"`
	Id    string `json:"id" binding:"required"`
}

type RefreshResponse

type RefreshResponse struct {
	Token string `json:"token"`
}

func RefreshUserToken

func RefreshUserToken(data RefreshRequest) (RefreshResponse, int, error)

type RegisterRequest

type RegisterRequest struct {
	Email    string `json:"email" binding:"required,email"`
	Password string `json:"password" binding:"required"` // TODO add sha256
}

type RegisterResponse

type RegisterResponse struct {
	Result string `json:"result"`
}

func RegisterUser

func RegisterUser(data RegisterRequest) (RegisterResponse, int, error)

type SaveUserProfileResponse

type SaveUserProfileResponse struct {
	Result string `json:"result"`
}

func SaveUserProfile

func SaveUserProfile(userId models.UserId, formFile *multipart.FileHeader) (SaveUserProfileResponse, int, error)

Jump to

Keyboard shortcuts

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