s3api

package
v0.0.0-...-2206af0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: Apache-2.0 Imports: 47 Imported by: 0

README

see https://blog.aqwari.net/xml-schema-go/

1. go get aqwari.net/xml/cmd/xsdgen
2. xsdgen -o s3api_xsd_generated.go -pkg s3api AmazonS3.xsd



Documentation

Index

Constants

View Source
const (
	ACTION_READ  = "Read"
	ACTION_WRITE = "Write"
	ACTION_ADMIN = "Admin"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessControlList

type AccessControlList struct {
	Grant []Grant `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Grant,omitempty"`
}

type AccessControlPolicy

type AccessControlPolicy struct {
	Owner             CanonicalUser     `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Owner"`
	AccessControlList AccessControlList `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AccessControlList"`
}

type Action

type Action string

type AmazonCustomerByEmail

type AmazonCustomerByEmail struct {
	EmailAddress string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ EmailAddress"`
}

type BucketLoggingStatus

type BucketLoggingStatus struct {
	LoggingEnabled LoggingSettings `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LoggingEnabled,omitempty"`
}

type CanonicalUser

type CanonicalUser struct {
	ID          string `xml:"ID"`
	DisplayName string `xml:"DisplayName,omitempty"`
}

type CompleteMultipartUploadResult

type CompleteMultipartUploadResult struct {
	XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CompleteMultipartUploadResult"`
	s3.CompleteMultipartUploadOutput
}

type CopyObject

type CopyObject struct {
	SourceBucket                string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ SourceBucket"`
	SourceKey                   string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ SourceKey"`
	DestinationBucket           string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ DestinationBucket"`
	DestinationKey              string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ DestinationKey"`
	MetadataDirective           MetadataDirective `xml:"http://s3.amazonaws.com/doc/2006-03-01/ MetadataDirective,omitempty"`
	Metadata                    []MetadataEntry   `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Metadata,omitempty"`
	AccessControlList           AccessControlList `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AccessControlList,omitempty"`
	CopySourceIfModifiedSince   time.Time         `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CopySourceIfModifiedSince,omitempty"`
	CopySourceIfUnmodifiedSince time.Time         `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CopySourceIfUnmodifiedSince,omitempty"`
	CopySourceIfMatch           []string          `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CopySourceIfMatch,omitempty"`
	CopySourceIfNoneMatch       []string          `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CopySourceIfNoneMatch,omitempty"`
	StorageClass                StorageClass      `xml:"http://s3.amazonaws.com/doc/2006-03-01/ StorageClass,omitempty"`
	AWSAccessKeyId              string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"`
	Timestamp                   time.Time         `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"`
	Signature                   string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"`
	Credential                  string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"`
}

func (*CopyObject) MarshalXML

func (t *CopyObject) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*CopyObject) UnmarshalXML

func (t *CopyObject) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type CopyObjectResponse

type CopyObjectResponse struct {
	CopyObjectResult CopyObjectResult `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CopyObjectResult"`
}

type CopyObjectResult

type CopyObjectResult struct {
	LastModified time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LastModified"`
	ETag         string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ETag"`
}

func (*CopyObjectResult) MarshalXML

func (t *CopyObjectResult) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*CopyObjectResult) UnmarshalXML

func (t *CopyObjectResult) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type CopyPartResult

type CopyPartResult struct {
	LastModified time.Time `xml:"LastModified"`
	ETag         string    `xml:"ETag"`
}

type CreateBucket

type CreateBucket struct {
	Bucket            string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"`
	AccessControlList AccessControlList `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AccessControlList,omitempty"`
	AWSAccessKeyId    string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"`
	Timestamp         time.Time         `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"`
	Signature         string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"`
}

func (*CreateBucket) MarshalXML

func (t *CreateBucket) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*CreateBucket) UnmarshalXML

func (t *CreateBucket) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type CreateBucketConfiguration

type CreateBucketConfiguration struct {
	LocationConstraint string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LocationConstraint"`
}

type CreateBucketResponse

