news

package
v0.0.0-...-f63a64a Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddNews

func AddNews(news []interface{})

func CollectNews

func CollectNews(day string)

Types

type News

type News struct {
	Id        string `json:"_id,omitempty" bson:"_id,omitempty"`
	Title     string `json:"title" bson:"title"`
	News      string `json:"news_text" bson:"news_text"`
	Url       string `json:"site_url" bson:"site_ur"`
	Image     string `json:"image_url" bson:"image_url"`
	NewsShort string `json:"news_summary_short" bson:"news_summary_short"`
	NewsLong  string `json:"news_summary_long" bson:"news_summary_long"`
	Time      string `json:"timestamp" bson:"timestamp"`
}

func GetNews

func GetNews() []News

func GetOneNews

func GetOneNews(id string) News

func (*News) Add

func (n *News) Add() error

func (*News) Remove

func (n *News) Remove() error

Jump to

Keyboard shortcuts

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