banner

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

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 GetBannerListRouter = router.Handler(func(c router.Context) {
	var (
		query Query
	)

	c.ResponseFunc(c.ShouldBindQuery(&query), func() schema.Response {
		return GetBannerList(helper.NewContext(&c), query)
	})
})
View Source
var GetBannerRouter = router.Handler(func(c router.Context) {
	id := c.Param("banner_id")

	c.ResponseFunc(nil, func() schema.Response {
		return GetBanner(id)
	})
})

Functions

func GetBanner

func GetBanner(id string) (res schema.Response)

func GetBannerList

func GetBannerList(c helper.Context, query Query) (res schema.Response)

Types

type Query

type Query struct {
	schema.Query
	Platform *model.BannerPlatform `json:"platform" url:"platform" validate:"omitempty,oneof=pc app" comment:"平台"` // 根据平台筛选
	Active   *bool                 `json:"active" url:"active" validate:"omitempty" comment:"是否激活"`                // 是否激活
}

Jump to

Keyboard shortcuts

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