server

package
v0.8.7 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: Unlicense Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type I

type I interface {
	AcceptEvent(
		c context.T, ev *event.E, hr *http.Request, authedPubkey []byte,
		remote string,
	) (accept bool, notice string, afterSave func())
	AcceptReq(
		c context.T, hr *http.Request, f *filters.T,
		authedPubkey []byte, remote string,
	) (allowed *filters.T, accept bool, modified bool)
	AddEvent(
		c context.T, rl relay.I, ev *event.E, hr *http.Request, origin string,
		pubkeys [][]byte,
	) (accepted bool, message []byte)
	AdminAuth(
		r *http.Request, remote string, tolerance ...time.Duration,
	) (authed bool, pubkey []byte)
	UserAuth(
		r *http.Request, remote string, tolerance ...time.Duration,
	) (authed bool, pubkey []byte, super bool)
	Context() context.T
	Publisher() *publish.S
	Publish(c context.T, evt *event.E) (err error)
	Relay() relay.I
	Shutdown()
	Storage() store.I
	AuthRequired() bool
	PublicReadable() bool
	ServiceURL(req *http.Request) (s string)
	OwnersPubkeys() (pks [][]byte)
	Config() *config.C
}

Jump to

Keyboard shortcuts

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