message

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Copyright 2019 Axetroy. All rights reserved. MIT license.

Copyright 2019 Axetroy. All rights reserved. MIT license.

Copyright 2019 Axetroy. All rights reserved. MIT license.

Copyright 2019 Axetroy. All rights reserved. MIT license.

Copyright 2019 Axetroy. All rights reserved. MIT license.

Copyright 2019 Axetroy. All rights reserved. MIT license.

Copyright 2019 Axetroy. All rights reserved. MIT license.

Index

Constants

This section is empty.

Variables

View Source
var (
	ParamsIdName = "message_id"
)

Functions

func Create

func Create(context controller.Context, input CreateMessageParams) (res schema.Response)

func CreateRouter

func CreateRouter(context *gin.Context)

func DeleteByAdmin

func DeleteByAdmin(context controller.Context, messageId string) (res schema.Response)

func DeleteByAdminRouter

func DeleteByAdminRouter(context *gin.Context)

func DeleteByUser

func DeleteByUser(context controller.Context, messageId string) (res schema.Response)

func DeleteByUserRouter

func DeleteByUserRouter(context *gin.Context)

func DeleteMessageById

func DeleteMessageById(id string)

func Get

func Get(context controller.Context, id string) (res schema.Response)

Get Message detail

func GetAdminRouter

func GetAdminRouter(context *gin.Context)

管理员获取个人消息详情

func GetByAdmin

func GetByAdmin(context controller.Context, id string) (res schema.Response)

Get Message detail

func GetMessageListByAdmin

func GetMessageListByAdmin(context controller.Context, input QueryAdmin) (res schema.List)

用户获取自己的消息列表

func GetMessageListByAdminRouter

func GetMessageListByAdminRouter(context *gin.Context)

func GetMessageListByUser

func GetMessageListByUser(context controller.Context, input Query) (res schema.List)

用户获取自己的消息列表

func GetMessageListByUserRouter

func GetMessageListByUserRouter(context *gin.Context)

func GetRouter

func GetRouter(context *gin.Context)

GetRouter get Message detail router

func MarkRead

func MarkRead(context controller.Context, id string) (res schema.Response)

func ReadRouter

func ReadRouter(context *gin.Context)

func Update

func Update(context controller.Context, messageId string, input UpdateParams) (res schema.Response)

func UpdateRouter

func UpdateRouter(context *gin.Context)

Types

type CreateMessageParams

type CreateMessageParams struct {
	Uid     string `json:"uid" valid:"required~请添加用户ID"`
	Title   string `json:"title" valid:"required~请填写消息标题"`
	Content string `json:"content" valid:"required~请填写消息内容"`
}

type Query

type Query struct {
	schema.Query
	Status *model.MessageStatus `json:"status" form:"status"`
	Read   *bool                `json:"read" form:"read"`
}

type QueryAdmin

type QueryAdmin struct {
	Query
	Uid *string `json:"uid" form:"uid"` // 指定某个用户ID
}

type UpdateParams

type UpdateParams struct {
	Title   *string `json:"title"`   // 消息标题
	Content *string `json:"content"` // 消息内容
}

Jump to

Keyboard shortcuts

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