provider

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: BSD-2-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KaminoProvider

type KaminoProvider struct{}

KaminoProvider implement the Provider interface with action on database and files.

func (*KaminoProvider) NewLoader

func (p *KaminoProvider) NewLoader(ctx context.Context, log *logrus.Entry, ds datasource.Datasourcer, table string, where string) (Loader, error)

NewLoader analyze the datasource and return object implementing Loader of the asked type.

func (*KaminoProvider) NewSaver

func (p *KaminoProvider) NewSaver(ctx context.Context, log *logrus.Entry, ds datasource.Datasourcer, table string, key string, mode string) (Saver, error)

NewSaver analyze the datasource and return object implementing Saver of the asked type.

type Loader

type Loader interface {
	Next() bool
	Load(*logrus.Entry) (types.Record, error)
	Close(*logrus.Entry) error
	Name() string
}

Loader provides way to load record by record.

type Provider

Provider provides Loader and Saver objects adapted to the datasource.

type Saver

type Saver interface {
	Save(*logrus.Entry, types.Record) error
	Close(*logrus.Entry) error
	Reset(*logrus.Entry) error
	Name() string
}

Saver provides way to save record by record.

Directories

Path Synopsis
Package common provides the utility functions and type needed by all specialized step packages
Package common provides the utility functions and type needed by all specialized step packages

Jump to

Keyboard shortcuts

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