format

package
v0.0.0-...-b5280ba Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCSVParsingError = errors.New("Encountered an Error parsing the CSV file. Check the file and try again")

ErrCSVParsingError is an error if the CSV presents an error while being parsed.

View Source
var ErrInvalidColumnIndex = errors.New("Column index in the SQL expression is invalid")

ErrInvalidColumnIndex is an error if you provide a column index which is not valid.

View Source
var ErrJSONParsingError = errors.New("Encountered an error parsing the JSON file. Check the file and try again")

ErrJSONParsingError is an error if while parsing the JSON an error arises.

View Source
var ErrParseInvalidPathComponent = errors.New("The SQL expression contains an invalid path component")

ErrParseInvalidPathComponent is an error that occurs if there is an invalid path component.

View Source
var ErrTruncatedInput = errors.New("Object decompression failed. Check that the object is properly compressed using the format specified in the request")

ErrTruncatedInput is an error if the object is not compressed properly and an error occurs during decompression.

Functions

func IsInt

func IsInt(s string) bool

IsInt - returns a true or false, whether a string can be represented as an int.

func ProcessSize

func ProcessSize(myrecord []string) int64

ProcessSize - this function processes size so that we can calculate bytes BytesProcessed.

func StringInSlice

func StringInSlice(x string, list []string) bool

StringInSlice - this function finds whether a string is in a list

Types

type Progress

type Progress struct {
	XMLName        xml.Name `xml:"Progress" json:"-"`
	BytesScanned   int64    `xml:"BytesScanned"`
	BytesProcessed int64    `xml:"BytesProcessed"`
	BytesReturned  int64    `xml:"BytesReturned"`
}

Progress represents a struct that represents the format for XML of the progress messages

type Select

type Select interface {
	Type() Type
	OutputType() Type
	Read() ([]byte, error)
	Header() []string
	HasHeader() bool
	OutputFieldDelimiter() string
	OutputRecordDelimiter() string
	UpdateBytesProcessed(int64)
	Expression() string
	UpdateBytesReturned(int64)
	CreateStatXML() (string, error)
	CreateProgressXML() (string, error)
	ColNameErrs(columnNames []string) error
	Progress() bool
}

Select Interface helper methods, implementing features needed for https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectSELECTContent.html

type Stats

type Stats struct {
	XMLName        xml.Name `xml:"Stats" json:"-"`
	BytesScanned   int64    `xml:"BytesScanned"`
	BytesProcessed int64    `xml:"BytesProcessed"`
	BytesReturned  int64    `xml:"BytesReturned"`
}

Stats represents a struct that represents the format for XML of the stat messages

type Type

type Type string

Type different types of support data format types.

const (
	JSON Type = "json"
	CSV  Type = "csv"
)

Different data format types.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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