Documentation ¶
Index ¶
- Constants
- Variables
- func NormalizeUsername(username string) string
- func SetTwtManager(m TwtManager)
- func SplitTwts(twts Twts, ttl time.Duration, N int) (Twts, Twts)
- type Alternative
- type Alternatives
- type AuthRequest
- type AuthResponse
- type ConversationRequest
- type ExternalProfileRequest
- type Feed
- type FeedLookup
- type FeedLookupFn
- type Feeds
- type FetchTwtsRequest
- type FmtOpts
- type FollowRequest
- type Info
- type KV
- type Link
- type LinkList
- type Links
- type MentionList
- type MuteRequest
- type PagedRequest
- type PagedResponse
- type PagerResponse
- type PostRequest
- type PreambleFeed
- type Profile
- type ProfileResponse
- type RegisterRequest
- type ReportRequest
- type Subject
- type SupportRequest
- type TagList
- type Twt
- type TwtFile
- type TwtLink
- type TwtManager
- type TwtMap
- type TwtMention
- type TwtTag
- type TwtTextFormat
- type Twter
- type Twts
- func (twts Twts) Clone() Twts
- func (twts Twts) Len() int
- func (twts Twts) Less(i, j int) bool
- func (twts Twts) LinkCount() map[string]int
- func (twts Twts) Links() LinkList
- func (twts Twts) MentionCount() map[string]int
- func (twts Twts) Mentions() MentionList
- func (twts Twts) SubjectCount() map[string]int
- func (twts Twts) Subjects() []Subject
- func (twts Twts) Swap(i, j int)
- func (twts Twts) TagCount() map[string]int
- func (twts Twts) Tags() TagList
- func (twts *Twts) UnmarshalJSON(data []byte) error
- type UnfollowRequest
- type UnmuteRequest
- type Value
Constants ¶
const (
TwtHashLength = 7
)
Variables ¶
var ( ErrNotImplemented = errors.New("not implemented") ErrInvalidFeed = errors.New("error: erroneous feed detected") )
var NilTwt = nilTwt{}
Functions ¶
func NormalizeUsername ¶
func SetTwtManager ¶
func SetTwtManager(m TwtManager)
Types ¶
type Alternative ¶
type Alternatives ¶
type Alternatives []Alternative
type AuthRequest ¶
AuthRequest ...
func NewAuthRequest ¶
func NewAuthRequest(r io.Reader) (req AuthRequest, err error)
NewAuthRequest ...
type ConversationRequest ¶
ConversationRequest ...
func NewConversationRequest ¶
func NewConversationRequest(r io.Reader) (req ConversationRequest, err error)
NewConversationRequest ...
type ExternalProfileRequest ¶
ExternalProfileRequest ...
func NewExternalProfileRequest ¶
func NewExternalProfileRequest(r io.Reader) (req ExternalProfileRequest, err error)
NewExternalProfileRequest ...
type FeedLookup ¶
type FeedLookupFn ¶
func (FeedLookupFn) FeedLookup ¶
func (fn FeedLookupFn) FeedLookup(s string) *Twter
type FetchTwtsRequest ¶
type FetchTwtsRequest struct { URL string `json:"url"` Nick string `json:"nick"` Page int `json:"page"` }
FetchTwtsRequest ...
func NewFetchTwtsRequest ¶
func NewFetchTwtsRequest(r io.Reader) (req FetchTwtsRequest, err error)
NewFetchTwtsRequest ...
type FollowRequest ¶
FollowRequest ...
func NewFollowRequest ¶
func NewFollowRequest(r io.Reader) (req FollowRequest, err error)
NewFollowRequest ...
type MentionList ¶
type MentionList []TwtMention
func (MentionList) Mentions ¶
func (ml MentionList) Mentions() []string
type MuteRequest ¶
MuteRequest ...
func NewMuteRequest ¶
func NewMuteRequest(r io.Reader) (req MuteRequest, err error)
NewMuteRequest ...
type PagedRequest ¶
type PagedRequest struct {
Page int `json:"page"`
}
PagedRequest ...
func NewPagedRequest ¶
func NewPagedRequest(r io.Reader) (req PagedRequest, err error)
NewPagedRequest ...
type PagedResponse ¶
type PagedResponse struct { Twts Twts `json:"twts"` Pager PagerResponse }
PagedResponse ...
type PagerResponse ¶
type PagerResponse struct { Current int `json:"current_page"` MaxPages int `json:"max_pages"` TotalTwts int `json:"total_twts"` }
PagerResponse ...
type PostRequest ¶
PostRequest ...
func NewPostRequest ¶
func NewPostRequest(r io.Reader) (req PostRequest, err error)
NewPostRequest ...
type PreambleFeed ¶
type PreambleFeed struct {
// contains filtered or unexported fields
}
func ReadPreambleFeed ¶
func ReadPreambleFeed(r io.Reader) (*PreambleFeed, error)
func (*PreambleFeed) Preamble ¶
func (p *PreambleFeed) Preamble() string
type Profile ¶
type Profile struct { Type string Username string Tagline string URL string TwtURL string BlogsURL string AvatarURL string // `true` if the User viewing the Profile has muted this user/feed Muted bool // `true` if the User viewing the Profile has follows this user/feed Follows bool // `true` if user/feed follows the User viewing the Profile. FollowedBy bool Bookmarks map[string]string Followers map[string]string Following map[string]string // `true` if the User viewing the Profile has permissions to show the // bookmarks/followers/followings of this user/feed ShowBookmarks bool ShowFollowers bool ShowFollowing bool }
Profile represents a user/feed profile
type ProfileResponse ¶
type ProfileResponse struct { Profile Profile `json:"profile"` Links Links `json:"links"` Alternatives Alternatives `json:"alternatives"` Twter Twter `json:"twter"` }
ProfileResponse ...
type RegisterRequest ¶
type RegisterRequest struct { Username string `json:"username"` Password string `json:"password"` Email string `json:"email"` }
RegisterRequest ...
func NewRegisterRequest ¶
func NewRegisterRequest(r io.Reader) (req RegisterRequest, err error)
NewRegisterRequest ...
type ReportRequest ¶
type ReportRequest struct { Nick string `json:"nick"` URL string `json:"url"` Name string `json:"name"` Email string `json:"email"` Category string `json:"subject"` Message string `json:"message"` }
ReportRequest ...
func NewReportRequest ¶
func NewReportRequest(r io.Reader) (req ReportRequest, err error)
NewReportRequest ...
type SupportRequest ¶
type SupportRequest struct { Name string `json:"name"` Email string `json:"email"` Subject string `json:"subject"` Message string `json:"message"` }
SupportRequest ...
func NewSupportRequest ¶
func NewSupportRequest(r io.Reader) (req SupportRequest, err error)
NewSupportRequest ...
type Twt ¶
type Twt interface { IsZero() bool Clone() Twt Twter() Twter Created() time.Time Hash() string Subject() Subject Mentions() MentionList Links() LinkList Tags() TagList ExpandLinks(FmtOpts, FeedLookup) // TODO: remove FormatText and add func to update links for UI FormatText(TwtTextFormat, FmtOpts) string fmt.Formatter }
Twt ...
func DecodeJSON ¶
type TwtManager ¶
type TwtMention ¶
type TwtMention interface {
Twter() Twter
}
type TwtTextFormat ¶
type TwtTextFormat int
TwtTextFormat represents the format of which the twt text gets formatted to
const ( // MarkdownFmt to use markdown format MarkdownFmt TwtTextFormat = iota // HTMLFmt to use HTML format HTMLFmt // TextFmt to use for og:description TextFmt )
type Twts ¶
type Twts []Twt
Twts typedef to be able to attach sort methods
func (Twts) MentionCount ¶
func (Twts) SubjectCount ¶
func (*Twts) UnmarshalJSON ¶
type UnfollowRequest ¶
type UnfollowRequest struct {
Nick string `json:"nick"`
}
UnfollowRequest ...
func NewUnfollowRequest ¶
func NewUnfollowRequest(r io.Reader) (req UnfollowRequest, err error)
NewUnfollowRequest ...
type UnmuteRequest ¶
type UnmuteRequest struct {
Nick string `json:"nick"`
}
UnmuteRequest ...
func NewUnmuteRequest ¶
func NewUnmuteRequest(r io.Reader) (req UnmuteRequest, err error)
NewUnmuteRequest ...