payload

package
v0.0.0-...-a54da22 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	USER_MAPPER_ALIAS           = "user"
	PROJECT_MAPPER_ALIAS        = "project"
	TASK_MAPPER_ALIAS           = "task"
	TAG_MAPPER_ALIAS            = "tag"
	PROJECT_DETAIL_MAPPER_ALIAS = "project_detail"
)

Variables

This section is empty.

Functions

func MapEntityToData

func MapEntityToData(alias string, from interface{}) (data interface{}, err error)

func ResponseFailed

func ResponseFailed(message string) map[string]interface{}

func ResponseFailedWithData

func ResponseFailedWithData(message string, data interface{}) map[string]interface{}

func ResponseSuccessWithoutData

func ResponseSuccessWithoutData(message string) map[string]interface{}

Types

type AuthModel

type AuthModel struct {
	UserID    uint   `json:"user_id" example:"1"`
	Email     string `json:"email" example:"foo@bar.com"`
	Payload   string `json:"payload" example:"Bearer"`
	TokenType string `json:"token_type" example:"aa3f97cec3f342bc9b11e0592bbce319"`

} //@name AuthModel

type CreateUserPayload

type CreateUserPayload struct {
	Email    string `json:"email" example:"Mariah.Mante1@example.com" form:"email"`
	Name     string `json:"name" example:"Mariah Mante" form:"name"`
	Password string `json:"password" example:"secret" form:"password"`

} //@name CreateUserPayload

type DeleteUserPayload

type DeleteUserPayload struct {
	UserID uint `json:"user_id" example:"1" form:"user_id"`

} //@name DeleteUserPayload

type GetUserPayload

type GetUserPayload struct {
	UserID uint `json:"user_id" example:"1" form:"user_id"`

} //@name GetUserPayload

type JWTClaimResult

type JWTClaimResult struct {
	Expired   time.Time
	AuthToken string
}

type JWTCustomClaims

type JWTCustomClaims struct {
	Email string `json:"email"`
	Admin bool   `json:"admin"`
	jwt.StandardClaims
}

type LoginPayload

type LoginPayload struct {
	Email    string `json:"email" example:"foo@bar.com" form:"email"`
	Password string `json:"password" example:"secret" form:"password"`

} // @name LoginPayload

type LogoutModel

type LogoutModel struct {
	IsLogout bool `json:"is_logout" example:"true"`

} //@name LogoutModel

type LogoutPayload

type LogoutPayload struct {
	AccessToken string `json:"access_token" example:"aa3f97cec3f342bc9b11e0592bbce319" form:"access_token"`

} //@name LogoutPayload

type ProjectCreatePayload

type ProjectCreatePayload struct {
	Name    string `json:"name" example:"Lorem ipsum dolor sit amet" form:"title"`
	OwnerID uint   `json:"owner_id" example:"1" form:"owner_id"`

} //@name ProjectPayload

type ProjectDeletePayload

type ProjectDeletePayload struct {
	ProjectID uint `json:"project_id" example:"1" form:"project_id"`
	OwnerID   uint `json:"owner_id" example:"1" form:"owner_id"`

} //@name ProjectPayload

type ProjectDetailModel

type ProjectDetailModel struct {
	ProjectID uint   `json:"project_id" example:"1"`
	Name      string `json:"name" example:"Lorem ipsum dolor sit amet"`
	Tasks     []TaskModel

} //@name ProjectDetailModel

type ProjectGetAllPayload

type ProjectGetAllPayload struct {
	OwnerID uint `json:"owner_id" example:"1" form:"owner_id"`

} //@name ProjectPayload

type ProjectGetPayload

type ProjectGetPayload struct {
	ProjectID uint `json:"project_id" example:"1" form:"project_id"`
	OwnerID   uint `json:"owner_id" example:"1" form:"owner_id"`

} //@name ProjectPayload

type ProjectModel

type ProjectModel struct {
	ProjectID uint   `json:"project_id" example:"1"`
	Name      string `json:"name" example:"Lorem ipsum dolor sit amet"`
}

type ProjectUpdatePayload

type ProjectUpdatePayload struct {
	ProjectID uint   `json:"project_id" example:"1" form:"project_id"`
	Name      string `json:"name" example:"Lorem ipsum dolor sit amet" form:"title"`
	OwnerID   uint   `json:"owner_id" example:"1" form:"owner_id"`

} //@name ProjectPayload

type RegisterPayload

type RegisterPayload struct {
	Email    string `json:"email" example:"foo@bar.com" form:"email"`
	Name     string `json:"name" example:"John Doe" form:"name"`
	Password string `json:"password" example:"secret" form:"password"`

} //@name RegisterPayload

type ResponseFailedBody

type ResponseFailedBody struct {
	Status  string `json:"status" example:"failed"`
	Message string `json:"message" example:"failed"`
	Data    string `json:"data"`

} //@name ResponseFailed

