base

package
v2.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Name

func Name() string

Name returns the name of the connector

func NewConnector

func NewConnector(next dosa.Connector) dosa.Connector

NewConnector creates new base Connector

Types

type Connector

type Connector struct {
	Next dosa.Connector
}

Connector always calls Next Connector in all the functions

func (*Connector) CheckSchema

func (c *Connector) CheckSchema(ctx context.Context, scope, namePrefix string, ed []*dosa.EntityDefinition) (int32, error)

CheckSchema calls Next

func (*Connector) CheckSchemaStatus

func (c *Connector) CheckSchemaStatus(ctx context.Context, scope string, namePrefix string, version int32) (*dosa.SchemaStatus, error)

CheckSchemaStatus calls Next

func (*Connector) CreateIfNotExists

func (c *Connector) CreateIfNotExists(ctx context.Context, ei *dosa.EntityInfo, values map[string]dosa.FieldValue) error

CreateIfNotExists calls Next

func (*Connector) CreateScope

func (c *Connector) CreateScope(ctx context.Context, scope string) error

CreateScope calls Next

func (*Connector) DropScope

func (c *Connector) DropScope(ctx context.Context, scope string) error

DropScope calls Next

func (*Connector) MultiRead

func (c *Connector) MultiRead(ctx context.Context, ei *dosa.EntityInfo, values []map[string]dosa.FieldValue, minimumFields []string) ([]*dosa.FieldValuesOrError, error)

MultiRead calls Next

func (*Connector) MultiRemove

func (c *Connector) MultiRemove(ctx context.Context, ei *dosa.EntityInfo, multiValues []map[string]dosa.FieldValue) ([]error, error)

MultiRemove calls Next

func (*Connector) MultiUpsert

func (c *Connector) MultiUpsert(ctx context.Context, ei *dosa.EntityInfo, values []map[string]dosa.FieldValue) ([]error, error)

MultiUpsert calls Next

func (*Connector) Range

func (c *Connector) Range(ctx context.Context, ei *dosa.EntityInfo, columnConditions map[string][]*dosa.Condition, minimumFields []string, token string, limit int) ([]map[string]dosa.FieldValue, string, error)

Range calls Next

func (*Connector) Read

func (c *Connector) Read(ctx context.Context, ei *dosa.EntityInfo, values map[string]dosa.FieldValue, minimumFields []string) (map[string]dosa.FieldValue, error)

Read calls Next

func (*Connector) Remove

func (c *Connector) Remove(ctx context.Context, ei *dosa.EntityInfo, values map[string]dosa.FieldValue) error

Remove calls Next

func (*Connector) RemoveRange

func (c *Connector) RemoveRange(ctx context.Context, ei *dosa.EntityInfo, columnConditions map[string][]*dosa.Condition) error

RemoveRange calls Next.

func (*Connector) Scan

func (c *Connector) Scan(ctx context.Context, ei *dosa.EntityInfo, minimumFields []string, token string, limit int) ([]map[string]dosa.FieldValue, string, error)

Scan calls Next

func (*Connector) ScopeExists

func (c *Connector) ScopeExists(ctx context.Context, scope string) (bool, error)

ScopeExists calls Next

func (*Connector) Search

func (c *Connector) Search(ctx context.Context, ei *dosa.EntityInfo, fieldPairs dosa.FieldNameValuePair, minimumFields []string, token string, limit int) ([]map[string]dosa.FieldValue, string, error)

Search calls Next

func (*Connector) Shutdown

func (c *Connector) Shutdown() error

Shutdown always returns nil

func (*Connector) TruncateScope

func (c *Connector) TruncateScope(ctx context.Context, scope string) error

TruncateScope calls Next

func (*Connector) Upsert

func (c *Connector) Upsert(ctx context.Context, ei *dosa.EntityInfo, values map[string]dosa.FieldValue) error

Upsert calls Next

func (*Connector) UpsertSchema

func (c *Connector) UpsertSchema(ctx context.Context, scope, namePrefix string, ed []*dosa.EntityDefinition) (*dosa.SchemaStatus, error)

UpsertSchema calls Next

type ErrNoMoreConnector

type ErrNoMoreConnector struct {
}

ErrNoMoreConnector is used when there is no more next connector

func (ErrNoMoreConnector) Error

func (e ErrNoMoreConnector) Error() string

Error satisfies the error interface.

Jump to

Keyboard shortcuts

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