type CreateBucketResponse struct {
	CreateBucketReturn CreateBucketResult `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CreateBucketReturn"`
}

type CreateBucketResult

type CreateBucketResult struct {
	BucketName string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ BucketName"`
}

type Credential

type Credential struct {
	AccessKey string
	SecretKey string
}

type DeleteBucket

type DeleteBucket struct {
	Bucket         string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"`
	AWSAccessKeyId string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"`
	Timestamp      time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"`
	Signature      string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"`
	Credential     string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"`
}

func (*DeleteBucket) MarshalXML

func (t *DeleteBucket) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*DeleteBucket) UnmarshalXML

func (t *DeleteBucket) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type DeleteBucketResponse

type DeleteBucketResponse struct {
	DeleteBucketResponse Status `xml:"http://s3.amazonaws.com/doc/2006-03-01/ DeleteBucketResponse"`
}

type DeleteError

type DeleteError struct {
	Code    string
	Message string
	Key     string
}

DeleteError structure.

type DeleteMarkerEntry

type DeleteMarkerEntry struct {
	Key          string        `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"`
	VersionId    string        `xml:"http://s3.amazonaws.com/doc/2006-03-01/ VersionId"`
	IsLatest     bool          `xml:"http://s3.amazonaws.com/doc/2006-03-01/ IsLatest"`
	LastModified time.Time     `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LastModified"`
	Owner        CanonicalUser `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Owner,omitempty"`
}

func (*DeleteMarkerEntry) MarshalXML

func (t *DeleteMarkerEntry) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*DeleteMarkerEntry) UnmarshalXML

func (t *DeleteMarkerEntry) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type DeleteObject

type DeleteObject struct {
	Bucket         string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"`
	Key            string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"`
	AWSAccessKeyId string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"`
	Timestamp      time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"`
	Signature      string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"`
	Credential     string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"`
}

func (*DeleteObject) MarshalXML

func (t *DeleteObject) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*DeleteObject) UnmarshalXML

func (t *DeleteObject) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type DeleteObjectResponse

type DeleteObjectResponse struct {
	DeleteObjectResponse Status `xml:"http://s3.amazonaws.com/doc/2006-03-01/ DeleteObjectResponse"`
}

type DeleteObjectsRequest

type DeleteObjectsRequest struct {
	// Element to enable quiet mode for the request
	Quiet bool
	// List of objects to be deleted
	Objects []ObjectIdentifier `xml:"Object"`
}

DeleteObjectsRequest - xml carrying the object key names which needs to be deleted.

type DeleteObjectsResponse

type DeleteObjectsResponse struct {
	XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ DeleteResult" json:"-"`

	// Collection of all deleted objects
	DeletedObjects []ObjectIdentifier `xml:"Deleted,omitempty"`

	// Collection of errors deleting certain objects.
	Errors []DeleteError `xml:"Error,omitempty"`
}

DeleteObjectsResponse container for multiple object deletes.

type GetBucketAccessControlPolicy

type GetBucketAccessControlPolicy struct {
	Bucket         string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"`
	AWSAccessKeyId string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"`
	Timestamp      time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"`
	Signature      string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"`
	Credential     string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"`
}

func (*GetBucketAccessControlPolicy) MarshalXML

func (t *GetBucketAccessControlPolicy) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*GetBucketAccessControlPolicy) UnmarshalXML

func (t *GetBucketAccessControlPolicy) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type GetBucketAccessControlPolicyResponse

type GetBucketAccessControlPolicyResponse struct {
	GetBucketAccessControlPolicyResponse AccessControlPolicy `xml:"http://s3.amazonaws.com/doc/2006-03-01/ GetBucketAccessControlPolicyResponse"`
}

type GetBucketLoggingStatus

type GetBucketLoggingStatus struct {
	Bucket         string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"`
	AWSAccessKeyId string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"`
	Timestamp      time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"`
	Signature      string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"`
	Credential     string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"`
}

func (*GetBucketLoggingStatus) MarshalXML

func (t *GetBucketLoggingStatus) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*GetBucketLoggingStatus) UnmarshalXML

