Documentation ¶
Index ¶
- Constants
- Variables
- func CmdAutocompleter(input string, knownUsers map[string]string) []string
- func CmdAvailable() []string
- func CmdHelperGetBoostParams(args string) (int, error)
- func CmdHelperGetFavParams(args string) (int, error)
- func CmdHelperGetHashtagParams(args string) (string, bool, error)
- func CmdHelperGetOpenParams(args string) (int, error)
- func CmdHelperGetReplyParams(args string) (int, string, error)
- func CmdHelperGetShareParams(args string) (int, error)
- func CmdHelperGetTootIDFromString(s string) (int, error)
- type CmdReturnCode
- func CmdBoost(timeline *Timeline, tootID int) CmdReturnCode
- func CmdFav(timeline *Timeline, tootID int) CmdReturnCode
- func CmdOpen(timeline *Timeline, tootID int) CmdReturnCode
- func CmdProcessor(timeline *Timeline, input string, trigger CmdTrigger) (CmdReturnCode, bool)
- func CmdShare(timeline *Timeline, tootID int) CmdReturnCode
- func CmdToot(timeline *Timeline, content string, inReplyTo int, visibility string) CmdReturnCode
- func CmdUnboost(timeline *Timeline, tootID int) CmdReturnCode
- func CmdUnfav(timeline *Timeline, tootID int) CmdReturnCode
- type CmdTrigger
- type Timeline
- func (timeline *Timeline) Boost(tootID int, shallBe bool) (*mastodon.Status, error)
- func (timeline *Timeline) Fav(tootID int, shallBe bool) (*mastodon.Status, error)
- func (timeline *Timeline) GetCurrentOptions() TimelineOptions
- func (timeline *Timeline) GetCurrentType() TimelineType
- func (timeline *Timeline) Load() error
- func (timeline *Timeline) SearchUser(query string, limit int64) ([]*mastodon.Account, error)
- func (timeline *Timeline) Switch(timelineType TimelineType, options *TimelineOptions)
- func (timeline *Timeline) Toot(status *string, inReplyTo int, filesToUpload []string, visibility *string, ...) (*mastodon.Status, error)
- func (timeline *Timeline) User(ID string) (*mastodon.Account, error)
- type TimelineOptions
- type TimelineType
- type Toot
Constants ¶
View Source
const ( CodeOk CmdReturnCode = 0 CodeNotOk = 1 CodeCommandNotFound = 2 CodeUserNotFound = 3 CodeTriggerNotSupported = 4 CodeQuit = -1 CodeHelp = -2 )
View Source
const ( TriggerCLI = 0 TriggerTUI = 1 )
View Source
const ( TimelineHome TimelineType = 0 TimelineLocal = 1 TimelinePublic = 2 TimelineNotifications = 3 TimelineHashtag = 4 TimelineUser = 5 )
View Source
const ( VisibilityPublic string = "public" VisibilityPrivate = "private" VisibilityUnlisted = "unlisted" VisibilityDirect = "direct" )
Variables ¶
View Source
var CmdContentRegex = regexp.MustCompile(`(?m)(( {0,1}~#| {0,1}~:)\[([^\[\]]*)\]| {0,1}~!!)`)
View Source
var CmdHandleAutoCompletionRegex = regexp.MustCompile(`(?m)(^@| @|^whois @{0,1})([^ ]+)$`)
Functions ¶
func CmdAvailable ¶
func CmdAvailable() []string
func CmdHelperGetBoostParams ¶
func CmdHelperGetFavParams ¶
func CmdHelperGetHashtagParams ¶ added in v0.2.0
func CmdHelperGetOpenParams ¶
func CmdHelperGetShareParams ¶
Types ¶
type CmdReturnCode ¶
type CmdReturnCode int
func CmdBoost ¶
func CmdBoost(timeline *Timeline, tootID int) CmdReturnCode
func CmdFav ¶
func CmdFav(timeline *Timeline, tootID int) CmdReturnCode
func CmdOpen ¶
func CmdOpen(timeline *Timeline, tootID int) CmdReturnCode
func CmdProcessor ¶
func CmdProcessor(timeline *Timeline, input string, trigger CmdTrigger) (CmdReturnCode, bool)
func CmdShare ¶
func CmdShare(timeline *Timeline, tootID int) CmdReturnCode
func CmdToot ¶
func CmdToot( timeline *Timeline, content string, inReplyTo int, visibility string) CmdReturnCode
func CmdUnboost ¶
func CmdUnboost(timeline *Timeline, tootID int) CmdReturnCode
func CmdUnfav ¶
func CmdUnfav(timeline *Timeline, tootID int) CmdReturnCode
type CmdTrigger ¶ added in v0.3.0
type CmdTrigger int
type Timeline ¶
type Timeline struct { LastRenderedIndex int Account mastodon.Account Toots []Toot TootIndexStatusIDMappings map[string]int KnownUsers map[string]string // contains filtered or unexported fields }
func NewTimeline ¶
func NewTimeline(mastodonClient *mastodon.Client) Timeline
func (*Timeline) GetCurrentOptions ¶ added in v0.2.0
func (timeline *Timeline) GetCurrentOptions() TimelineOptions
func (*Timeline) GetCurrentType ¶
func (timeline *Timeline) GetCurrentType() TimelineType
func (*Timeline) SearchUser ¶ added in v0.2.0
func (*Timeline) Switch ¶
func (timeline *Timeline) Switch(timelineType TimelineType, options *TimelineOptions)
type TimelineOptions ¶ added in v0.2.0
type TimelineType ¶
type TimelineType int
Click to show internal directories.
Click to hide internal directories.