postgres

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package postgres provides functions required to export data to PostgreSQL.

Index

Constants

View Source
const (
	// Name contains name of the exporter.
	Name = "postgres"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporter

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

Exporter is an instance of Postgres Exporter.

func NewExporter

func NewExporter(sqlDB *sql.DB, uploadPayloads bool) (*Exporter, error)

NewExporter creates new Postregre exporter and all the necessary tables, if they don't exist.

func (*Exporter) Export

func (e *Exporter) Export(ctx context.Context, sourceRepoName, sourceRepoPath, sourceID, sourceHash, sourcePath, sourceDescription string, samples []common.Sample) error

Export exports extracted data to PostgreSQL instance.

func (*Exporter) Name

func (e *Exporter) Name() string

Name returns exporter name.

Jump to

Keyboard shortcuts

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