service

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BleveDocument

type BleveDocument struct {
	Metadata map[string]*proto.Field `json:"metadata"`
	Database string                  `json:"database"`
	Table    string                  `json:"table"`
}

BleveDocument wraps the generated Record.Metadata and adds a property that is used to distinguish documents in the index.

type Option

type Option func(o *Options)

Option defines a single option function.

func Config

func Config(val *config.Config) Option

Config configures the Config option.

func Database

func Database(val *config.Config) Option

Database configures the database option.

func Logger

func Logger(val log.Logger) Option

Logger provides a function to set the logger option.

func Nodes

func Nodes(val *config.Config) Option

Nodes configures the Nodes option.

func Table

func Table(val *config.Config) Option

Table configures the Table option.

type Options

type Options struct {
	Logger log.Logger
	Config *config.Config

	Database, Table string
	Nodes           []string
}

Options defines the available options for this package.

type Service

type Service struct {
	Config *config.Config
	// contains filtered or unexported fields
}

Service implements the AccountsServiceHandler interface

func New

func New(opts ...Option) (s *Service, err error)

New returns a new instance of Service

func (*Service) Databases

func (s *Service) Databases(c context.Context, dbreq *proto.DatabasesRequest, dbres *proto.DatabasesResponse) error

Databases implements the StoreHandler interface.

func (*Service) Delete

func (s *Service) Delete(c context.Context, dreq *proto.DeleteRequest, dres *proto.DeleteResponse) error

Delete implements the StoreHandler interface.

func (*Service) List

func (s *Service) List(context.Context, *proto.ListRequest, proto.Store_ListStream) error

List implements the StoreHandler interface.

func (*Service) Read

func (s *Service) Read(c context.Context, rreq *proto.ReadRequest, rres *proto.ReadResponse) error

Read implements the StoreHandler interface.

func (*Service) Tables

func (s *Service) Tables(ctx context.Context, in *proto.TablesRequest, out *proto.TablesResponse) error

Tables implements the StoreHandler interface.

func (*Service) Write

func (s *Service) Write(c context.Context, wreq *proto.WriteRequest, wres *proto.WriteResponse) error

Write implements the StoreHandler interface.

Jump to

Keyboard shortcuts

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