Documentation
¶
Overview ¶
Package front implements a UI and exposes it over text-based protocols.
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
Domain string
Config *cfg.Config
Resolver ap.Resolver
DB *sql.DB
Inbox ap.Inbox
// contains filtered or unexported fields
}
Handler handles frontend (client-to-server) requests.
func NewHandler ¶
func NewHandler(domain string, cfg *cfg.Config, resolver ap.Resolver, db *sql.DB, inbox ap.Inbox) (Handler, error)
NewHandler returns a new Handler.
type Request ¶
type Request struct {
// Context specifies the request context.
Context context.Context
// URL specifies the requested URL.
URL *url.URL
// Log specifies a slog.Logger used while handling the request.
Log *slog.Logger
// Body optionally specifies an io.Reader to read the request body from.
Body io.Reader
// User optionally specifies a signed in user.
User *ap.Actor
// Keys optionally specifies the signing keys associated with User.
Keys [2]httpsig.Key
}
Request represents a request.
Source Files
¶
- accept.go
- alias.go
- approve.go
- avatar.go
- bio.go
- bookmark.go
- bookmarks.go
- cache.go
- certificates.go
- communities.go
- delete.go
- dm.go
- edit.go
- follow.go
- followers.go
- follows.go
- front.go
- fts.go
- handler.go
- hashtag.go
- hashtags.go
- home.go
- input.go
- invitations.go
- local.go
- logo.go
- me.go
- mentions.go
- menu.go
- metadata.go
- move.go
- name.go
- oops.go
- outbox.go
- page.go
- portability.go
- post.go
- print.go
- register.go
- reject.go
- reply.go
- request.go
- resolve.go
- revoke.go
- robots.go
- say.go
- search.go
- share.go
- status.go
- ttl.go
- unbookmark.go
- unfollow.go
- unshare.go
- users.go
- view.go
- whisper.go
Directories
¶
| Path | Synopsis |
|---|---|
|
Package gemini exposes a Gemini interface.
|
Package gemini exposes a Gemini interface. |
|
Package graph draws text-based graphs.
|
Package graph draws text-based graphs. |
|
Package static serves static content.
|
Package static serves static content. |
|
Package text is an abstraction layer for different text formats.
|
Package text is an abstraction layer for different text formats. |
|
gmi
Package gmi build Gemini responses.
|
Package gmi build Gemini responses. |
|
plain
Package plain converts HTML to plain text and vice versa.
|
Package plain converts HTML to plain text and vice versa. |
|
Package user handles user registration.
|
Package user handles user registration. |
Click to show internal directories.
Click to hide internal directories.