dao

package
v0.0.0-...-8f28ad5 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2025 License: MIT Imports: 11 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(ctx context.Context, 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() *mongoLib.Collection

func (*Tweets) GetUserCol

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

func (*Tweets) SearchByText

func (d *Tweets) SearchByText(ctx context.Context, text string) (tweetIDs []string, err error)

Jump to

Keyboard shortcuts

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