func (t *GetBucketLoggingStatus) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type GetBucketLoggingStatusResponse

type GetBucketLoggingStatusResponse struct {
	GetBucketLoggingStatusResponse BucketLoggingStatus `xml:"http://s3.amazonaws.com/doc/2006-03-01/ GetBucketLoggingStatusResponse"`
}

type GetObject

type GetObject struct {
	Bucket         string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"`
	Key            string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"`
	GetMetadata    bool      `xml:"http://s3.amazonaws.com/doc/2006-03-01/ GetMetadata"`
	GetData        bool      `xml:"http://s3.amazonaws.com/doc/2006-03-01/ GetData"`
	InlineData     bool      `xml:"http://s3.amazonaws.com/doc/2006-03-01/ InlineData"`
	AWSAccessKeyId string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"`
	Timestamp      time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"`
	Signature      string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"`
	Credential     string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"`
}

func (*GetObject) MarshalXML

func (t *GetObject) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*GetObject) UnmarshalXML

func (t *GetObject) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type GetObjectAccessControlPolicy

type GetObjectAccessControlPolicy struct {
	Bucket         string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"`
	Key            string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"`
	AWSAccessKeyId string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"`
	Timestamp      time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"`
	Signature      string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"`
	Credential     string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"`
}

func (*GetObjectAccessControlPolicy) MarshalXML

func (t *GetObjectAccessControlPolicy) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*GetObjectAccessControlPolicy) UnmarshalXML

func (t *GetObjectAccessControlPolicy) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type GetObjectAccessControlPolicyResponse

type GetObjectAccessControlPolicyResponse struct {
	GetObjectAccessControlPolicyResponse AccessControlPolicy `xml:"http://s3.amazonaws.com/doc/2006-03-01/ GetObjectAccessControlPolicyResponse"`
}

type GetObjectExtended

type GetObjectExtended struct {
	Bucket                                 string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"`
	Key                                    string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"`
	GetMetadata                            bool      `xml:"http://s3.amazonaws.com/doc/2006-03-01/ GetMetadata"`
	GetData                                bool      `xml:"http://s3.amazonaws.com/doc/2006-03-01/ GetData"`
	InlineData                             bool      `xml:"http://s3.amazonaws.com/doc/2006-03-01/ InlineData"`
	ByteRangeStart                         int64     `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ByteRangeStart,omitempty"`
	ByteRangeEnd                           int64     `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ByteRangeEnd,omitempty"`
	IfModifiedSince                        time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ IfModifiedSince,omitempty"`
	IfUnmodifiedSince                      time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ IfUnmodifiedSince,omitempty"`
	IfMatch                                []string  `xml:"http://s3.amazonaws.com/doc/2006-03-01/ IfMatch,omitempty"`
	IfNoneMatch                            []string  `xml:"http://s3.amazonaws.com/doc/2006-03-01/ IfNoneMatch,omitempty"`
	ReturnCompleteObjectOnConditionFailure bool      `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ReturnCompleteObjectOnConditionFailure,omitempty"`
	AWSAccessKeyId                         string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"`
	Timestamp                              time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"`
	Signature                              string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"`
	Credential                             string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"`
}

func (*GetObjectExtended) MarshalXML

func (t *GetObjectExtended) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*GetObjectExtended) UnmarshalXML

func (t *GetObjectExtended) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type GetObjectExtendedResponse

type GetObjectExtendedResponse struct {
	GetObjectResponse GetObjectResult `xml:"http://s3.amazonaws.com/doc/2006-03-01/ GetObjectResponse"`
}

type GetObjectResponse

type GetObjectResponse struct {
	GetObjectResponse GetObjectResult `xml:"http://s3.amazonaws.com/doc/2006-03-01/ GetObjectResponse"`
}

type GetObjectResult

type GetObjectResult struct {
	Metadata     []MetadataEntry `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Metadata,omitempty"`
	Data         []byte          `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Data,omitempty"`
	LastModified time.Time       `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LastModified"`
	ETag         string          `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ETag"`
	Status       Status          `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Status"`
}

