sequence

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Status

func Status(s Storage, u Updator) ([]Sequence, *Error)

Status retrun sequence with its current status

Types

type Error

type Error struct {
	Description string
}

func Extract

func Extract(e Updator, tables []Table, s Storage) *Error

func Update

func Update(s Storage, u Updator) *Error

type Sequence

type Sequence struct {
	Name   string
	Table  string
	Column string
	Value  int
}

type Storage

type Storage interface {
	List() ([]Sequence, *Error)
	Store(sequences []Sequence) *Error
}

Storage allows to store and retrieve sequences objects.

type Table

type Table struct {
	Name string
	Keys []string
}

type Updator

type Updator interface {
	Extract() ([]string, *Error)
	Status(sequence Sequence) (Sequence, *Error)
	Update([]Sequence) *Error
}

Updator allows to extract sequence from a relational database.

type UpdatorFactory

type UpdatorFactory interface {
	New(url string, schema string) Updator
}

UpdatorFactory exposes methods to create new Updators.

Jump to

Keyboard shortcuts

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