clientapi

package
v0.0.0-...-21abf39 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: AGPL-3.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPublicEndpoints

func AddPublicEndpoints(s sparq.Server, mux *mux.Router)

func PostTootHandler

func PostTootHandler(svr sparq.Server) http.HandlerFunc

func TootMap

func TootMap(db *sqlx.DB, sid string) (map[string]interface{}, error)

func TootsForHome

func TootsForHome(db *sqlx.DB) (map[string]interface{}, error)

Types

type Instance

type Instance struct {
	Description     string
	SoftwareName    string
	SoftwareVersion string
	Thumbnail       string
	Domain          string
	Admin           model.Account
	Fields          [][]interface{}
}

type Poll

type Poll struct {
	ExpiresIn      int
	HideTotals     bool
	MultipleChoice bool
	O1             string
	O2             string
	O3             string
	O4             string
	O5             string
	O6             string
}

type StreamEvent

type StreamEvent struct {
	Name string
	Data string
}

func NewEvent

func NewEvent(name string, data string) StreamEvent

func NewJsonEvent

func NewJsonEvent(name string, data any) StreamEvent

type Streamer

type Streamer struct {
	// contains filtered or unexported fields
}

func NewStreamer

func NewStreamer(s sparq.Server) *Streamer

func (*Streamer) Fanout

func (s *Streamer) Fanout(key any, event StreamEvent)

func (*Streamer) Handler

func (s *Streamer) Handler(sp sparq.Server) http.HandlerFunc

func (*Streamer) Metrics

func (s *Streamer) Metrics() map[string]any

func (*Streamer) Run

func (s *Streamer) Run(ctx context.Context)

type Toot

type Toot struct {
	AuthorId           uint64
	Content            string
	MediaIds           []string
	InReplyTo          *string
	InReplyToAccountId *string
	Sensitive          bool
	Summary            string
	Visibility         string
	LanguageCode       string
	ScheduledAt        string
	*Poll
}

type User

type User struct {
}

Jump to

Keyboard shortcuts

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