twitter

package
v0.0.0-...-f14b2f1 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const TWEETS_COLLECTION = "tweets"

Variables

This section is empty.

Functions

This section is empty.

Types

type Meta

type Meta struct {
	ResultCount int    `json:"result_count"`
	NextToken   string `json:"next_token"`
}

type MongoTweetCollection

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

func (*MongoTweetCollection) Count

func (u *MongoTweetCollection) Count() (int64, error)

func (*MongoTweetCollection) FindAll

func (u *MongoTweetCollection) FindAll() (*[]Tweet, error)

type Tweet

type Tweet struct {
	ID        string    `json:"id" bson:"_id,omitempty"`
	CreatedAt time.Time `json:"created_at"`
	Text      string    `json:"text"`
}

type TweetSentment

type TweetSentment struct {
	Tweet Tweet `json:"tweet"`
	Score int8  `json:"score"`
}

type TweetsRepository

type TweetsRepository interface {
	Count() (int64, error)
	FindAll() ([]*Tweet, error)
	Creat(tweet *Tweet) error
	FindById(id primitive.ObjectID) (*Tweet, error)
}

Jump to

Keyboard shortcuts

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