db

package
v0.0.0-...-c2fcb06 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2015 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AlreadyFollow

func AlreadyFollow(userId int64) (bool, error)

func GetNumberOfTweetsBetweenDates

func GetNumberOfTweetsBetweenDates(from time.Time, to time.Time) (int, error)

func HasAlreadyFav

func HasAlreadyFav(tweetId int64) (bool, error)

func HasAlreadyReplied

func HasAlreadyReplied(tweetId int64) (bool, error)

func HasTweetWithContent

func HasTweetWithContent(content string) (bool, error)

func Init

func Init(user string, pass string, schema string) (*sql.DB, error)

Types

type Favorite

type Favorite struct {
	UserId     int64
	UserName   string
	TweetId    int64
	Status     string
	FavDate    time.Time
	UnfavDate  time.Time
	LastAction time.Time
	// contains filtered or unexported fields
}

func GetNotUnfavorite

func GetNotUnfavorite(maxFavDate time.Time, limit int) ([]Favorite, error)

func (Favorite) Persist

func (fav Favorite) Persist() error

type Follow

type Follow struct {
	UserId       int64
	UserName     string
	TweetId      int64
	Status       string
	FollowDate   time.Time
	UnfollowDate time.Time
	LastAction   time.Time
	// contains filtered or unexported fields
}

func GetNotUnfollowed

func GetNotUnfollowed(maxFollowDate time.Time, limit int) ([]Follow, error)

func (Follow) Persist

func (follow Follow) Persist() error

type Reply

type Reply struct {
	UserId    int64
	UserName  string
	TweetId   int64
	Status    string
	Answer    string
	ReplyDate time.Time
	// contains filtered or unexported fields
}

func (Reply) Persist

func (reply Reply) Persist() error

type Tweet

type Tweet struct {
	Content string
	Date    time.Time
	// contains filtered or unexported fields
}

func (Tweet) Persist

func (tweet Tweet) Persist() error

Jump to

Keyboard shortcuts

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