func (*GetObjectResult) MarshalXML

func (t *GetObjectResult) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*GetObjectResult) UnmarshalXML

func (t *GetObjectResult) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type Grant

type Grant struct {
	Grantee    Grantee    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Grantee"`
	Permission Permission `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Permission"`
}

type Grantee

type Grantee struct {
}

type Group

type Group struct {
	URI string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ URI"`
}

type Iam

type Iam interface {
	Check(f http.HandlerFunc, actions ...Action) http.HandlerFunc
}

type Identity

type Identity struct {
	Name        string
	Credentials []*Credential
	Actions     []Action
}

type IdentityAccessManagement

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

func NewIdentityAccessManagement

func NewIdentityAccessManagement(fileName string, domain string) *IdentityAccessManagement

func (*IdentityAccessManagement) Auth

type InitiateMultipartUploadResult

type InitiateMultipartUploadResult struct {
	XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ InitiateMultipartUploadResult"`
	s3.CreateMultipartUploadOutput
}

type ListAllMyBuckets

type ListAllMyBuckets struct {
	AWSAccessKeyId string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"`
	Timestamp      time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"`
	Signature      string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"`
}

func (*ListAllMyBuckets) MarshalXML

func (t *ListAllMyBuckets) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*ListAllMyBuckets) UnmarshalXML

func (t *ListAllMyBuckets) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type ListAllMyBucketsEntry

type ListAllMyBucketsEntry struct {
	Name         string    `xml:"Name"`
	CreationDate time.Time `xml:"CreationDate"`
}

func (*ListAllMyBucketsEntry) MarshalXML

func (t *ListAllMyBucketsEntry) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*ListAllMyBucketsEntry) UnmarshalXML

func (t *ListAllMyBucketsEntry) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type ListAllMyBucketsList

type ListAllMyBucketsList struct {
	Bucket []ListAllMyBucketsEntry `xml:"Bucket,omitempty"`
}

type ListAllMyBucketsResponse

type ListAllMyBucketsResponse struct {
	ListAllMyBucketsResponse ListAllMyBucketsResult `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ListAllMyBucketsResponse"`
}

type ListAllMyBucketsResult

type ListAllMyBucketsResult struct {
	XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ListAllMyBucketsResult"`
	Owner   *s3.Owner
	Buckets []*s3.Bucket `xml:"Buckets>Bucket"`
}

type ListBucket

type ListBucket struct {
	Bucket         string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"`
	Prefix         string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Prefix,omitempty"`
	Marker         string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Marker,omitempty"`
	MaxKeys        int       `xml:"http://s3.amazonaws.com/doc/2006-03-01/ MaxKeys,omitempty"`
	Delimiter      string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Delimiter,omitempty"`
	AWSAccessKeyId string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"`
	Timestamp      time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"`
	Signature      string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"`
	Credential     string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"`
}

func (*ListBucket) MarshalXML

func (t *ListBucket) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*ListBucket) UnmarshalXML

func (t *ListBucket) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type ListBucketResponse

type ListBucketResponse struct {
	ListBucketResponse ListBucketResult `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ListBucketResponse"`
}

type ListBucketResult

type ListBucketResult struct {
	XMLName        xml.Name        `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ListBucketResult"`
	Metadata       []MetadataEntry `xml:"Metadata,omitempty"`
	Name           string          `xml:"Name"`
	Prefix         string          `xml:"Prefix"`
	Marker         string          `xml:"Marker"`
	NextMarker     string          `xml:"NextMarker,omitempty"`
	MaxKeys        int             `xml:"MaxKeys"`
	Delimiter      string          `xml:"Delimiter,omitempty"`
	IsTruncated    bool            `xml:"IsTruncated"`
	Contents       []ListEntry     `xml:"Contents,omitempty"`
	CommonPrefixes []PrefixEntry   `xml:"CommonPrefixes,omitempty"`
}

type ListBucketResultV2

