Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetStreamIDs ¶
func GetStreamIDs(streams []StreamInterface) []int64
Types ¶
type Stream ¶
Stream contains info required by twitter client to retrieve data from Twitter Streaming API and to store stream into the database
func (*Stream) GetCreatedAt ¶
GetTrack returns the stream's track
type StreamInterface ¶
type StreamInterface interface { GetID() int64 GetTopicID() int64 GetTrack() string GetCreatedAt() time.Time }
StreamInterface describes entity Stream
func NewStreams ¶
func NewStreams(tracks []string) []StreamInterface
func StreamsMapToSlice ¶
func StreamsMapToSlice(streamsMap map[int64]StreamInterface) []StreamInterface
type Topic ¶
Topic is a basic structure implementing TopicInterface
func (*Topic) GetCreatedAt ¶
GetCreatedAt returns twit's full text
type TopicInterface ¶
type TopicInterface interface { GetID() int64 GetUserID() int64 GetName() string GetCreatedAt() time.Time GetIsActive() bool }
TopicInterface defines methods implemented by the platform's entity topic.
type Tweet ¶
type Tweet struct { ID int64 TwitterID int64 TwitterUserID int64 TwitterUsername string FullText string CreatedAt time.Time }
Tweet is a basic structure implementing TweetInterface
func (*Tweet) GetCreatedAt ¶
GetCreatedAt returns the user id from twitter
func (*Tweet) GetFullText ¶
GetFullText returns twit's full text
func (*Tweet) GetTwitterID ¶
GetTwitterID returns the tweet id from twitter
func (*Tweet) GetTwitterUserID ¶
GetTwitterUserID returns the user id from twitter
func (*Tweet) GetTwitterUsername ¶
GetTwitterUserID returns the user id from twitter
type TweetInterface ¶
type TweetInterface interface { GetID() int64 GetTwitterID() int64 GetTwitterUserID() int64 GetTwitterUsername() string GetFullText() string GetCreatedAt() time.Time }
TweetInterface defines methods implemented by the platform's entity twit.
type TweetStreamsInterface ¶
type TweetStreamsInterface interface { GetTweet() TweetInterface GetStreams() []StreamInterface }
func NewTweetStreams ¶
func NewTweetStreams(tweet TweetInterface, streams []StreamInterface) TweetStreamsInterface