api

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 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientEvent

type ClientEvent gomatrixserverlib.ClientEvent

ClientEvent is an event which is fit for consumption by clients, in accordance with the specification.

func (*ClientEvent) Decode

func (r *ClientEvent) Decode(input []byte) error

func (*ClientEvent) Encode

func (r *ClientEvent) Encode() ([]byte, error)

type GetUserUnreadResponse

type GetUserUnreadResponse struct {
	Count int64 `json:"count"`
}

func (*GetUserUnreadResponse) Decode

func (r *GetUserUnreadResponse) Decode(input []byte) error

func (*GetUserUnreadResponse) Encode

func (r *GetUserUnreadResponse) Encode() ([]byte, error)

type InternalMsgConsumer

type InternalMsgConsumer struct {
	apiconsumer.APIConsumer
	// contains filtered or unexported fields
}

func NewInternalMsgConsumer

func NewInternalMsgConsumer(
	cfg config.Dendrite,
	rpcCli *common.RpcClient,
	idg *uid.UidGenerator,
	sm *sync.SyncMng,
	userTimeLine *repos.UserTimeLineRepo,
	keyChangeRepo *repos.KeyChangeStreamRepo,
	stdEventTimeline *repos.STDEventStreamRepo,
	db model.SyncAPIDatabase,
	cache service.Cache,
) *InternalMsgConsumer

func (*InternalMsgConsumer) Start

func (c *InternalMsgConsumer) Start()

type ReqGetEventWithID

type ReqGetEventWithID struct{}

func (ReqGetEventWithID) FillRequest

func (ReqGetEventWithID) FillRequest(coder core.Coder, req *http.Request, vars map[string]string) error

func (ReqGetEventWithID) GetAPIType

func (ReqGetEventWithID) GetAPIType() int8

func (ReqGetEventWithID) GetMethod

func (ReqGetEventWithID) GetMethod() []string

func (ReqGetEventWithID) GetMetricsName

func (ReqGetEventWithID) GetMetricsName() string

func (ReqGetEventWithID) GetMsgType

func (ReqGetEventWithID) GetMsgType() int32

func (ReqGetEventWithID) GetPrefix

func (ReqGetEventWithID) GetPrefix() []string

func (ReqGetEventWithID) GetRoute

func (ReqGetEventWithID) GetRoute() string

func (ReqGetEventWithID) GetTopic

func (ReqGetEventWithID) GetTopic(cfg *config.Dendrite) string

func (ReqGetEventWithID) NewRequest

func (ReqGetEventWithID) NewRequest() core.Coder

func (ReqGetEventWithID) NewResponse

func (ReqGetEventWithID) NewResponse(code int) core.Coder

func (ReqGetEventWithID) Process

func (ReqGetEventWithID) Process(ctx context.Context, consumer interface{}, msg core.Coder, device *authtypes.Device) (int, core.Coder)

type ReqGetEvents

type ReqGetEvents struct{}

func (ReqGetEvents) FillRequest

func (ReqGetEvents) FillRequest(coder core.Coder, req *http.Request, vars map[string]string) error

func (ReqGetEvents) GetAPIType

func (ReqGetEvents) GetAPIType() int8

func (ReqGetEvents) GetMethod

func (ReqGetEvents) GetMethod() []string

func (ReqGetEvents) GetMetricsName

func (ReqGetEvents) GetMetricsName() string

func (ReqGetEvents) GetMsgType

func (ReqGetEvents) GetMsgType() int32

func (ReqGetEvents) GetPrefix

func (ReqGetEvents) GetPrefix() []string

func (ReqGetEvents) GetRoute

func (ReqGetEvents) GetRoute() string

func (ReqGetEvents) GetTopic

func (ReqGetEvents) GetTopic(cfg *config.Dendrite) string

func (ReqGetEvents) NewRequest

func (ReqGetEvents) NewRequest() core.Coder

func (ReqGetEvents) NewResponse

func (ReqGetEvents) NewResponse(code int) core.Coder

func (ReqGetEvents) Process