type ListBucketResultV2 struct {
	XMLName               xml.Name      `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ListBucketResult"`
	Name                  string        `xml:"Name"`
	Prefix                string        `xml:"Prefix"`
	MaxKeys               int           `xml:"MaxKeys"`
	Delimiter             string        `xml:"Delimiter,omitempty"`
	IsTruncated           bool          `xml:"IsTruncated"`
	Contents              []ListEntry   `xml:"Contents,omitempty"`
	CommonPrefixes        []PrefixEntry `xml:"CommonPrefixes,omitempty"`
	ContinuationToken     string        `xml:"ContinuationToken,omitempty"`
	NextContinuationToken string        `xml:"NextContinuationToken,omitempty"`
	KeyCount              int           `xml:"KeyCount"`
	StartAfter            string        `xml:"StartAfter,omitempty"`
}

type ListEntry

type ListEntry struct {
	Key          string        `xml:"Key"`
	LastModified time.Time     `xml:"LastModified"`
	ETag         string        `xml:"ETag"`
	Size         int64         `xml:"Size"`
	Owner        CanonicalUser `xml:"Owner,omitempty"`
	StorageClass StorageClass  `xml:"StorageClass"`
}

func (*ListEntry) MarshalXML

func (t *ListEntry) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*ListEntry) UnmarshalXML

func (t *ListEntry) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type ListMultipartUploadsResult

type ListMultipartUploadsResult struct {
	XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ListMultipartUploadsResult"`

	// copied from s3.ListMultipartUploadsOutput, the Uploads is not converting to <Upload></Upload>
	Bucket             *string               `type:"string"`
	Delimiter          *string               `type:"string"`
	EncodingType       *string               `type:"string" enum:"EncodingType"`
	IsTruncated        *bool                 `type:"boolean"`
	KeyMarker          *string               `type:"string"`
	MaxUploads         *int64                `type:"integer"`
	NextKeyMarker      *string               `type:"string"`
	NextUploadIdMarker *string               `type:"string"`
	Prefix             *string               `type:"string"`
	UploadIdMarker     *string               `type:"string"`
	Upload             []*s3.MultipartUpload `locationName:"Upload" type:"list" flattened:"true"`
}

type ListPartsResult

type ListPartsResult struct {
	XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ListPartsResult"`

	// copied from s3.ListPartsOutput, the Parts is not converting to <Part></Part>
	Bucket               *string    `type:"string"`
	IsTruncated          *bool      `type:"boolean"`
	Key                  *string    `min:"1" type:"string"`
	MaxParts             *int64     `type:"integer"`
	NextPartNumberMarker *int64     `type:"integer"`
	PartNumberMarker     *int64     `type:"integer"`
	Part                 []*s3.Part `locationName:"Part" type:"list" flattened:"true"`
	StorageClass         *string    `type:"string" enum:"StorageClass"`
	UploadId             *string    `type:"string"`
}

type ListVersionsResponse

type ListVersionsResponse struct {
	ListVersionsResponse ListVersionsResult `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ListVersionsResponse"`
}

type ListVersionsResult

type ListVersionsResult struct {
	Metadata            []MetadataEntry   `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Metadata,omitempty"`
	Name                string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Name"`
	Prefix              string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Prefix"`
	KeyMarker           string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ KeyMarker"`
	VersionIdMarker     string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ VersionIdMarker"`
	NextKeyMarker       string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ NextKeyMarker,omitempty"`
	NextVersionIdMarker string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ NextVersionIdMarker,omitempty"`
	MaxKeys             int               `xml:"http://s3.amazonaws.com/doc/2006-03-01/ MaxKeys"`
	Delimiter           string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Delimiter,omitempty"`
	IsTruncated         bool              `xml:"http://s3.amazonaws.com/doc/2006-03-01/ IsTruncated"`
	Version             VersionEntry      `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Version"`
	DeleteMarker        DeleteMarkerEntry `xml:"http://s3.amazonaws.com/doc/2006-03-01/ DeleteMarker"`
	CommonPrefixes      []PrefixEntry     `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CommonPrefixes,omitempty"`
}