type ResponseSuccessBody

type ResponseSuccessBody struct {
	Status  string      `json:"status" example:"success"`
	Message string      `json:"message" example:"success"`
	Data    interface{} `json:"data"`

} //@name ResponseSuccess

func ResponseSuccess

func ResponseSuccess(message string, data interface{}) ResponseSuccessBody

type ResponseSuccessWithoutDataBody

type ResponseSuccessWithoutDataBody struct {
	Status  string `json:"status" example:"success"`
	Message string `json:"message" example:"success"`

} //@name ResponseSuccessWithoutData

type TagCreatePayload

type TagCreatePayload struct {
	Name    string `json:"name" example:"Lorem ipsum dolor sit amet" form:"title"`
	OwnerID uint   `json:"owner_id" example:"1" form:"owner_id"`

} //@name TagPayload

type TagDeletePayload

type TagDeletePayload struct {
	TagID   uint `json:"tag_id" example:"1" form:"tag_id"`
	OwnerID uint `json:"owner_id" example:"1" form:"owner_id"`

} //@name TagPayload

type TagGetPayload

type TagGetPayload struct {
	TagID   uint `json:"tag_id" example:"1" form:"tag_id"`
	OwnerID uint `json:"owner_id" example:"1" form:"owner_id"`

} //@name TagPayload

type TagUpdatePayload

type TagUpdatePayload struct {
	TagID   uint   `json:"tag_id" example:"1" form:"tag_id"`
	Name    string `json:"name" example:"Lorem ipsum dolor sit amet" form:"title"`
	OwnerID uint   `json:"owner_id" example:"1" form:"owner_id"`

} //@name TagPayload

type TaskCreatePayload

type TaskCreatePayload struct {
	Name      string `json:"name" example:"Lorem ipsum dolor sit amet" form:"title"`
	Priority  int    `json:"priority" example:"1" form:"priority"`
	ProjectID uint   `json:"project_id" example:"1" form:"project_id"`
	OwnerID   uint   `json:"owner_id" example:"1" form:"owner_id"`

} //@name TaskPayload

type TaskDeletePayload

type TaskDeletePayload struct {
	TaskID  uint `json:"task_id" example:"1" form:"task_id"`
	OwnerID uint `json:"owner_id" example:"1" form:"owner_id"`

} //@name TaskPayload

type TaskGetPayload

type TaskGetPayload struct {
	TaskID  uint `json:"task_id" example:"1" form:"task_id"`
	OwnerID uint `json:"owner_id" example:"1" form:"owner_id"`

} //@name TaskPayload

type TaskModel

type TaskModel struct {
	TaskID    uint     `json:"task_id" example:"1"`
	Name      string   `json:"name" example:"Lorem ipsum dolor sit amet"`
	Priority  int      `json:"priority" example:"1"`
	Completed bool     `json:"completed" example:"false"`
	Tags      []string `json:"tags" example:"[\"foo\",\"bar\"]"`

} //@name TaskModel

type TaskQueryPayload

type TaskQueryPayload struct {
	Name             string `json:"name" example:"Lorem ipsum dolor sit amet" form:"title"`
	IncludeCompleted bool   `json:"include_completed" example:"true" form:"include_completed"`
	OwnerID          uint   `json:"owner_id" example:"1" form:"owner_id"`

} //@name TaskQueryPayload

type TaskStatePayload

type TaskStatePayload struct {
	TaskID  uint `json:"task_id" example:"1" form:"task_id"`
	Closed  bool `json:"closed" example:"true" form:"closed"`
	OwnerID uint `json:"owner_id" example:"1" form:"owner_id"`

} //@name TaskPayload

type TaskUpdatePayload

type TaskUpdatePayload struct {
	TaskID    uint      `json:"task_id" example:"1" form:"task_id"`
	Name      string    `json:"name" example:"Lorem ipsum dolor sit amet" form:"title"`
	Priority  int       `json:"priority" example:"1" form:"priority"`
	ProjectID uint      `json:"project_id" example:"1" form:"project_id"`
	OwnerID   uint      `json:"owner_id" example:"1" form:"owner_id"`
	ClosedAt  time.Time `json:"closed_at" example:"2020-01-01T00:00:00Z" form:"closed_at"`

} //@name TaskPayload

type UpdateUserPayload

type UpdateUserPayload struct {
	Email    string `json:"email" example:"Kaleigh_Price@example.org" form:"email"`
	Name     string `json:"name" example:"Kaleigh Price" form:"name"`
	Password string `json:"password" example:"secret" form:"password"`

} //@name UpdateUserPayload

type UserModel

type UserModel struct {
	UserID uint   `json:"user_id" example:"1"`
	Email  string `json:"email" example:"Wava92@example.org"`
	Name   string `json:"name" example:"Wava"`

} //@name UserModel

Jump to

Keyboard shortcuts

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