export

package
v0.0.0-...-50cc704 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TimestampFormat = "20060102T150405"
)

Variables

This section is empty.

Functions

func Tar

func Tar(
	ctx context.Context,
	src string,
	compress bool,
	writers ...io.Writer,
) error

Tar takes a source and variable writers and walks 'source' writing each file found to the tar writer; the purpose for accepting multiple writers is to allow for multiple outputs (for example a file, or md5 hash)

Types

type BigQueryDatasetExport

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

func (*BigQueryDatasetExport) Export

func (bqe *BigQueryDatasetExport) Export(ctx context.Context, l *slog.Logger) (string, error)

type BigQueryDatasetExportConfig

type BigQueryDatasetExportConfig struct {
	BucketName      string
	ProjectID       string
	GCSLocation     string
	FilterAfter     time.Time
	ExcludePatterns []string
	Storage         Storage
}

type ContentfulExport

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

func NewContentfulExport

func NewContentfulExport(_ context.Context, config ContentfulExportConfig) (*ContentfulExport, error)

func (*ContentfulExport) Export

func (ce *ContentfulExport) Export(ctx context.Context, writer io.Writer) error

sh "contentful-cli space export --use-verbose-renderer --management-token='${token}' --space-id=${spaceID} --export-dir=/backups --max-allowed-limit=100"

type ContentfulExportConfig

type ContentfulExportConfig struct {
	ManagementToken string
	SpaceID         string
}

type GitHubExport

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

func NewGitExport

func NewGitExport(_ context.Context, config GitHubExportConfig) (*GitHubExport, error)

func (*GitHubExport) Export

func (ge *GitHubExport) Export(ctx context.Context, writer io.Writer) error

Exports Tarball

type GitHubExportConfig

type GitHubExportConfig struct {
	Organization string
	Repository   string
	GithubToken  string
	Branch       string
	Client       *http.Client
}

type MongoExport

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

func NewMongoExport

func NewMongoExport(_ context.Context, config MongoExportConfig) (*MongoExport, error)

func (*MongoExport) Export

func (export *MongoExport) Export(ctx context.Context, writer io.Writer) error

type MongoExportConfig

type MongoExportConfig struct {
	MongoURI               string // Required
	AuthenticationDatabase string
	MongoReadPreference    string
	Username               string
	Password               string
}

type Storage

type Storage interface {
	NewWriter(ctx context.Context, path string) (writer io.WriteCloser, err error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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