type LoggingSettings

type LoggingSettings struct {
	TargetBucket string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ TargetBucket"`
	TargetPrefix string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ TargetPrefix"`
	TargetGrants AccessControlList `xml:"http://s3.amazonaws.com/doc/2006-03-01/ TargetGrants,omitempty"`
}

type MetadataDirective

type MetadataDirective string

May be one of COPY, REPLACE

type MetadataEntry

type MetadataEntry struct {
	Name  string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Name"`
	Value string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Value"`
}

type MfaDeleteStatus

type MfaDeleteStatus string

May be one of Enabled, Disabled

type NotificationConfiguration

type NotificationConfiguration struct {
	TopicConfiguration []TopicConfiguration `xml:"http://s3.amazonaws.com/doc/2006-03-01/ TopicConfiguration,omitempty"`
}

type ObjectIdentifier

type ObjectIdentifier struct {
	ObjectName string `xml:"Key"`
}

/ ObjectIdentifier carries key name for the object to delete.

type Payer

type Payer string

May be one of BucketOwner, Requester

type Permission

type Permission string

May be one of READ, WRITE, READ_ACP, WRITE_ACP, FULL_CONTROL

type PostResponse

type PostResponse struct {
	Location string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Location"`
	Bucket   string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"`
	Key      string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"`
	ETag     string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ETag"`
}

type PrefixEntry

type PrefixEntry struct {
	Prefix string `xml:"Prefix"`
}

type PutObject

type PutObject struct {
	Bucket            string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"`
	Key               string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"`
	Metadata          []MetadataEntry   `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Metadata,omitempty"`
	ContentLength     int64             `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ContentLength"`
	AccessControlList AccessControlList `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AccessControlList,omitempty"`
	StorageClass      StorageClass      `xml:"http://s3.amazonaws.com/doc/2006-03-01/ StorageClass,omitempty"`
	AWSAccessKeyId    string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"`
	Timestamp         time.Time         `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"`
	Signature         string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"`
	Credential        string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"`
}

func (*PutObject) MarshalXML

func (t *PutObject) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*PutObject) UnmarshalXML

func (t *PutObject) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type PutObjectInline

type PutObjectInline struct {
	Bucket            string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"`
	Key               string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"`
	Metadata          []MetadataEntry   `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Metadata,omitempty"`
	Data              []byte            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Data"`
	ContentLength     int64             `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ContentLength"`
	AccessControlList AccessControlList `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AccessControlList,omitempty"`
	StorageClass      StorageClass      `xml:"http://s3.amazonaws.com/doc/2006-03-01/ StorageClass,omitempty"`
	AWSAccessKeyId    string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"`
	Timestamp         time.Time         `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"`
	Signature         string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"`
	Credential        string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"`
}

func (*PutObjectInline) MarshalXML

func (t *PutObjectInline) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*PutObjectInline) UnmarshalXML

func (t *PutObjectInline) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type PutObjectInlineResponse

type PutObjectInlineResponse struct {
	PutObjectInlineResponse PutObjectResult `xml:"http://s3.amazonaws.com/doc/2006-03-01/ PutObjectInlineResponse"`
}

type PutObjectResponse

type PutObjectResponse struct {
	PutObjectResponse PutObjectResult `xml:"http://s3.amazonaws.com/doc/2006-03-01/ PutObjectResponse"`
}

type PutObjectResult

type PutObjectResult struct {
	ETag         string    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ETag"`
	LastModified time.Time `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LastModified"`
}

func (*PutObjectResult) MarshalXML

func (t *PutObjectResult) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*PutObjectResult) UnmarshalXML

func (t *PutObjectResult) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type RequestPaymentConfiguration

type RequestPaymentConfiguration struct {
	Payer Payer `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Payer"`
}

type Result

type Result struct {
	Status Status `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Status"`
}

type S3ApiServer

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

func NewS3ApiServer

func NewS3ApiServer(router *mux.Router, option *S3ApiServerOption) (s3ApiServer *S3ApiServer, err error)

