Add push server component template

This commit is contained in:
Neil Alexander 2021-05-05 11:45:28 +01:00
parent 092edee210
commit 6843c3beee
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
22 changed files with 487 additions and 0 deletions

View file

@ -0,0 +1,36 @@
package internal
import (
"context"
"github.com/matrix-org/dendrite/pushserver/api"
"github.com/matrix-org/dendrite/pushserver/storage"
"github.com/matrix-org/dendrite/setup/config"
)
// PushserverInternalAPI implements api.PushserverInternalAPI
type PushserverInternalAPI struct {
DB storage.Database
Cfg *config.PushServer
}
func NewPushserverAPI(
cfg *config.PushServer, pushserverDB storage.Database,
) *PushserverInternalAPI {
a := &PushserverInternalAPI{
DB: pushserverDB,
Cfg: cfg,
}
return a
}
// SetRoomAlias implements RoomserverAliasAPI
func (p *PushserverInternalAPI) QueryExample(
ctx context.Context,
request *api.QueryExampleRequest,
response *api.QueryExampleResponse,
) error {
// Implement QueryExample here!
return nil
}