news

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: MIT Imports: 12 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(context controller.Context, input CreateNewParams) (res schema.Response)

func CreateRouter

func CreateRouter(context *gin.Context)

func Delete

func Delete(context controller.Context, addressId string) (res schema.Response)

func DeleteNewsById

func DeleteNewsById(id string)

func DeleteRouter

func DeleteRouter(context *gin.Context)

func GetNews

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

func GetNewsListByUser

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

func GetNewsListByUserRouter

func GetNewsListByUserRouter(context *gin.Context)

func GetNewsRouter

func GetNewsRouter(context *gin.Context)

func Update

func Update(context controller.Context, newsId string, input UpdateParams) (res schema.Response)

func UpdateRouter

func UpdateRouter(context *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