Documentation ¶
Index ¶
- Constants
- Variables
- func CmdAutocompleter(input string, knownUsers []string) []string
- func CmdAvailable() []string
- func CmdHelperGetBoostParams(args string) (int, error)
- func CmdHelperGetFavParams(args string) (int, 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) CmdReturnCode
- 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 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) GetCurrentType() TimelineType
- func (timeline *Timeline) Load() error
- func (timeline *Timeline) Switch(timelineType TimelineType)
- func (timeline *Timeline) Toot(status *string, inReplyTo int, filesToUpload []string, visibility *string, ...) (*mastodon.Status, error)
- type TimelineType
- type Toot
Constants ¶
View Source
const ( CodeOk CmdReturnCode = 0 CodeNotOk = 1 CodeCommandNotFound = 2 CodeQuit = -1 CodeHelp = -2 )
View Source
const ( TimelineHome TimelineType = 0 TimelineLocal = 1 TimelinePublic = 2 TimelineNotifications = 3 TimelineEnd = 4 )
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}~!!)`)
Functions ¶
func CmdAutocompleter ¶
func CmdAvailable ¶
func CmdAvailable() []string
func CmdHelperGetBoostParams ¶
func CmdHelperGetFavParams ¶
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) CmdReturnCode
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 Timeline ¶
type Timeline struct { LastRenderedIndex int Account mastodon.Account Toots []Toot TootIndexStatusIDMappings map[string]int KnownUsers []string // contains filtered or unexported fields }
func NewTimeline ¶
func NewTimeline(mastodonClient *mastodon.Client) Timeline
func (*Timeline) GetCurrentType ¶
func (timeline *Timeline) GetCurrentType() TimelineType
func (*Timeline) Switch ¶
func (timeline *Timeline) Switch(timelineType TimelineType)
type TimelineType ¶
type TimelineType int
Click to show internal directories.
Click to hide internal directories.