client

package
v0.0.0-...-9835270 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: AGPL-3.0, Apache-2.0, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FedClients sync.Map

	Certs *sync.Map
)

Functions

func ReNewFedClient

func ReNewFedClient(serverName string)

func SetCerts

func SetCerts(c *sync.Map)

Types

type FedClientWrap

type FedClientWrap struct {
	Client *gomatrixserverlib.FederationClient
}

func GetFedClient

func GetFedClient(serverName string) (*FedClientWrap, error)

func NewFedClient

func NewFedClient(serverName string) *FedClientWrap

func (*FedClientWrap) Backfill

func (fed *FedClientWrap) Backfill(
	ctx context.Context, s gomatrixserverlib.ServerName, domain, roomID string,
	limit int, eventIDs []string, dir string,
) (res gomatrixserverlib.BackfillResponse, err error)

func (*FedClientWrap) Download

func (fed *FedClientWrap) Download(
	ctx context.Context, destination, domain, mediaID, width, method, fileType string, cb func(response *http.Response) error,
) (err error)

func (*FedClientWrap) LookupAvatarURL

func (fed *FedClientWrap) LookupAvatarURL(
	ctx context.Context, destination, userID string,
) (res gomatrixserverlib.RespAvatarURL, err error)

func (*FedClientWrap) LookupDisplayName

func (fed *FedClientWrap) LookupDisplayName(
	ctx context.Context, destination, userID string,
) (res gomatrixserverlib.RespDisplayname, err error)

func (*FedClientWrap) LookupMediaInfo

func (fed *FedClientWrap) LookupMediaInfo(
	ctx context.Context, destination, mediaID, userID string,
) (res gomatrixserverlib.RespMediaInfo, err error)

func (*FedClientWrap) LookupProfile

func (fed *FedClientWrap) LookupProfile(
	ctx context.Context, destination, userID string,
) (res gomatrixserverlib.RespProfile, err error)

func (*FedClientWrap) LookupRoomAlias

func (fed *FedClientWrap) LookupRoomAlias(
	ctx context.Context, destination, alias string,
) (res gomatrixserverlib.RespDirectory, err error)

func (*FedClientWrap) LookupState

func (fed *FedClientWrap) LookupState(
	ctx context.Context, destination, roomID, eventID string,
) (res gomatrixserverlib.RespState, err error)

func (*FedClientWrap) LookupUserInfo

func (fed *FedClientWrap) LookupUserInfo(
	ctx context.Context, destination, userID string,
) (res gomatrixserverlib.RespUserInfo, err error)

func (*FedClientWrap) MakeJoin

func (fed *FedClientWrap) MakeJoin(
	ctx context.Context, s gomatrixserverlib.ServerName, roomID, userID string, ver []string,
) (res gomatrixserverlib.RespMakeJoin, err error)

func (*FedClientWrap) MakeLeave

func (fed *FedClientWrap) MakeLeave(
	ctx context.Context, s gomatrixserverlib.ServerName, roomID, userID string,
) (res gomatrixserverlib.RespMakeLeave, err error)

func (*FedClientWrap) SendInvite

func (fed *FedClientWrap) SendInvite(
	ctx context.Context, destination string, event gomatrixserverlib.Event,
) (res gomatrixserverlib.RespInvite, err error)

func (*FedClientWrap) SendJoin

func (fed *FedClientWrap) SendJoin(
	ctx context.Context, s gomatrixserverlib.ServerName, roomID, eventID string, event gomatrixserverlib.Event,
) (res gomatrixserverlib.RespSendJoin, err error)

func (*FedClientWrap) SendLeave

func (fed *FedClientWrap) SendLeave(
	ctx context.Context, s gomatrixserverlib.ServerName, roomID, eventID string, event gomatrixserverlib.Event,
) (res gomatrixserverlib.RespSendLeave, err error)

func (*FedClientWrap) SendTransaction

func (fed *FedClientWrap) SendTransaction(
	ctx context.Context, t gomatrixserverlib.Transaction,
) (res gomatrixserverlib.RespSend, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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