message

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: MIT Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Index

Constants

This section is empty.

Variables

View Source
var (
	ParamsIdName = "message_id"
)

Functions

func Create

func Create(c helper.Context, input CreateMessageParams) (res schema.Response)

func CreateRouter

func CreateRouter(c *gin.Context)

func DeleteByAdmin

func DeleteByAdmin(c helper.Context, messageId string) (res schema.Response)

func DeleteByAdminRouter

func DeleteByAdminRouter(c *gin.Context)

func DeleteByUser

func DeleteByUser(c helper.Context, messageId string) (res schema.Response)

func DeleteByUserRouter

func DeleteByUserRouter(c *gin.Context)

func DeleteMessageById

func DeleteMessageById(id string)

func Get

func Get(c helper.Context, id string) (res schema.Response)

Get Message detail

func GetAdminRouter

func GetAdminRouter(c *gin.Context)

管理员获取个人消息详情

func GetByAdmin

func GetByAdmin(c helper.Context, id string) (res schema.Response)

Get Message detail

func GetMessageListByAdmin

func GetMessageListByAdmin(c helper.Context, input QueryAdmin) (res schema.List)

用户获取自己的消息列表

func GetMessageListByAdminRouter

func GetMessageListByAdminRouter(c *gin.Context)

func GetMessageListByUser

func GetMessageListByUser(c helper.Context, input Query) (res schema.List)

用户获取自己的消息列表

func GetMessageListByUserRouter

func GetMessageListByUserRouter(c *gin.Context)

func GetRouter

func GetRouter(c *gin.Context)

GetRouter get Message detail router

func MarkRead

func MarkRead(c helper.Context, id string) (res schema.Response)

func ReadRouter

func ReadRouter(c *gin.Context)

func Update

func Update(c helper.Context, messageId string, input UpdateParams) (res schema.Response)

func UpdateRouter

func UpdateRouter(c *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