func (*S3ApiServer) AbortMultipartUploadHandler

func (s3a *S3ApiServer) AbortMultipartUploadHandler(w http.ResponseWriter, r *http.Request)

AbortMultipartUploadHandler - Aborts multipart upload.

func (*S3ApiServer) AdjustedUrl

func (s3a *S3ApiServer) AdjustedUrl(hostAndPort string) string

func (*S3ApiServer) CompleteMultipartUploadHandler

func (s3a *S3ApiServer) CompleteMultipartUploadHandler(w http.ResponseWriter, r *http.Request)

CompleteMultipartUploadHandler - Completes multipart upload.

func (*S3ApiServer) CopyObjectHandler

func (s3a *S3ApiServer) CopyObjectHandler(w http.ResponseWriter, r *http.Request)

func (*S3ApiServer) CopyObjectPartHandler

func (s3a *S3ApiServer) CopyObjectPartHandler(w http.ResponseWriter, r *http.Request)

func (*S3ApiServer) DeleteBucketHandler

func (s3a *S3ApiServer) DeleteBucketHandler(w http.ResponseWriter, r *http.Request)

func (*S3ApiServer) DeleteMultipleObjectsHandler

func (s3a *S3ApiServer) DeleteMultipleObjectsHandler(w http.ResponseWriter, r *http.Request)

DeleteMultipleObjectsHandler - Delete multiple objects

func (*S3ApiServer) DeleteObjectHandler

func (s3a *S3ApiServer) DeleteObjectHandler(w http.ResponseWriter, r *http.Request)

func (*S3ApiServer) GetObjectHandler

func (s3a *S3ApiServer) GetObjectHandler(w http.ResponseWriter, r *http.Request)

func (*S3ApiServer) HeadBucketHandler

func (s3a *S3ApiServer) HeadBucketHandler(w http.ResponseWriter, r *http.Request)

func (*S3ApiServer) HeadObjectHandler

func (s3a *S3ApiServer) HeadObjectHandler(w http.ResponseWriter, r *http.Request)

func (*S3ApiServer) ListBucketsHandler

func (s3a *S3ApiServer) ListBucketsHandler(w http.ResponseWriter, r *http.Request)

func (*S3ApiServer) ListMultipartUploadsHandler

func (s3a *S3ApiServer) ListMultipartUploadsHandler(w http.ResponseWriter, r *http.Request)

ListMultipartUploadsHandler - Lists multipart uploads.

func (*S3ApiServer) ListObjectPartsHandler

func (s3a *S3ApiServer) ListObjectPartsHandler(w http.ResponseWriter, r *http.Request)

ListObjectPartsHandler - Lists object parts in a multipart upload.

func (*S3ApiServer) ListObjectsV1Handler

func (s3a *S3ApiServer) ListObjectsV1Handler(w http.ResponseWriter, r *http.Request)

func (*S3ApiServer) ListObjectsV2Handler

func (s3a *S3ApiServer) ListObjectsV2Handler(w http.ResponseWriter, r *http.Request)

func (*S3ApiServer) NewMultipartUploadHandler

func (s3a *S3ApiServer) NewMultipartUploadHandler(w http.ResponseWriter, r *http.Request)

NewMultipartUploadHandler - New multipart upload.

func (*S3ApiServer) PutBucketHandler

func (s3a *S3ApiServer) PutBucketHandler(w http.ResponseWriter, r *http.Request)

func (*S3ApiServer) PutBucketPolicyHandler

func (s3a *S3ApiServer) PutBucketPolicyHandler(w http.ResponseWriter, r *http.Request)

func (*S3ApiServer) PutObjectHandler

func (s3a *S3ApiServer) PutObjectHandler(w http.ResponseWriter, r *http.Request)

func (*S3ApiServer) PutObjectPartHandler

func (s3a *S3ApiServer) PutObjectPartHandler(w http.ResponseWriter, r *http.Request)

PutObjectPartHandler - Put an object part in a multipart upload.

func (*S3ApiServer) WithFilerClient

