format

package
v0.8.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var All = []Format{
	Parquet,
	JSON,
}

All is a variable containing all supported format for enumeration

Functions

This section is empty.

Types

type Format

type Format string

Format defines the format the data will be persisted in by Destination

const (
	// Parquet data format https://parquet.apache.org/
	Parquet Format = "parquet"

	// JSON format
	JSON Format = "json"
)

func Parse

func Parse(name string) (Format, error)

Parse takes a string and returns a corresponding format or an error

func (Format) Ext

func (f Format) Ext() string

Ext returns a preferable file extension for the given format

func (Format) MakeBytes

func (f Format) MakeBytes(records []opencdc.Record) ([]byte, error)

MakeBytes returns a slice of bytes representing records in a given format

func (Format) MimeType

func (f Format) MimeType() string

MimeType returns MIME type (IANA media type or Content-Type) for the format

Jump to

Keyboard shortcuts

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