keystore

package
v0.0.0-...-ccb75e7 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2019 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 Config

type Config struct {
	DBPath string `yaml:"dbPath"`
}

Config contains indexer configs

type KeyStore

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

KeyStore handles front end requests

func NewKeyStore

func NewKeyStore(store s.Store) *KeyStore

NewKeyStore creates a new keystore

func (*KeyStore) CreateTablesIfNotExist

func (ks *KeyStore) CreateTablesIfNotExist() error

CreateTablesIfNotExist creates tables in local database

func (*KeyStore) GetReview

func (ks *KeyStore) GetReview(protocolID string, reviewID uint64) (*protocol.Review, error)

GetReview gets a review from the underlying db

func (*KeyStore) PutReview

func (ks *KeyStore) PutReview(ctx context.Context, protocolID string, reviewInput *protocol.ReviewInput) (*protocol.Review, error)

PutReview inserts a new review into the underlying db

func (*KeyStore) RegisterDefaultProtocols

func (ks *KeyStore) RegisterDefaultProtocols() error

RegisterDefaultProtocols registers default protocols to the keystore

func (*KeyStore) RegisterProtocol

func (ks *KeyStore) RegisterProtocol(protocolID string, protocol protocol.Protocol) error

RegisterProtocol registers a protocol to the indexer

func (*KeyStore) Start

func (ks *KeyStore) Start(ctx context.Context) error

Start starts the keystore

func (*KeyStore) Stop

func (ks *KeyStore) Stop(ctx context.Context) error

Stop stops the indexer

Jump to

Keyboard shortcuts

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