Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewErrorMessage ¶
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 ObjectReadSeekCloser ¶
type ObjectReadSeekCloser struct {
// contains filtered or unexported fields
}
ObjectReadSeekCloser implements ReadSeekCloser interface for reading objects. It uses a function that returns a io.ReadCloser for the object.
func NewObjectReadSeekCloser ¶
func NewObjectReadSeekCloser(segmentReader ObjectSegmentReaderFn, actualSize int64) *ObjectReadSeekCloser
NewObjectReadSeekCloser creates a new ObjectReadSeekCloser.
func (*ObjectReadSeekCloser) Close ¶
func (rsc *ObjectReadSeekCloser) Close() error
Close call to implement io.Closer. Calling Read/Seek after Close reopens the object for reading and a subsequent Close call is required to ensure resources are freed.
type ObjectSegmentReaderFn ¶
type ObjectSegmentReaderFn func(offset int64) (io.ReadCloser, error)
ObjectSegmentReaderFn is a function that returns a reader for a contiguous suffix segment of an object starting at the given (non-negative) offset.
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"` ScanRange *ScanRange `xml:"ScanRange"` // 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 ¶
NewS3Select - creates new S3Select by given request XML reader.
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(rsc io.ReadSeekCloser) error
Open - opens S3 object by using callback for SQL selection query. Currently CSV, JSON and Apache Parquet formats are supported.
func (*S3Select) UnmarshalXML ¶
UnmarshalXML - decodes XML data.
type ScanRange ¶
type ScanRange struct { // Start is the byte offset to read from (from the start of the file). Start *uint64 `xml:"Start"` // End is the offset of the last byte that should be returned when Start // is set, otherwise it is the offset from EOF to start reading. End *uint64 `xml:"End"` }
ScanRange represents the ScanRange parameter.
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.