Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Credentials ¶
type OAuth ¶
type OAuth interface {
ProviderID() string
// Authorization URL to start OAuth process and retrieve a request token
AuthCodeURL(r *http.Request, claims map[string]interface{}) (string, error)
// Request an access token from a request token to complete authentication
Exchange(ctx context.Context, r *http.Request) ([]Credentials, error)
}
type Permission ¶
type Permission int
const ( PermissionNone Permission = iota PermissionRead PermissionWrite PermissionReadWrite )
func PermissionFromString ¶
func PermissionFromString(text string) Permission
func (Permission) MarshalText ¶
func (p Permission) MarshalText() ([]byte, error)
func (Permission) String ¶
func (p Permission) String() string
func (*Permission) UnmarshalText ¶
func (p *Permission) UnmarshalText(text []byte) error
type Post ¶
type Post struct {
ID string `json:"id"`
Provider string `json:"provider"`
URL string `json:"url"`
Author User `json:"author"`
Contents string `json:"contents"`
NumLikes int32 `json:"num_likes"`
Tags []string `json:"tags"`
Links []string `json:"links"`
PublishedAt *time.Time `json:"published_at,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
Raw interface{}
}
Post is a normalized `post` object across multiple providers. As normalized as possible. The original data is available in Raw
type User ¶
type User struct {
Provider string `json:"provider" url:"provider"`
ID string `json:"id" url:"id"`
Username string `json:"username" url:"username"`
Name string `json:"name" url:"name"`
Email string `json:"email" url:"email"`
ProfileURL string `json:"profile_url" url:"profile_url"`
AvatarURL string `json:"avatar_url" url:"avatar_url"`
NumPosts int32 `json:"num_posts" url:"num_posts"`
NumFollowers int32 `json:"num_followers" url:"num_folowers"`
NumFollowing int32 `json:"num_following" url:"num_following"`
Lang string `json:"lang" url:"lang"`
Location string `json:"location" url:"location"`
Timezone string `json:"timezone" url:"timezone"`
Private bool `json:"private" url:"private"`
LastSyncAt *time.Time `json:"last_sync_at" url:"last_sync_at"`
}
Click to show internal directories.
Click to hide internal directories.