Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Information ¶
type Information struct { Id_ string `bson:"_id"` Nickname string `bson:"nick_name"` Gender string `bson:"gender"` Province string `bson:"province"` City string `bson:"city"` BriefIntroduction string `bson:"brief_introduction"` Birthday string `bson:"birthday"` TweetsNum int32 `bson:"tweets_num"` FollowsNum int32 `bson:"follows_num"` FansNum int32 `bson:"fans_num"` SexOrientation string `bson:"sex_orientation"` Sentiment string `bson:"sentiment"` VipLevel string `bson:"vip_level"` Authentication string `bson:"authentication"` Labels string `bson:"labels"` CrawlTime int32 `bson:"crawl_time"` }
type Interface ¶
type Interface interface { GetCollection(databases, collection string) (*mongo.Collection, error) Close() error }
func NewMongoDBImpl ¶
NewMongoDBImpl initialize a MongoDB connection.
type MongoImpl ¶
type MongoImpl struct {
// contains filtered or unexported fields
}
func (*MongoImpl) GetCollection ¶
func (m *MongoImpl) GetCollection(databases, collection string) (*mongo.Collection, error)
type Relationships ¶
type Tweets ¶
type Tweets struct { Id_ string `bson:"_id"` WeiboUrl string `bson:"weibo_url"` CreatedAt string `bson:"created_at"` LikeNum int32 `bson:"like_num"` RepostNum int32 `bson:"repost_num"` CommentNum int32 `bson:"comment_num"` Content string `bson:"content"` UserId string `bson:"user_id"` Tool string `bson:"tool"` ImageUrl string `bson:"image_url"` VideoUrl string `bson:"video_url"` OriginWeibo string `bson:"origin_weibo"` LocationMapInfo string `bson:"location_map_info"` CrawlTime int32 `bson:"crawl_time"` }
Click to show internal directories.
Click to hide internal directories.