Documentation ¶
Index ¶
- func CloseConnection()
- func GetConnection(ctx context.Context) *gorm.DB
- func GetReporterTopFollowersUserById(ctx context.Context, reporterId string) ([]map[string]interface{}, error)
- func GetReporterTweetsHour(ctx context.Context) (map[int]int, error)
- func GetReporterTweetsLanguagesCountries(ctx context.Context) (map[string]map[string]int, error)
- func Migrate() error
- type ReporterModel
- type TwitterTweetModel
- type TwitterUserModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseConnection ¶
func CloseConnection()
Types ¶
type ReporterModel ¶
type ReporterModel struct { Id string `gorm:"primary_key"` Tag string Tweets []TwitterTweetModel `gorm:"foreignkey:Reporter;association_foreignkey:Id"` }
func GetReporterById ¶
func GetReporterById(ctx context.Context, reporterId string) (ReporterModel, error)
func (ReporterModel) TableName ¶
func (ReporterModel) TableName() string
type TwitterTweetModel ¶
type TwitterTweetModel struct { Id float64 `gorm:"primary_key"` Reporter string TwitterUser float64 Text string Language string CreatedAt time.Time }
func GetTwitterTweets ¶
func (TwitterTweetModel) TableName ¶
func (TwitterTweetModel) TableName() string
type TwitterUserModel ¶
type TwitterUserModel struct { Id float64 `gorm:"primary_key"` Name string ScreenName string StatusesCount float64 FollowersCount float64 Location string Tweets []TwitterTweetModel `gorm:"foreignkey:TwitterUser;association_foreignkey:Id"` }
func (TwitterUserModel) TableName ¶
func (TwitterUserModel) TableName() string
Click to show internal directories.
Click to hide internal directories.