homeserver

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const PolicyServerKeyID gomatrixserverlib.KeyID = "ed25519:policy_server"

Variables

This section is empty.

Functions

func MatrixHttpError

func MatrixHttpError(w http.ResponseWriter, code int, errcode string, msg string)

Types

type Config

type Config struct {
	ServerName        string
	PrivateSigningKey ed25519.PrivateKey
	// The key used to sign events as neutral. This key is not published or used as a server key.
	PrivateEventSigningKey  ed25519.PrivateKey
	SigningKeyVersion       string
	KeyQueryServer          *KeyQueryServer
	ActorLocalpart          string
	CacheRoomStateFor       time.Duration
	TrustedOrigins          []string
	EnableDirectKeyFetching bool
	MediaClientUrl          string
	MediaClientAccessToken  string
	AdminContacts           []config.SupportContact
	SecurityContacts        []config.SupportContact
	SupportUrl              string
}

type ExcludeUnsafeKeysFetcher added in v1.2.0

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

func NewExcludeUnsafeKeysFetcher added in v1.2.0

func NewExcludeUnsafeKeysFetcher(downstream gomatrixserverlib.KeyFetcher) *ExcludeUnsafeKeysFetcher

func (*ExcludeUnsafeKeysFetcher) FetcherName added in v1.2.0

func (f *ExcludeUnsafeKeysFetcher) FetcherName() string

type Homeserver

type Homeserver struct {
	ServerName spec.ServerName
	KeyId      gomatrixserverlib.KeyID
	// contains filtered or unexported fields
}

func NewHomeserver

func NewHomeserver(config *Config, storage storage.PersistentStorage, pool *queue.Pool, pubsubClient pubsub.Client) (*Homeserver, error)

func (*Homeserver) BindTo

func (h *Homeserver) BindTo(mux *http.ServeMux) error

func (*Homeserver) DownloadMedia

func (h *Homeserver) DownloadMedia(ctx context.Context, origin string, mediaId string) ([]byte, error)

DownloadMedia - Implements `media.Downloader`

func (*Homeserver) FetcherName

func (h *Homeserver) FetcherName() string

func (*Homeserver) GetPublicEventSigningKey

func (h *Homeserver) GetPublicEventSigningKey() ed25519.PublicKey

func (*Homeserver) JoinRoom

func (h *Homeserver) JoinRoom(ctx context.Context, roomId string, via string, communityId string) (*storage.StoredRoom, error)

func (*Homeserver) JoinRooms

func (h *Homeserver) JoinRooms(ctx context.Context, roomIds []string, via string, communityId string) error

JoinRooms - Attempts to join rooms in order, retrying a number of times if required. This is a non-idempotent function: it will store successful joins until an error occurs.

func (*Homeserver) LearnStateIfExpired

func (h *Homeserver) LearnStateIfExpired(ctx context.Context, roomId string, atEventId string, via string) error

func (*Homeserver) Ping

func (h *Homeserver) Ping(ctx context.Context, serverName string) error

Ping - Sends an authenticated request to the given server name in an attempt to encourage it to send us transactions/requests.

type KeyQueryServer

type KeyQueryServer struct {
	Name           string
	PreferredKeyId string
	PreferredKey   ed25519.PublicKey
}

Jump to

Keyboard shortcuts

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