api

package
v0.20.3 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: AGPL-3.0 Imports: 62 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivityPub

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

func NewActivityPub

func NewActivityPub(db db.DB, p *processing.Processor) *ActivityPub

func (*ActivityPub) Route

func (a *ActivityPub) Route(r *router.Router, m ...gin.HandlerFunc)

func (*ActivityPub) RoutePublicKey

func (a *ActivityPub) RoutePublicKey(r *router.Router, m ...gin.HandlerFunc)

Public key endpoint requires different middleware + cache policies from other AP endpoints.

type Auth

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

func NewAuth

func NewAuth(
	state *state.State,
	p *processing.Processor,
	idp oidc.IDP,
	routerSession *gtsmodel.RouterSession,
	sessionName string,
	cookiePolicy apiutil.CookiePolicy,
) *Auth

func (*Auth) Route

func (a *Auth) Route(r *router.Router, m ...gin.HandlerFunc)

Route attaches 'auth' and 'oauth' groups to the given router.

type Client

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

func NewClient

func NewClient(state *state.State, p *processing.Processor) *Client

func (*Client) Route

func (c *Client) Route(r *router.Router, m ...gin.HandlerFunc)

type Fileserver

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

func NewFileserver

func NewFileserver(p *processing.Processor) *Fileserver

func (*Fileserver) Route

func (f *Fileserver) Route(
	r *router.Router,
	m ...gin.HandlerFunc,
)

Route the "main" fileserver group that handles everything except emojis.

func (*Fileserver) RouteEmojis

func (f *Fileserver) RouteEmojis(
	r *router.Router,
	instanceAcctID string,
	m ...gin.HandlerFunc,
)

Route the "emojis" fileserver group to handle emojis specifically.

instanceAccount ID is required because that is the ID under which all emoji files are stored, and from which all emoji file requests are therefore served.

type Health

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

func NewHealth

func NewHealth(readyF func(context.Context) error) *Health

func (*Health) Route

func (mt *Health) Route(r *router.Router, m ...gin.HandlerFunc)

type NodeInfo

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

func NewNodeInfo

func NewNodeInfo(p *processing.Processor) *NodeInfo

func (*NodeInfo) Route

func (w *NodeInfo) Route(r *router.Router, m ...gin.HandlerFunc)

type Robots

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

func NewRobots

func NewRobots() *Robots

func (*Robots) Route

func (rb *Robots) Route(r *router.Router, m ...gin.HandlerFunc)

type WellKnown

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

func NewWellKnown

func NewWellKnown(p *processing.Processor) *WellKnown

func (*WellKnown) Route

func (w *WellKnown) Route(r *router.Router, m ...gin.HandlerFunc)

Directories

Path Synopsis
activitypub
client
admin
AccountsGETHandlerV1 swagger:operation GET /api/v1/admin/accounts adminAccountsGetV1
AccountsGETHandlerV1 swagger:operation GET /api/v1/admin/accounts adminAccountsGetV1
wellknown

Jump to

Keyboard shortcuts

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