stasher

package
v0.0.0-...-4a2b322 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BloggerClient

func BloggerClient(ctx context.Context, credentials []byte) (*http.Client, error)

func DefaultBloggerClient

func DefaultBloggerClient(ctx context.Context) (*http.Client, error)

func SyncBlogger

func SyncBlogger(ctx context.Context, blogId string, stasher BloggerStasher, client *http.Client) (err error)

func SyncTwitter

func SyncTwitter(ctx context.Context, userId int64, stasher TwitterStasher, accessToken string) (err error)

Types

type BlogPageStasher

type BlogPageStasher interface {
	GetPageListEtag(ctx context.Context, blogId string) (etag *string)
	HasPage(ctx context.Context, pageId string, etag string) bool
	StashPage(context.Context, *blogger.Page)
	StashPageEtags(ctx context.Context, blogId string, listEtag string, pageEtags map[string]string, updated *time.Time)
}

type BlogPostStasher

type BlogPostStasher interface {
	GetPostListEtag(ctx context.Context, blogId string) (etag *string)
	HasPost(ctx context.Context, pageId string, etag string) bool
	StashPost(context.Context, *blogger.Post)
	StashPostEtags(ctx context.Context, blogId string, listEtag string, postEtags map[string]string, updated *time.Time)
}

type BlogStasher

type BlogStasher interface {
	StashBlog(context.Context, *blogger.Blog)
}

type BloggerStasher

type BloggerStasher interface {
	BlogPostStasher
	BlogPageStasher
	BlogStasher
}

type TwitterStasher

type TwitterStasher interface {
	GetLastTweetId(ctx context.Context, userId int64) int64
	StashUser(context.Context, *twitter.User)
	StashTweet(context.Context, *twitter.Tweet, *twitter.OEmbedTweet)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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