importer

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Importer

type Importer interface {
	Import(ctx context.Context) error
}

Importer is an interface satisfied by anything that can import data into SpiceDB

type PostgresImporter

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

PostgresImporter will import data from postgres into SpiceDB. It knows how to convert data into relationships with its TableMapping.

func NewPostgresImporter

func NewPostgresImporter(conn *pgxpool.Pool, writer write.RelationshipWriter, mapping []config.TableMapping) *PostgresImporter

NewPostgresImporter returns a new instance of a postgres importer

func (*PostgresImporter) Import

func (i *PostgresImporter) Import(ctx context.Context) error

Import walks through each table in the config and writes relationships

Jump to

Keyboard shortcuts

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