func (s3a *S3ApiServer) WithFilerClient(fn func(filer_pb.SeaweedFilerClient) error) error

type S3ApiServerOption

type S3ApiServerOption struct {
	Filer            string
	Port             int
	FilerGrpcAddress string
	Config           string
	DomainName       string
	BucketsPath      string
	GrpcDialOption   grpc.DialOption
}

type SetBucketAccessControlPolicy

type SetBucketAccessControlPolicy struct {
	Bucket            string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"`
	AccessControlList AccessControlList `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AccessControlList,omitempty"`
	AWSAccessKeyId    string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"`
	Timestamp         time.Time         `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"`
	Signature         string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"`
	Credential        string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"`
}

func (*SetBucketAccessControlPolicy) MarshalXML

func (t *SetBucketAccessControlPolicy) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*SetBucketAccessControlPolicy) UnmarshalXML

func (t *SetBucketAccessControlPolicy) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type SetBucketAccessControlPolicyResponse

type SetBucketAccessControlPolicyResponse struct {
}

type SetBucketLoggingStatus

type SetBucketLoggingStatus struct {
	Bucket              string              `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"`
	AWSAccessKeyId      string              `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"`
	Timestamp           time.Time           `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"`
	Signature           string              `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"`
	Credential          string              `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"`
	BucketLoggingStatus BucketLoggingStatus `xml:"http://s3.amazonaws.com/doc/2006-03-01/ BucketLoggingStatus"`
}

func (*SetBucketLoggingStatus) MarshalXML

func (t *SetBucketLoggingStatus) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*SetBucketLoggingStatus) UnmarshalXML

func (t *SetBucketLoggingStatus) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type SetBucketLoggingStatusResponse

type SetBucketLoggingStatusResponse struct {
}

type SetObjectAccessControlPolicy

type SetObjectAccessControlPolicy struct {
	Bucket            string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Bucket"`
	Key               string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"`
	AccessControlList AccessControlList `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AccessControlList"`
	AWSAccessKeyId    string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AWSAccessKeyId,omitempty"`
	Timestamp         time.Time         `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Timestamp,omitempty"`
	Signature         string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Signature,omitempty"`
	Credential        string            `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Credential,omitempty"`
}

func (*SetObjectAccessControlPolicy) MarshalXML

func (t *SetObjectAccessControlPolicy) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*SetObjectAccessControlPolicy) UnmarshalXML

func (t *SetObjectAccessControlPolicy) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type SetObjectAccessControlPolicyResponse

type SetObjectAccessControlPolicyResponse struct {
}

type Status

type Status struct {
	Code        int    `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Code"`
	Description string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Description"`
}

type StorageClass

type StorageClass string

May be one of STANDARD, REDUCED_REDUNDANCY, GLACIER, UNKNOWN

type TopicConfiguration

type TopicConfiguration struct {
	Topic string   `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Topic"`
	Event []string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Event"`
}

type User

type User struct {
}

type VersionEntry

type VersionEntry struct {
	Key          string        `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Key"`
	VersionId    string        `xml:"http://s3.amazonaws.com/doc/2006-03-01/ VersionId"`
	IsLatest     bool          `xml:"http://s3.amazonaws.com/doc/2006-03-01/ IsLatest"`
	LastModified time.Time     `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LastModified"`
	ETag         string        `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ETag"`
	Size         int64         `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Size"`
	Owner        CanonicalUser `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Owner,omitempty"`
	StorageClass StorageClass  `xml:"http://s3.amazonaws.com/doc/2006-03-01/ StorageClass"`
}

func (*VersionEntry) MarshalXML

func (t *VersionEntry) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*VersionEntry) UnmarshalXML

func (t *VersionEntry) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type VersioningConfiguration

type VersioningConfiguration struct {
	Status    VersioningStatus `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Status,omitempty"`
	MfaDelete MfaDeleteStatus  `xml:"http://s3.amazonaws.com/doc/2006-03-01/ MfaDelete,omitempty"`
}

type VersioningStatus

type VersioningStatus string

May be one of Enabled, Suspended

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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