store

package
v0.0.0-...-8895ee5 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package store declares the data stores used to persist and manage collections of domain objects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithAccounts

func WithAccounts(ctx context.Context, s AccountsStore) context.Context

func WithPassword

func WithPassword(ctx context.Context, s PasswordStore) context.Context

func WithStores

func WithStores(ctx context.Context, s Stores) context.Context

Types

type AccountsStore

type AccountsStore interface {
	Create(ctx context.Context, newUser *api.User, email *api.EmailAddress) (*api.User, error)
}

func Accounts

func Accounts(ctx context.Context) AccountsStore

type PasswordStore

type PasswordStore interface {
	SetPassword(ctx context.Context, ID string, password string) error
}

func Password

func Password(ctx context.Context) PasswordStore

type Stores

type Stores struct {
	Accounts AccountsStore
	Password PasswordStore
}

type UserNotFoundError

type UserNotFoundError struct {
	Login string
	ID    string
}

func (*UserNotFoundError) Error

func (e *UserNotFoundError) Error() string

type UsersStore

type UsersStore interface {
	Get(ctx context.Context, spec api.UserSpec) (*api.User, error)
}

Directories

Path Synopsis
Package mongostore implements stores declared in the top-level stores package.
Package mongostore implements stores declared in the top-level stores package.

Jump to

Keyboard shortcuts

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