identity

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

This section is empty.

Types

type Context

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

Context is more or less a less-generic context store to use in place of a generic context store since golang doesnt support generics (yet?).

type Matrix

type Matrix struct {
	// TODO: Use a more robust database
	Database *store.InMemory
}

Matrix implements the Router and Context interface. TODO: This is a shortcut implementation of "Matrix" since we are only supporting identity services and not the entire matrix protocol. We should consider moving this down the folder tree somewhere to make more sense

func (*Matrix) AddDatabase

func (m *Matrix) AddDatabase(d *store.InMemory)

AddDatabase allows another thing to add a store.InMemory database to use. TODO: Support multiple databases?

func (*Matrix) GetDatabase

func (m *Matrix) GetDatabase() (*store.InMemory, error)

GetDatabase returns the database context.

func (*Matrix) Routes

func (m *Matrix) Routes() []*server.Route

Routes provides a list of routes that this Router will answer to.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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