notify

package
v0.0.0-...-31439ab Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateNotify

func CreateNotify(svc *svc.Svc) gin.HandlerFunc

func DeleteNotify

func DeleteNotify(svc *svc.Svc) gin.HandlerFunc

func GetNotifyList

func GetNotifyList(svc *svc.Svc) gin.HandlerFunc

func List

func List(svc *svc.Svc) gin.HandlerFunc

func NotifyDetail

func NotifyDetail(svc *svc.Svc) gin.HandlerFunc

func UpdateNotify

func UpdateNotify(svc *svc.Svc) gin.HandlerFunc

Types

type CreateNotifyReq

type CreateNotifyReq struct {
	Title   string `json:"title" binding:"required,max=100"` // 标题
	Short   string `json:"short" binding:"max=50"`           // 简短
	Type    string `json:"type"`                             // 通知类型
	Top     bool   `json:"top"`                              // 是否置顶
	Fixed   bool   `json:"fixed"`                            // 是否侧边
	Content string `json:"content"`                          // markdown
	Remark  string `json:"remark"`                           // 备注
}

type DeleteNotifyReq

type DeleteNotifyReq struct {
	NotifyId uint `uri:"notifyId"`
}

type GetNotifyListResp

type GetNotifyListResp struct {
	Tops    []post.Notification `json:"Tops"`
	Results []post.Notification `json:"Results"`
}

type NotifyDetailReq

type NotifyDetailReq struct {
	NotifyId uint `uri:"notifyId"`
}

type UpdateNotifyReq

type UpdateNotifyReq struct {
	NotifyId uint   `uri:"notifyId"`
	Type     string `json:"type"`                             // 通知类型
	Title    string `json:"title" binding:"required,max=100"` // 标题
	Short    string `json:"short" binding:"max=50"`           // 简短
	Top      bool   `json:"top"`                              // 是否置顶
	Fixed    bool   `json:"fixed"`                            // 是否侧边
	Content  string `json:"content" binding:"required"`       // markdown
	Remark   string `json:"remark"`                           // 备注
}

Jump to

Keyboard shortcuts

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