func (r ReqGetEvents) Process(ctx context.Context, consumer interface{}, msg core.Coder, device *authtypes.Device) (int, core.Coder)

type ReqGetInitialSync

type ReqGetInitialSync struct{}

func (ReqGetInitialSync) FillRequest

func (ReqGetInitialSync) FillRequest(coder core.Coder, req *http.Request, vars map[string]string) error

func (ReqGetInitialSync) GetAPIType

func (ReqGetInitialSync) GetAPIType() int8

func (ReqGetInitialSync) GetMethod

func (ReqGetInitialSync) GetMethod() []string

func (ReqGetInitialSync) GetMetricsName

func (ReqGetInitialSync) GetMetricsName() string

func (ReqGetInitialSync) GetMsgType

func (ReqGetInitialSync) GetMsgType() int32

func (ReqGetInitialSync) GetPrefix

func (ReqGetInitialSync) GetPrefix() []string

func (ReqGetInitialSync) GetRoute

func (ReqGetInitialSync) GetRoute() string

func (ReqGetInitialSync) GetTopic

func (ReqGetInitialSync) GetTopic(cfg *config.Dendrite) string

func (ReqGetInitialSync) NewRequest

func (ReqGetInitialSync) NewRequest() core.Coder

func (ReqGetInitialSync) NewResponse

func (ReqGetInitialSync) NewResponse(code int) core.Coder

func (ReqGetInitialSync) Process

func (ReqGetInitialSync) Process(ctx context.Context, consumer interface{}, msg core.Coder, device *authtypes.Device) (int, core.Coder)

type ReqGetJoinedRooms

type ReqGetJoinedRooms struct{}

func (ReqGetJoinedRooms) FillRequest

func (ReqGetJoinedRooms) FillRequest(coder core.Coder, req *http.Request, vars map[string]string) error

func (ReqGetJoinedRooms) GetAPIType

func (ReqGetJoinedRooms) GetAPIType() int8

func (ReqGetJoinedRooms) GetMethod

func (ReqGetJoinedRooms) GetMethod() []string

func (ReqGetJoinedRooms) GetMetricsName

func (ReqGetJoinedRooms) GetMetricsName() string

func (ReqGetJoinedRooms) GetMsgType

func (ReqGetJoinedRooms) GetMsgType() int32

func (ReqGetJoinedRooms) GetPrefix

func (ReqGetJoinedRooms) GetPrefix() []string

func (ReqGetJoinedRooms) GetRoute

func (ReqGetJoinedRooms) GetRoute() string

func (ReqGetJoinedRooms) GetTopic

func (ReqGetJoinedRooms) GetTopic(cfg *config.Dendrite) string

func (ReqGetJoinedRooms) NewRequest

func (ReqGetJoinedRooms) NewRequest() core.Coder

func (ReqGetJoinedRooms) NewResponse

func (ReqGetJoinedRooms) NewResponse(code int) core.Coder

func (ReqGetJoinedRooms) Process

func (ReqGetJoinedRooms) Process(ctx context.Context, consumer interface{}, msg core.Coder, device *authtypes.Device) (int, core.Coder)

type ReqGetKeysChanges

type ReqGetKeysChanges struct{}

func (ReqGetKeysChanges) FillRequest

func (ReqGetKeysChanges) FillRequest(coder core.Coder, req *http.Request, vars map[string]string) error

func (ReqGetKeysChanges) GetAPIType

func (ReqGetKeysChanges) GetAPIType() int8

func (ReqGetKeysChanges) GetMethod

func (ReqGetKeysChanges) GetMethod() []string

func (ReqGetKeysChanges) GetMetricsName

func (ReqGetKeysChanges) GetMetricsName() string

func (ReqGetKeysChanges) GetMsgType

func (ReqGetKeysChanges) GetMsgType() int32

func (ReqGetKeysChanges) GetPrefix

func (ReqGetKeysChanges) GetPrefix() []string

func (ReqGetKeysChanges) GetRoute

func (ReqGetKeysChanges) GetRoute() string

func (ReqGetKeysChanges) GetTopic

