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.
Index ¶
- func Create(context controller.Context, input CreateParams) (res schema.Response)
- func CreateRouter(context *gin.Context)
- func Delete(context controller.Context, addressId string) (res schema.Response)
- func DeleteBannerById(id string)
- func DeleteRouter(context *gin.Context)
- func GetBanner(id string) (res schema.Response)
- func GetBannerList(context controller.Context, q Query) (res schema.List)
- func GetBannerListRouter(context *gin.Context)
- func GetBannerRouter(context *gin.Context)
- func Update(context controller.Context, bannerId string, input UpdateParams) (res schema.Response)
- func UpdateRouter(context *gin.Context)
- type CreateParams
- type Query
- type UpdateParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(context controller.Context, input CreateParams) (res schema.Response)
func CreateRouter ¶
func DeleteBannerById ¶
func DeleteBannerById(id string)
func DeleteRouter ¶
func GetBannerList ¶
func GetBannerList(context controller.Context, q Query) (res schema.List)
func GetBannerListRouter ¶
func GetBannerRouter ¶
func Update ¶
func Update(context controller.Context, bannerId string, input UpdateParams) (res schema.Response)
func UpdateRouter ¶
Types ¶
type CreateParams ¶
type CreateParams struct {
Image string `json:"image" valid:"required~请填写图片URL"` // 图片 URL
Href string `json:"href" valid:"required~请填写图片跳转链接"` // 图片跳转的 URL
Platform model.BannerPlatform `json:"platform" valid:"required~请选择平台"` // 用于哪个平台, web/app
Description *string `json:"description"` // Banner 描述
Priority *int `json:"priority"` // 优先级,用于排序
Identifier *string `json:"identifier"` // APP 跳转标识符
FallbackUrl *string `json:"fallback_url"` // APP 跳转标识符的备选方案
}
type Query ¶
type Query struct {
schema.Query
Platform *model.BannerPlatform `json:"platform" form:"platform"` // 根据平台筛选
Active *bool `json:"active" form:"active"` // 是否激活
}
type UpdateParams ¶
type UpdateParams struct {
Image *string `json:"image"` // 图片 URL
Href *string `json:"href"` // 图片跳转的 URL
Platform *model.BannerPlatform `json:"platform"` // 用于哪个平台, web/app
Description *string `json:"description"` // Banner 描述
Priority *int `json:"priority"` // 优先级,用于排序
Identifier *string `json:"identifier"` // APP 跳转标识符
FallbackUrl *string `json:"fallback_url"` // APP 跳转标识符的备选方案
}
Click to show internal directories.
Click to hide internal directories.