sql

package
v0.0.0-...-01a26c0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package sql holds the SQL storage implementations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBlogRepository

func NewBlogRepository(conn string) blog.Repository

NewBlogRepository returns a new instance of a blog repository

func NewPostRepository

func NewPostRepository(conn string) post.Repository

NewPostRepository returns a new instance of a post repository

Types

type BlogRow

type BlogRow struct {
	BID      int    `db:"bid"`
	BlogName string `db:"blogName"`
	BlogURL  string `db:"blogURL"`
	BlogRSS  string `db:"blogRSS"`
}

BlogRow holds the blog details in the db

type PostRow

type PostRow struct {
	PostID          int     `db:"postID"`
	BlogID          int     `db:"blogID"`
	Title           string  `db:"title"`
	PostContent     string  `db:"postContent"`
	Link            string  `db:"link"`
	ServerTimestamp int64   `db:"serverTimestamp"`
	APITimestamp    int64   `db:"api_ts"`
	Language        string  `db:"language"`
	FBCount         int64   `db:"fbCount"`
	PostBuzz        float32 `db:"postBuzz"`
	Trend           float32 `db:"trend"`
}

PostRow holds the post data in the db

Jump to

Keyboard shortcuts

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