storage

package
v0.0.0-...-ac65453 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindPublish

func FindPublish(s *Storage, colid string) (string, string, error)

func FindRSS

func FindRSS(s *Storage, colid string, link string, pubdate time.Time) (bool, error)

func FindTweet

func FindTweet(s *Storage, colid string, user string, id string) (bool, error)

func InsertPublish

func InsertPublish(s *Storage, colid string, desc string, imgpath string) error

func InsertRSS

func InsertRSS(s *Storage, colid string, title string, link string, desc string, pubdate time.Time) error

func InsertTweet

func InsertTweet(s *Storage, colid string, name string, user string, id string, link string, desc string, pubdate time.Time) error

func SetConfig

func SetConfig(dburl string, dbid string, dbuser string, dbpasswd string)

func TermInstance

func TermInstance()

Types

type PublishFields

type PublishFields struct {
	Description string    `json:"description"`
	ImagePath   string    `json:"imagepath"`
	CreatedAt   time.Time `json:"createdDate"`
}

type RssFields

type RssFields struct {
	Title       string    `json:"title"`
	Link        string    `json:"link"`
	Description string    `json:"description"`
	PublishedAt time.Time `json:"pubDate"`
	CreatedAt   time.Time `json:"createdDate"`
}

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

func GetInstance

func GetInstance() *Storage

type TweetFields

type TweetFields struct {
	Name        string    `json:"name"`
	User        string    `json:"user"`
	Id          string    `json:"id"`
	Link        string    `json:"link"`
	Description string    `json:"description"`
	PublishedAt time.Time `json:"pubDate"`
	CreatedAt   time.Time `json:"createdDate"`
}

Jump to

Keyboard shortcuts

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