Documentation
¶
Index ¶
- Constants
- type Blog
- type BlogPage
- type BlogPost
- type BlogStasher
- func (m *BlogStasher) GetPageListEtag(ctx context.Context, blogId string) (etag *string)
- func (m *BlogStasher) GetPostListEtag(ctx context.Context, blogId string) (etag *string)
- func (m *BlogStasher) HasPage(ctx context.Context, pageId string, etag string) bool
- func (m *BlogStasher) HasPost(ctx context.Context, postId string, etag string) bool
- func (m *BlogStasher) StashBlog(ctx context.Context, blog *blogger.Blog)
- func (m *BlogStasher) StashPage(ctx context.Context, page *blogger.Page)
- func (m *BlogStasher) StashPageEtags(ctx context.Context, blogId string, listEtag string, ...)
- func (m *BlogStasher) StashPost(ctx context.Context, post *blogger.Post)
- func (m *BlogStasher) StashPostEtags(ctx context.Context, blogId string, listEtag string, ...)
- type Tweet
- type TwitterStasher
- type TwitterUser
Constants ¶
View Source
const ( DefaultBlogPageCollection = "blog_page" DefaultBlogPostCollection = "blog_post" DefaultBlogCollection = "blog" DefaultTweetCollection = "tweet" DefaultTwitterUserCollection = "twitterer" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blog ¶
type Blog struct {
Id *bson.ObjectId `bson:"_id,omitempty" json:"id,omitempty"`
Blog *blogger.Blog `bson:"blog,omitempty" json:"blog"`
Updated *time.Time `bson:"updated,omitempty" json:"updated"`
PostListEtag *string `bson:"postListEtag,omitempty"`
PostListUpdated *time.Time `bson:"postListUpdated,omitempty"`
PageListEtag *string `bson:"pageListEtag,omitempty"`
PageListUpdated *time.Time `bson:"pageListUpdated,omitempty"`
}
type BlogPage ¶
type BlogPage struct {
Id *bson.ObjectId `bson:"_id,omitempty" json:"id,omitempty"`
BlogPage *blogger.Page `bson:"blogPage" json:"blogPage"`
Updated *time.Time `bson:"updated" json:"updated"`
}
func WrapBlogPage ¶
type BlogPost ¶
type BlogPost struct {
Id *bson.ObjectId `bson:"_id,omitempty" json:"id,omitempty"`
BlogPost *blogger.Post `bson:"blogPost" json:"blogPost"`
Updated *time.Time `bson:"updated" json:"updated"`
}
func WrapBlogPost ¶
type BlogStasher ¶
type BlogStasher struct {
BlogPageCollection *mgo.Collection
BlogPostCollection *mgo.Collection
BlogCollection *mgo.Collection
}
func DefaultBlogStasher ¶
func DefaultBlogStasher(db *mgo.Database) (m *BlogStasher)
func (*BlogStasher) GetPageListEtag ¶
func (m *BlogStasher) GetPageListEtag(ctx context.Context, blogId string) (etag *string)
func (*BlogStasher) GetPostListEtag ¶
func (m *BlogStasher) GetPostListEtag(ctx context.Context, blogId string) (etag *string)
func (*BlogStasher) StashBlog ¶
func (m *BlogStasher) StashBlog(ctx context.Context, blog *blogger.Blog)
func (*BlogStasher) StashPage ¶
func (m *BlogStasher) StashPage(ctx context.Context, page *blogger.Page)
func (*BlogStasher) StashPageEtags ¶
type TwitterStasher ¶
type TwitterStasher struct {
TweetCollection *mgo.Collection
TwitterUserCollection *mgo.Collection
}
func DefaultTwitterStasher ¶
func DefaultTwitterStasher(db *mgo.Database) (m *TwitterStasher)
func (*TwitterStasher) GetLastTweetId ¶
func (m *TwitterStasher) GetLastTweetId(ctx context.Context, userId int64) int64
func (*TwitterStasher) StashTweet ¶
func (m *TwitterStasher) StashTweet(ctx context.Context, tweet *twitter.Tweet, oembed *twitter.OEmbedTweet)
Click to show internal directories.
Click to hide internal directories.