graph

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Destination

type Destination interface {
	Write(context.Context, <-chan *api.Record) <-chan *api.RecordStatus
	Error() error
}

type Error

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

func MalformedDataError

func MalformedDataError() Error

func NewDataError

func NewDataError(msg string, err ...error) *Error

func NewDatabaseError

func NewDatabaseError(err error) *Error

func NewModelError

func NewModelError(err error) *Error

func NoDataError

func NoDataError() Error

func UnexpectedRowCountError

func UnexpectedRowCountError() Error

func (*Error) IsDataError

func (err *Error) IsDataError() bool

func (*Error) IsDatabaseError

func (err *Error) IsDatabaseError() bool

func (*Error) IsModelError

func (err *Error) IsModelError() bool

func (*Error) Unwrap

func (e *Error) Unwrap() error

type Factory

type Factory interface {
	Build(ctx context.Context, m *Model) (Graph, error)
	Close(ctx context.Context) error
}

type Filter

type Filter struct {
	Key      string
	Operator FilterOperator
	Value    interface{}
}

type FilterOperator

type FilterOperator string
const (
	GreaterThanFilterOperator FilterOperator = "GreaterThan"
	EqualFilterOperator       FilterOperator = "Equal"
	InOperator                FilterOperator = "In"
	NotInOperator             FilterOperator = "NotIn"
)

type Graph

type Graph interface {
	Source(peer string, filters ...Filter) Source
	Destination() Destination
}

type Model

type Model struct {
	Name     string
	Table    Table
	IsSet    bool
	ChildKey string
	Children []Model
	Filters  []string
}

type Source

type Source interface {
	Fetch(ctx context.Context) <-chan *api.Record
	Error() error
	SetStatus(context.Context, ...*api.RecordStatus) error
}

type Table

type Table struct {
	Name          string
	KeyField      string
	SequenceField string
	PriorityField string
	VersionField  string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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