Add boilerplate for key server APIs (#1196)

Also add a README which outilnes how things will work.
This commit is contained in:
Kegsay 2020-07-13 16:02:35 +01:00 committed by GitHub
parent 3178afde2c
commit 396219ef53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 312 additions and 68 deletions

View file

@ -24,9 +24,9 @@ func main() {
base := setup.NewBaseDendrite(cfg, "KeyServer", true)
defer base.Close() // nolint: errcheck
userAPI := base.UserAPIClient()
intAPI := keyserver.NewInternalAPI()
keyserver.AddPublicRoutes(base.PublicAPIMux, base.Cfg, userAPI)
keyserver.AddInternalRoutes(base.InternalAPIMux, intAPI)
base.SetupAndServeHTTP(string(base.Cfg.Bind.KeyServer), string(base.Cfg.Listen.KeyServer))