s3select

package
v0.0.0-...-d8f8204 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewErrorMessage

func NewErrorMessage(errorCode, errorMessage string) []byte

NewErrorMessage - creates new Request Level Error Message specified in https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectSELECTContent.html.

Types

type CompressionType

type CompressionType string

CompressionType - represents value inside <CompressionType/> in request XML.

func (*CompressionType) UnmarshalXML

func (c *CompressionType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML - decodes XML data.

type InputSerialization

type InputSerialization struct {
	CompressionType CompressionType    `xml:"CompressionType"`
	CSVArgs         csv.ReaderArgs     `xml:"CSV"`
	JSONArgs        json.ReaderArgs    `xml:"JSON"`
	ParquetArgs     parquet.ReaderArgs `xml:"Parquet"`
	// contains filtered or unexported fields
}

InputSerialization - represents elements inside <InputSerialization/> in request XML.

func (*InputSerialization) IsEmpty

func (input *InputSerialization) IsEmpty() bool

IsEmpty - returns whether input serialization is empty or not.

func (*InputSerialization) UnmarshalXML

func (input *InputSerialization) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML - decodes XML data.

type OutputSerialization

type OutputSerialization struct {
	CSVArgs  csv.WriterArgs  `xml:"CSV"`
	JSONArgs json.WriterArgs `xml:"JSON"`
	// contains filtered or unexported fields
}

OutputSerialization - represents elements inside <OutputSerialization/> in request XML.

func (*OutputSerialization) IsEmpty

func (output *OutputSerialization) IsEmpty() bool

IsEmpty - returns whether output serialization is empty or not.

func (*OutputSerialization) UnmarshalXML

func (output *OutputSerialization) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML - decodes XML data.

type RequestProgress

type RequestProgress struct {
	Enabled bool `xml:"Enabled"`
}

RequestProgress - represents elements inside <RequestProgress/> in request XML.

type S3Select

type S3Select struct {
	XMLName        xml.Name            `xml:"SelectRequest"`
	Expression     string              `xml:"Expression"`
	ExpressionType string              `xml:"ExpressionType"`
	Input          InputSerialization  `xml:"InputSerialization"`
	Output         OutputSerialization `xml:"OutputSerialization"`
	Progress       RequestProgress     `xml:"RequestProgress"`
	// contains filtered or unexported fields
}

S3Select - filters the contents on a simple structured query language (SQL) statement. It represents elements inside <SelectRequest/> in request XML specified in detail at https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectSELECTContent.html.

func NewS3Select

func NewS3Select(r io.Reader) (*S3Select, error)

NewS3Select - creates new S3Select by given request XML reader.

func (*S3Select) Close

func (s3Select *S3Select) Close() error

Close - closes opened S3 object.

func (*S3Select) Evaluate

func (s3Select *S3Select) Evaluate(w http.ResponseWriter)

Evaluate - filters and sends records read from opened reader as per select statement to http response writer.

func (*S3Select) Open

func (s3Select *S3Select) Open(getReader func(offset, length int64) (io.ReadCloser, error)) error

Open - opens S3 object by using callback for SQL selection query. Currently CSV, JSON and Apache Parquet formats are supported.

func (*S3Select) UnmarshalXML

func (s3Select *S3Select) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML - decodes XML data.

type SelectError

type SelectError interface {
	Cause() error
	ErrorCode() string
	ErrorMessage() string
	HTTPStatusCode() int
	Error() string
}

SelectError - represents s3 select error specified in https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectSELECTContent.html#RESTObjectSELECTContent-responses-special-errors.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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