dao

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package dao implements the Twitter database

Index

Constants

View Source
const (
	DBName = "twitter"
)

Variables

This section is empty.

Functions

func Initialize

func Initialize(ctx context.Context)

Types

type Search interface {
	SearchByText(text string) (tweetIDs []string, err error)
}

func NewSQLSearch

func NewSQLSearch(db *gorm.DB) Search

type Tweets

type Tweets struct {
	mongo.DB
}
var (
	InstanceTweets *Tweets
)

func NewTweets

func NewTweets(db mongo.DB) *Tweets

func (*Tweets) GetTweetCol

func (d *Tweets) GetTweetCol() *mgo.Collection

func (*Tweets) GetUserCol

func (d *Tweets) GetUserCol() *mgo.Collection

func (*Tweets) SearchByText

func (d *Tweets) SearchByText(text string) (tweetIDs []string, err error)

Jump to

Keyboard shortcuts

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