news

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 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.

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

This section is empty.

Functions

func Create

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

func CreateRouter

func CreateRouter(c *gin.Context)

func Delete

func Delete(c helper.Context, addressId string) (res schema.Response)

func DeleteNewsById

func DeleteNewsById(id string)

func DeleteRouter

func DeleteRouter(c *gin.Context)

func GetNews

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

func GetNewsList

func GetNewsList(input Query) (res schema.List)

func GetNewsListRouter

func GetNewsListRouter(c *gin.Context)

func GetNewsRouter

func GetNewsRouter(c *gin.Context)

func Update

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

func UpdateRouter

func UpdateRouter(c *gin.Context)

Types

type CreateNewParams

type CreateNewParams struct {
	Title   string         `json:"title"`
	Content string         `json:"content"`
	Type    model.NewsType `json:"type"`
	Tags    []string       `json:"tags"`
}

type Query

type Query struct {
	schema.Query
	Status *model.NewsStatus `json:"status" form:"status"`
	Type   *model.NewsType   `json:"type" form:"type"`
}

type UpdateParams

type UpdateParams struct {
	Title   *string           `json:"title"`
	Content *string           `json:"content"`
	Type    *model.NewsType   `json:"type"`
	Tags    *[]string         `json:"tags"`
	Status  *model.NewsStatus `json:"status"`
}

Jump to

Keyboard shortcuts

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