v1

package
v0.0.0-...-a44c3a2 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2020 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Routes

func Routes(c Context) []*server.Route

Routes provides a list of routes that this Router will answer to. TODO: This is essentially an init func for V1 class, maybe it shouldnt be

Types

type Context

type Context interface {
	GetDatabase() (*store.InMemory, error)
}

Context provides any state context for V1 routes. TODO: Add better support for a generic list of context

type Key

type Key struct {
}

Key is a simple JSON response object that carries a unpadded Base64 public key.

type Status

type Status struct {
}

Status is a simple JSON response object. TODO: Add process metrics to monitor the server

type V1

type V1 struct {
	Context
}

V1 implementation for the routes

func (*V1) GetEmphemeralKeyValidity

func (v *V1) GetEmphemeralKeyValidity(c echo.Context) error

GetEmphemeralKeyValidity checks the validity of an emphemeral key.

GET /v1/pubkey/emphemeral/isvalid

Query Parameters:

References: https://matrix.org/docs/spec/identity_service/r0.2.1#get-matrix-identity-api-v1-pubkey-ephemeral-isvalid

func (*V1) GetKey

func (v *V1) GetKey(c echo.Context) error

GetKey is used to get the public key passed by :key

GET /v1/pubkey/:id

Parameters:

:id - Required. The ID of the key. This should take the form algorithm:identifier where algorithm identifies the signing algorithm, and the identifier is an opaque string.

Reference: https://matrix.org/docs/spec/identity_service/r0.2.1#id12

func (*V1) GetKeyValidity

func (v *V1) GetKeyValidity(c echo.Context) error

GetKeyValidity checks the validity of a public key.

GET /v1/pubkey/isvalid GET /v1/pubkey/emphemeral/isvalid

Query Parameters:

References: https://matrix.org/docs/spec/identity_service/r0.2.1#get-matrix-identity-api-v1-pubkey-isvalid

func (*V1) GetLookup

func (v *V1) GetLookup(c echo.Context) error

GetLookup is a lookup request to find a particular ThreePID.

GET /v1/lookup

Reference: https://matrix.org/docs/spec/identity_service/r0.2.1#get-matrix-identity-api-v1-lookup

func (*V1) GetStatus

func (v *V1) GetStatus(c echo.Context) error

GetStatus is used for auto-discovery and health checks.

func (*V1) PostBulkLookup

func (v *V1) PostBulkLookup(c echo.Context) error

PostBulkLookup allows one to lookup many ThreePID's.

POST /v1/bulk_lookup

Post Parameters:

threepids - Required. An array of tuples comprised of 3PID type and the address to look up.

Reference: https://matrix.org/docs/spec/identity_service/r0.2.1#post-matrix-identity-api-v1-bulk-lookup

Jump to

Keyboard shortcuts

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