backend

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fetcher

type Fetcher interface {
	FetchWallet(path string) (types.Wallet, error)
	FetchAccount(path string) (types.Account, error)
}

func NewMemFetcher

func NewMemFetcher(stores []types.Store) Fetcher

NewMemFetcher creates a new in-memory fetcher.

type MemFetcher

type MemFetcher struct {
	// contains filtered or unexported fields
}

MemFetcher contains an in-memory cache of wallets and accounts.

func (*MemFetcher) FetchAccount

func (f *MemFetcher) FetchAccount(path string) (types.Account, error)

FetchAccount fetches the account.

func (*MemFetcher) FetchWallet

func (f *MemFetcher) FetchWallet(path string) (types.Wallet, error)

FetchWallet fetches the wallet.

type Ruler

type Ruler interface {
	Rules(request string, account string) []*core.Rule
}

Ruler provides rules matching a path that must succeed before operations can proceed.

func NewStaticRuler

func NewStaticRuler(rules []*core.Rule) Ruler

NewStaticruler creates a new static ruler.

type StaticRuler

type StaticRuler struct {
	// contains filtered or unexported fields
}

StaticRuler contains a static list of rules.

func (*StaticRuler) Rules

func (r *StaticRuler) Rules(request string, account string) []*core.Rule

Rules fetches matching rules.

Jump to

Keyboard shortcuts

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