func (ReqGetKeysChanges) GetTopic(cfg *config.Dendrite) string

func (ReqGetKeysChanges) NewRequest

func (ReqGetKeysChanges) NewRequest() core.Coder

func (ReqGetKeysChanges) NewResponse

func (ReqGetKeysChanges) NewResponse(code int) core.Coder

func (ReqGetKeysChanges) Process

func (r ReqGetKeysChanges) Process(ctx context.Context, consumer interface{}, msg core.Coder, device *authtypes.Device) (int, core.Coder)

type ReqGetSync

type ReqGetSync struct{}

func (ReqGetSync) FillRequest

func (ReqGetSync) FillRequest(coder core.Coder, req *http.Request, vars map[string]string) error

func (ReqGetSync) GetAPIType

func (ReqGetSync) GetAPIType() int8

func (ReqGetSync) GetMethod

func (ReqGetSync) GetMethod() []string

func (ReqGetSync) GetMetricsName

func (ReqGetSync) GetMetricsName() string

func (ReqGetSync) GetMsgType

func (ReqGetSync) GetMsgType() int32

func (ReqGetSync) GetPrefix

func (ReqGetSync) GetPrefix() []string

func (ReqGetSync) GetRoute

func (ReqGetSync) GetRoute() string

func (ReqGetSync) GetTopic

func (ReqGetSync) GetTopic(cfg *config.Dendrite) string

func (ReqGetSync) NewRequest

func (ReqGetSync) NewRequest() core.Coder

func (ReqGetSync) NewResponse

func (ReqGetSync) NewResponse(code int) core.Coder

func (ReqGetSync) Process

func (ReqGetSync) Process(ctx context.Context, consumer interface{}, msg core.Coder, device *authtypes.Device) (int, core.Coder)

type ReqGetUserUnread

type ReqGetUserUnread struct{}

func (ReqGetUserUnread) FillRequest

func (ReqGetUserUnread) FillRequest(coder core.Coder, req *http.Request, vars map[string]string) error

func (ReqGetUserUnread) GetAPIType

func (ReqGetUserUnread) GetAPIType() int8

func (ReqGetUserUnread) GetMethod

func (ReqGetUserUnread) GetMethod() []string

func (ReqGetUserUnread) GetMetricsName

func (ReqGetUserUnread) GetMetricsName() string

func (ReqGetUserUnread) GetMsgType

func (ReqGetUserUnread) GetMsgType() int32

func (ReqGetUserUnread) GetPrefix

func (ReqGetUserUnread) GetPrefix() []string

func (ReqGetUserUnread) GetRoute

func (ReqGetUserUnread) GetRoute() string

func (ReqGetUserUnread) GetTopic

func (ReqGetUserUnread) GetTopic(cfg *config.Dendrite) string

func (ReqGetUserUnread) NewRequest

func (ReqGetUserUnread) NewRequest() core.Coder

func (ReqGetUserUnread) NewResponse

func (ReqGetUserUnread) NewResponse(code int) core.Coder

func (ReqGetUserUnread) Process

func (ReqGetUserUnread) Process(ctx context.Context, consumer interface{}, msg core.Coder, device *authtypes.Device) (int, core.Coder)

type ReqPostReportDeviceState

type ReqPostReportDeviceState struct{}

func (ReqPostReportDeviceState) FillRequest

func (ReqPostReportDeviceState) FillRequest(coder core.Coder, req *http.Request, vars map[string]string) error

func (ReqPostReportDeviceState) GetAPIType

func (ReqPostReportDeviceState) GetAPIType() int8

func (ReqPostReportDeviceState) GetMethod

func (ReqPostReportDeviceState) GetMethod() []string

func (ReqPostReportDeviceState) GetMetricsName

func (ReqPostReportDeviceState) GetMetricsName() string

func (ReqPostReportDeviceState) GetMsgType

func (ReqPostReportDeviceState) GetMsgType() int32

func (ReqPostReportDeviceState) GetPrefix

func (ReqPostReportDeviceState) GetPrefix() []string

func (ReqPostReportDeviceState) GetRoute

func (ReqPostReportDeviceState) GetRoute() string

