notification

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 License: MIT Imports: 11 Imported by: 0

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.

Index

Constants

This section is empty.

Variables

View Source
var GetNotificationListByUserRouter = router.Handler(func(c router.Context) {
	var input Query

	c.ResponseFunc(c.ShouldBindQuery(&input), func() schema.Response {
		return GetNotificationListByUser(helper.NewContext(&c), input)
	})
})

GetListRouter get list router

View Source
var GetRouter = router.Handler(func(c router.Context) {
	id := c.Param("id")

	c.ResponseFunc(nil, func() schema.Response {
		return Get(helper.NewContext(&c), id)
	})
})

GetRouter get notification detail router

View Source
var ReadRouter = router.Handler(func(c router.Context) {
	notificationID := c.Param("id")

	c.ResponseFunc(nil, func() schema.Response {
		return MarkRead(helper.NewContext(&c), notificationID)
	})
})

ReadRouter read this notification router

Functions

func Get

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

Get notification detail

func GetNotificationListByUser

func GetNotificationListByUser(c helper.Context, input Query) (res schema.Response)

GetList get notification list

func MarkRead

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

MarkRead mark notification as read

Types

type Query

type Query struct {
	schema.Query
}

Query params

Jump to

Keyboard shortcuts

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