func (ReqPostReportDeviceState) GetTopic

func (ReqPostReportDeviceState) NewRequest

func (ReqPostReportDeviceState) NewRequest() core.Coder

func (ReqPostReportDeviceState) NewResponse

func (ReqPostReportDeviceState) NewResponse(code int) core.Coder

func (ReqPostReportDeviceState) Process

func (ReqPostReportDeviceState) Process(ctx context.Context, consumer interface{}, msg core.Coder, device *authtypes.Device) (int, core.Coder)

type ReqPostReportRoom

type ReqPostReportRoom struct{}

func (ReqPostReportRoom) FillRequest

func (ReqPostReportRoom) FillRequest(coder core.Coder, req *http.Request, vars map[string]string) error

func (ReqPostReportRoom) GetAPIType

func (ReqPostReportRoom) GetAPIType() int8

func (ReqPostReportRoom) GetMethod

func (ReqPostReportRoom) GetMethod() []string

func (ReqPostReportRoom) GetMetricsName

func (ReqPostReportRoom) GetMetricsName() string

func (ReqPostReportRoom) GetMsgType

func (ReqPostReportRoom) GetMsgType() int32

func (ReqPostReportRoom) GetPrefix

func (ReqPostReportRoom) GetPrefix() []string

func (ReqPostReportRoom) GetRoute

func (ReqPostReportRoom) GetRoute() string

func (ReqPostReportRoom) GetTopic

func (ReqPostReportRoom) GetTopic(cfg *config.Dendrite) string

func (ReqPostReportRoom) NewRequest

func (ReqPostReportRoom) NewRequest() core.Coder

func (ReqPostReportRoom) NewResponse

func (ReqPostReportRoom) NewResponse(code int) core.Coder

func (ReqPostReportRoom) Process

func (ReqPostReportRoom) Process(ctx context.Context, consumer interface{}, msg core.Coder, device *authtypes.Device) (int, core.Coder)

type ReqPutSendToDevice

type ReqPutSendToDevice struct{}

func (ReqPutSendToDevice) FillRequest

func (ReqPutSendToDevice) FillRequest(coder core.Coder, req *http.Request, vars map[string]string) error

func (ReqPutSendToDevice) GetAPIType

func (ReqPutSendToDevice) GetAPIType() int8

func (ReqPutSendToDevice) GetMethod

func (ReqPutSendToDevice) GetMethod() []string

func (ReqPutSendToDevice) GetMetricsName

func (ReqPutSendToDevice) GetMetricsName() string

func (ReqPutSendToDevice) GetMsgType

func (ReqPutSendToDevice) GetMsgType() int32

func (ReqPutSendToDevice) GetPrefix

func (ReqPutSendToDevice) GetPrefix() []string

func (ReqPutSendToDevice) GetRoute

func (ReqPutSendToDevice) GetRoute() string

func (ReqPutSendToDevice) GetTopic

func (ReqPutSendToDevice) GetTopic(cfg *config.Dendrite) string

func (ReqPutSendToDevice) NewRequest

func (ReqPutSendToDevice) NewRequest() core.Coder

func (ReqPutSendToDevice) NewResponse

func (ReqPutSendToDevice) NewResponse(code int) core.Coder

func (ReqPutSendToDevice) Process

func (ReqPutSendToDevice) Process(ctx context.Context, consumer interface{}, msg core.Coder, device *authtypes.Device) (int, core.Coder)

type ResponseInitialSync

type ResponseInitialSync struct {
	End         string                          `json:"end"`
	Presence    []gomatrixserverlib.ClientEvent `json:"presence"`
	Rooms       []syncapitypes.RoomInfo         `json:"rooms"`
	AccountData []gomatrixserverlib.ClientEvent `json:"account_data"`
}

Response represents a /initialSync API response

func (*ResponseInitialSync) Decode

func (p *ResponseInitialSync) Decode(input []byte) error

func (*ResponseInitialSync) Encode

func (p *ResponseInitialSync) Encode() ([]byte, error)

Jump to

Keyboard shortcuts

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