common

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2025 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Code generated by github.com/hasura/ndc-sdk-go/cmd/hasura-ndc-go, DO NOT EDIT.

Index

Constants

View Source
const (
	HeaderContentType        string = "content-type"
	HeaderCacheControl       string = "cache-control"
	HeaderContentDisposition string = "content-disposition"
	HeaderContentEncoding    string = "content-encoding"
	HeaderContentLanguage    string = "content-language"
)

Variables

This section is empty.

Functions

func CalculateContentMd5

func CalculateContentMd5(reader io.Reader) (io.Reader, []byte, error)

CalculateContentMd5 caculates file content using MD5 algorithm.

func KeyValuesToHeaders added in v0.0.2

func KeyValuesToHeaders(inputs []StorageKeyValue) http.Header

KeyValuesToHeader converts a storage key value slice to a http.Header instance.

func KeyValuesToStringMap added in v0.0.2

func KeyValuesToStringMap(inputs []StorageKeyValue) map[string]string

KeyValuesToStringMap converts a storage key value slice to a string map.

func NewDBSystemAttribute

func NewDBSystemAttribute() attribute.KeyValue

NewDBSystemAttribute creates the detault db.system attribute.

func NewTransport

func NewTransport(transport *http.Transport, options HTTPTransportOptions) http.RoundTripper

NewTransport creates a new HTTP transporter for the storage client.

func SetObjectChecksumSpanAttributes

func SetObjectChecksumSpanAttributes(span trace.Span, object *StorageObjectChecksum)

SetObjectChecksumSpanAttributes sets span attributes from the object checksum.

func SetObjectInfoSpanAttributes

func SetObjectInfoSpanAttributes(span trace.Span, object *StorageObject)

SetObjectInfoSpanAttributes sets span attributes from the object info.

func SetUploadInfoAttributes

func SetUploadInfoAttributes(span trace.Span, object *StorageUploadInfo)

SetUploadInfoAttributes sets span attributes from the upload info.

Types

type BaseClientConfig

type BaseClientConfig struct {
	// The unique identity of a client. Use this setting if there are many configured clients.
	ID string `json:"id,omitempty" mapstructure:"id" yaml:"id,omitempty"`
	// Cloud provider type of the storage client.
	Type StorageProviderType `json:"type" mapstructure:"type" yaml:"type"`
	// Default bucket name to be set if the user doesn't specify any bucket.
	DefaultBucket utils.EnvString `json:"defaultBucket" mapstructure:"defaultBucket" yaml:"defaultBucket"`
	// Endpoint of the storage server. Required for other S3 compatible services such as MinIO, Cloudflare R2, DigitalOcean Spaces, etc...
	Endpoint *utils.EnvString `json:"endpoint,omitempty" mapstructure:"endpoint" yaml:"endpoint,omitempty"`
	// Maximum number of retry times.
	MaxRetries *int `json:"maxRetries,omitempty" mapstructure:"maxRetries" yaml:"maxRetries,omitempty"`
	// The default expiry for presigned URL generation. The maximum expiry is 604800 seconds (i.e. 7 days) and minimum is 1 second.
	DefaultPresignedExpiry *string `json:"defaultPresignedExpiry,omitempty" mapstructure:"defaultPresignedExpiry" yaml:"defaultPresignedExpiry,omitempty"`
	// Allowed buckets. This setting prevents users to get buckets and objects outside the list.
	// However, it's recommended to restrict the permissions for the IAM credentials.
	// This setting is useful to let the connector know which buckets belong to this client.
	// The empty value means all buckets are allowed. The storage server will handle the validation.
	AllowedBuckets []string `json:"allowedBuckets,omitempty" mapstructure:"allowedBuckets" yaml:"allowedBuckets,omitempty"`
}

BaseClientConfig holds common configurations of a storage client

func (BaseClientConfig) GetJSONSchema

func (bcc BaseClientConfig) GetJSONSchema(providerTypes []any) *jsonschema.Schema

GetJSONSchema is used to generate a custom jsonschema.

func (BaseClientConfig) Validate

func (bcc BaseClientConfig) Validate() error

Validate checks if the configration is valid.

func (BaseClientConfig) ValidateEndpoint

func (bcc BaseClientConfig) ValidateEndpoint() (*url.URL, int, bool, error)

ValidateEndpoint gets and validates endpoint settings

type BucketAutoclass

type BucketAutoclass struct {
	// Enabled specifies whether the autoclass feature is enabled
	// on the bucket.
	Enabled bool `json:"enabled"`
	// ToggleTime is the time from which Autoclass was last toggled.
	// If Autoclass is enabled when the bucket is created, the ToggleTime
	// is set to the bucket creation time. This field is read-only.
	ToggleTime time.Time `json:"toggle_time"`
	// TerminalStorageClass: The storage class that objects in the bucket
	// eventually transition to if they are not read for a certain length of
	// time. Valid values are NEARLINE and ARCHIVE.
	// To modify TerminalStorageClass, Enabled must be set to true.
	TerminalStorageClass string `json:"terminal_storage_class"`
	// TerminalStorageClassUpdateTime represents the time of the most recent
	// update to "TerminalStorageClass".
	TerminalStorageClassUpdateTime time.Time `json:"terminal_storage_class_update_time"`
}

Autoclass holds the bucket's autoclass configuration. If enabled, allows for the automatic selection of the best storage class based on object access patterns. See https://cloud.google.com/storage/docs/using-autoclass for more information.

func (BucketAutoclass) ToMap

func (j BucketAutoclass) ToMap() map[string]any

ToMap encodes the struct to a value map

type BucketCors

type BucketCors struct {
	// MaxAge is the value to return in the Access-Control-Max-Age
	// header used in preflight responses.
	MaxAge scalar.DurationString `json:"max_age"`

	// Methods is the list of HTTP methods on which to include CORS response
	// headers, (GET, OPTIONS, POST, etc) Note: "*" is permitted in the list
	// of methods, and means "any method".
	Methods []string `json:"methods"`

	// Origins is the list of Origins eligible to receive CORS response
	// headers. Note: "*" is permitted in the list of origins, and means
	// "any Origin".
	Origins []string `json:"origins"`

	// ResponseHeaders is the list of HTTP headers other than the simple
	// response headers to give permission for the user-agent to share
	// across domains.
	ResponseHeaders []string `json:"response_headers"`
}

BucketCors is the bucket's Cross-Origin Resource Sharing (CORS) configuration.

func (BucketCors) ToMap

func (j BucketCors) ToMap() map[string]any

ToMap encodes the struct to a value map

type BucketHierarchicalNamespace

type BucketHierarchicalNamespace struct {
	// Enabled indicates whether hierarchical namespace features are enabled on
	// the bucket. This can only be set at bucket creation time currently.
	Enabled bool `json:"enabled"`
}

HierarchicalNamespace contains the bucket's hierarchical namespace configuration. Hierarchical namespace enabled buckets can contain cloud.google.com/go/storage/control/apiv2/controlpb.Folder resources.

func (BucketHierarchicalNamespace) ToMap

func (j BucketHierarchicalNamespace) ToMap() map[string]any

ToMap encodes the struct to a value map

type BucketIncludeOptions

type BucketIncludeOptions struct {
	Tags       bool
	Versioning bool
	Lifecycle  bool
	Encryption bool
	ObjectLock bool
}

BucketIncludeOptions contain include options for getting bucket information.

type BucketLogging

type BucketLogging struct {
	// The destination bucket where the current bucket's logs
	// should be placed.
	LogBucket string `json:"log_bucket"`

	// A prefix for log object names.
	LogObjectPrefix string `json:"log_object_prefix"`
}

BucketLogging holds the bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs.

func (BucketLogging) ToMap

func (j BucketLogging) ToMap() map[string]any

ToMap encodes the struct to a value map

type BucketOptions

type BucketOptions struct {
	Prefix     string `json:"prefix"`
	NumThreads int
	Include    BucketIncludeOptions
}

BucketOptions hold options to get bucket information.

type BucketWebsite

type BucketWebsite struct {
	// If the requested object path is missing, the service will ensure the path has
	// a trailing '/', append this suffix, and attempt to retrieve the resulting
	// object. This allows the creation of index.html objects to represent directory
	// pages.
	MainPageSuffix string `json:"main_page_suffix"`

	// If the requested object path is missing, and any mainPageSuffix object is
	// missing, if applicable, the service will return the named object from this
	// bucket as the content for a 404 Not Found result.
	NotFoundPage *string `json:"not_found_page,omitempty"`
}

BucketWebsite holds the bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See https://cloud.google.com/storage/docs/static-website for more information.

func (BucketWebsite) ToMap

func (j BucketWebsite) ToMap() map[string]any

ToMap encodes the struct to a value map

type ChecksumType

type ChecksumType string

ChecksumType contains information about the checksum type. @enum SHA256,SHA1,CRC32,CRC32C,CRC64NVME,FullObjectCRC32,FullObjectCRC32C,None

const (
	ChecksumTypeSha256           ChecksumType = "SHA256"
	ChecksumTypeSha1             ChecksumType = "SHA1"
	ChecksumTypeCrc32            ChecksumType = "CRC32"
	ChecksumTypeCrc32C           ChecksumType = "CRC32C"
	ChecksumTypeCrc64Nvme        ChecksumType = "CRC64NVME"
	ChecksumTypeFullObjectCrc32  ChecksumType = "FullObjectCRC32"
	ChecksumTypeFullObjectCrc32C ChecksumType = "FullObjectCRC32C"
	ChecksumTypeNone             ChecksumType = "None"
)

func ParseChecksumType

func ParseChecksumType(input string) (ChecksumType, error)

ParseChecksumType parses a ChecksumType enum from string

func (*ChecksumType) FromValue

func (s *ChecksumType) FromValue(value any) error

FromValue decodes the scalar from an unknown value

func (ChecksumType) IsValid

func (j ChecksumType) IsValid() bool

IsValid checks if the value is invalid

func (ChecksumType) ScalarName

func (j ChecksumType) ScalarName() string

ScalarName get the schema name of the scalar

func (*ChecksumType) UnmarshalJSON

func (j *ChecksumType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ComposeStorageObjectArguments

type ComposeStorageObjectArguments struct {
	// The storage client ID
	ClientID *StorageClientID        `json:"client_id,omitempty"`
	Dest     StorageCopyDestOptions  `json:"dest"`
	Sources  []StorageCopySrcOptions `json:"sources"`
}

ComposeStorageObjectArguments represent input arguments of the ComposeObject method.

type CopyStorageObjectArguments

type CopyStorageObjectArguments struct {
	// The storage client ID
	ClientID *StorageClientID       `json:"client_id,omitempty"`
	Dest     StorageCopyDestOptions `json:"dest"`
	Source   StorageCopySrcOptions  `json:"source"`
}

CopyStorageObjectArguments represent input arguments of the CopyObject method.

type CustomPlacementConfig

type CustomPlacementConfig struct {
	// The list of regional locations in which data is placed.
	// Custom Dual Regions require exactly 2 regional locations.
	DataLocations []string `json:"data_locations"`
}

CustomPlacementConfig holds the bucket's custom placement configuration for Custom Dual Regions. See https://cloud.google.com/storage/docs/locations#location-dr for more information.

func (CustomPlacementConfig) ToMap

func (j CustomPlacementConfig) ToMap() map[string]any

ToMap encodes the struct to a value map

type DeleteMarkerReplication

type DeleteMarkerReplication struct {
	Status StorageReplicationRuleStatus `json:"status"` // should be set to "Disabled" by default
}

DeleteMarkerReplication whether delete markers are replicated - https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html

type DeleteReplication

type DeleteReplication struct {
	Status StorageReplicationRuleStatus `json:"status"` // should be set to "Disabled" by default
}

DeleteReplication whether versioned deletes are replicated. This is a MinIO specific extension

type DownloadHTTPMethod added in v0.0.4

type DownloadHTTPMethod string

DownloadHTTPMethod represents the http method enum to download files. @enum GET,POST

const (
	DownloadHttpmethodGet  DownloadHTTPMethod = "GET"
	DownloadHttpmethodPost DownloadHTTPMethod = "POST"
)

func ParseDownloadHttpmethod added in v0.0.4

func ParseDownloadHttpmethod(input string) (DownloadHTTPMethod, error)

ParseDownloadHttpmethod parses a DownloadHTTPMethod enum from string

func (*DownloadHTTPMethod) FromValue added in v0.0.4

func (s *DownloadHTTPMethod) FromValue(value any) error

FromValue decodes the scalar from an unknown value

func (DownloadHTTPMethod) IsValid added in v0.0.4

func (j DownloadHTTPMethod) IsValid() bool

IsValid checks if the value is invalid

func (DownloadHTTPMethod) ScalarName added in v0.0.4

func (j DownloadHTTPMethod) ScalarName() string

ScalarName get the schema name of the scalar

func (*DownloadHTTPMethod) UnmarshalJSON added in v0.0.4

func (j *DownloadHTTPMethod) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type DownloadStorageObjectAsCsvArguments added in v0.1.0

type DownloadStorageObjectAsCsvArguments struct {
	GetStorageObjectArguments

	Options encoding.CSVDecodeOptions `json:"options,omitempty"`
}

DownloadStorageObjectAsCsvArguments are used to specify additional headers or options during GET requests.

func (*DownloadStorageObjectAsCsvArguments) FromValue added in v0.1.0

func (j *DownloadStorageObjectAsCsvArguments) FromValue(input map[string]any) error

FromValue decodes values from map

type ExistingObjectReplication

type ExistingObjectReplication struct {
	Status StorageReplicationRuleStatus `json:"status"` // should be set to "Disabled" by default
}

ExistingObjectReplication whether existing object replication is enabled

type GetStorageBucketArguments

type GetStorageBucketArguments struct {
	StorageClientCredentialArguments

	Name  string            `json:"name"`
	Where schema.Expression `json:"where" ndc:"predicate=StorageBucketFilter"`
}

StorageBucketArguments represent the common input arguments for bucket-related methods.

func (*GetStorageBucketArguments) FromValue added in v0.0.4

func (j *GetStorageBucketArguments) FromValue(input map[string]any) error

FromValue decodes values from map

func (GetStorageBucketArguments) ToMap added in v0.0.4

func (j GetStorageBucketArguments) ToMap() map[string]any

ToMap encodes the struct to a value map

func (GetStorageBucketArguments) ToStorageBucketArguments added in v0.0.4

func (arg GetStorageBucketArguments) ToStorageBucketArguments() *StorageBucketArguments

ToStorageBucketArguments convert to the StorageBucketArguments instance.

type GetStorageObjectArguments

type GetStorageObjectArguments struct {
	StorageBucketArguments
	GetStorageObjectOptions

	Name  string            `json:"name"`
	Where schema.Expression `json:"where" ndc:"predicate=StorageObjectFilter"`
}

GetStorageObjectArguments are used to specify additional headers or options during GET requests.

func (*GetStorageObjectArguments) FromValue

func (j *GetStorageObjectArguments) FromValue(input map[string]any) error

FromValue decodes values from map

func (GetStorageObjectArguments) ToMap added in v0.1.0

func (j GetStorageObjectArguments) ToMap() map[string]any

ToMap encodes the struct to a value map

type GetStorageObjectOptions

type GetStorageObjectOptions struct {
	Headers       []StorageKeyValue `json:"headers,omitempty"`
	RequestParams []StorageKeyValue `json:"request_params,omitempty"`
	// ServerSideEncryption *ServerSideEncryptionMethod `json:"serverSideEncryption"`
	VersionID  *string `json:"version_id"`
	PartNumber *int    `json:"part_number"`
	// Options to be included for the object information.
	Include     StorageObjectIncludeOptions `json:"-"`
	PreValidate func(*StorageObject) error  `json:"-"`
}

GetStorageObjectOptions are used to specify additional headers or options during GET requests.

func (*GetStorageObjectOptions) FromValue

func (j *GetStorageObjectOptions) FromValue(input map[string]any) error

FromValue decodes values from map

func (GetStorageObjectOptions) ToMap

func (j GetStorageObjectOptions) ToMap() map[string]any

ToMap encodes the struct to a value map

type GoogleStorageRPO

type GoogleStorageRPO string

GoogleStorageRPO (Recovery Point Objective) configures the turbo replication feature. See https://cloud.google.com/storage/docs/managing-turbo-replication for more information. @enum DEFAULT,ASYNC_TURBO

const (
	GoogleStorageRpoDefault    GoogleStorageRPO = "DEFAULT"
	GoogleStorageRpoAsyncTurbo GoogleStorageRPO = "ASYNC_TURBO"
)

func ParseGoogleStorageRpo

func ParseGoogleStorageRpo(input string) (GoogleStorageRPO, error)

ParseGoogleStorageRpo parses a GoogleStorageRPO enum from string

func (*GoogleStorageRPO) FromValue

func (s *GoogleStorageRPO) FromValue(value any) error

FromValue decodes the scalar from an unknown value

func (GoogleStorageRPO) IsValid

func (j GoogleStorageRPO) IsValid() bool

IsValid checks if the value is invalid

func (GoogleStorageRPO) ScalarName

func (j GoogleStorageRPO) ScalarName() string

ScalarName get the schema name of the scalar

func (*GoogleStorageRPO) UnmarshalJSON

func (j *GoogleStorageRPO) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type HTTPClient added in v0.0.4

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

HTTPClient extends the native http.Client with custom configurations and methods

func NewHTTPClient added in v0.0.4

func NewHTTPClient(config *exhttp.HTTPTransportTLSConfig, logger *slog.Logger) (*HTTPClient, error)

NewHTTPClient creates an HTTP client from an HTTP transport configuration.

func (HTTPClient) Request added in v0.0.4

func (hc HTTPClient) Request(ctx context.Context, options *HTTPRequestOptions) (*http.Response, error)

Request sends a HTTP request to the remote endpoint.

type HTTPRequestOptions added in v0.0.4

type HTTPRequestOptions struct {
	URL      string              `json:"url"`
	Method   *DownloadHTTPMethod `json:"method"`
	Headers  []StorageKeyValue   `json:"headers,omitempty"`
	BodyText string              `json:"body_text,omitempty"`
}

RequestOptions hold HTTP request options.

func (HTTPRequestOptions) ToMap added in v0.0.4

func (j HTTPRequestOptions) ToMap() map[string]any

ToMap encodes the struct to a value map

type HTTPTransportOptions added in v0.0.4

type HTTPTransportOptions struct {
	Logger                     *slog.Logger
	Port                       int
	DisableCompression         bool
	DisableHighCardinalityPath bool
}

HTTPTransportOptions hold optional options for the http transport.

type ListIncompleteUploadsArguments

type ListIncompleteUploadsArguments struct {
	StorageBucketArguments
	ListIncompleteUploadsOptions
}

ListIncompleteUploadsArguments the input arguments of the ListIncompleteUploads method.

func (*ListIncompleteUploadsArguments) FromValue

func (j *ListIncompleteUploadsArguments) FromValue(input map[string]any) error

FromValue decodes values from map

type ListIncompleteUploadsOptions

type ListIncompleteUploadsOptions struct {
	Prefix string `json:"prefix,omitempty"`
}

ListIncompleteUploadsOptions the input arguments of the ListIncompleteUploads method.

func (*ListIncompleteUploadsOptions) FromValue

func (j *ListIncompleteUploadsOptions) FromValue(input map[string]any) error

FromValue decodes values from map

func (ListIncompleteUploadsOptions) ToMap

func (j ListIncompleteUploadsOptions) ToMap() map[string]any

ToMap encodes the struct to a value map

type ListStorageBucketArguments

type ListStorageBucketArguments struct {
	StorageClientCredentialArguments

	// Returns list of bucket with the prefix.
	Prefix string `json:"prefix,omitempty"`
	// The maximum number of objects requested per batch.
	First *int `json:"first"`
	// After start listing lexically at this bucket onwards.
	After string            `json:"after,omitempty"`
	Where schema.Expression `json:"where"           ndc:"predicate=StorageBucketFilter"`
}

ListStorageBucketArguments represent the input arguments for the ListBuckets methods.

func (*ListStorageBucketArguments) FromValue

func (j *ListStorageBucketArguments) FromValue(input map[string]any) error

FromValue decodes values from map

type ListStorageBucketsOptions

type ListStorageBucketsOptions struct {
	// Only list objects with the prefix
	Prefix string
	// The maximum number of objects requested per
	// batch, advanced use-case not useful for most
	// applications
	MaxResults *int
	// StartAfter start listing lexically at this object onwards.
	StartAfter string
	// Options to be included for the object information.
	Include    BucketIncludeOptions
	NumThreads int
}

ListStorageBucketsOptions holds all options of a list bucket request.

type ListStorageObjectsArguments

type ListStorageObjectsArguments struct {
	StorageBucketArguments

	// Returns the list of objects with the prefix.
	Prefix string `json:"prefix,omitempty"`
	// Returns objects in the recursive order.
	Recursive bool `json:"recursive,omitempty"`
	// The maximum number of objects requested per batch.
	First *int `json:"first"`
	// After start listing lexically at this object onwards.
	After *string `json:"after,omitempty"`

	Where schema.Expression `json:"where" ndc:"predicate=StorageObjectFilter"`
}

ListStorageObjectsArguments holds all arguments of a list object request.

func (*ListStorageObjectsArguments) FromValue

func (j *ListStorageObjectsArguments) FromValue(input map[string]any) error

FromValue decodes values from map

func (ListStorageObjectsArguments) ToMap

func (j ListStorageObjectsArguments) ToMap() map[string]any

ToMap encodes the struct to a value map

type ListStorageObjectsOptions

type ListStorageObjectsOptions struct {
	// Only list objects with the prefix
	Prefix string
	// Find objects recursively.
	Recursive bool
	// The maximum number of objects requested per
	// batch, advanced use-case not useful for most
	// applications
	MaxResults int
	// StartAfter start listing lexically at this object onwards.
	StartAfter string
	// Options to be included for the object information.
	Include    StorageObjectIncludeOptions
	NumThreads int
}

ListStorageObjectsOptions holds all options of a list object request.

type MakeStorageBucketArguments

type MakeStorageBucketArguments struct {
	StorageClientCredentialArguments
	MakeStorageBucketOptions
}

MakeStorageBucketArguments holds all arguments to tweak bucket creation.

type MakeStorageBucketOptions

type MakeStorageBucketOptions struct {
	// Bucket name
	Name string `json:"name"`
	// Bucket location
	Region string `json:"region,omitempty"`
	// Enable object locking
	ObjectLock bool `json:"object_lock,omitempty"`
	// Optional tags
	Tags []StorageKeyValue `json:"tags,omitempty"`
}

MakeStorageBucketOptions holds all options to tweak bucket creation.

func (MakeStorageBucketOptions) ToMap

func (j MakeStorageBucketOptions) ToMap() map[string]any

ToMap encodes the struct to a value map

type NotificationCommonConfig

type NotificationCommonConfig struct {
	ID     *string             `json:"id,omitempty"`
	Arn    *string             `json:"arn"`
	Events []string            `json:"event"`
	Filter *NotificationFilter `json:"filter,omitempty"`
}

NotificationCommonConfig - represents one single notification configuration such as topic, queue or lambda configuration.

type NotificationConfig

type NotificationConfig struct {
	LambdaConfigs []NotificationLambdaConfig `json:"cloud_function_configurations"`
	TopicConfigs  []NotificationTopicConfig  `json:"topic_configurations"`
	QueueConfigs  []NotificationQueueConfig  `json:"queue_configurations"`
}

NotificationConfig the struct that represents a notification configuration object.

type NotificationFilter

type NotificationFilter struct {
	S3Key *NotificationS3Key `json:"s3_key,omitempty"`
}

NotificationFilter - a tag in the notification xml structure which carries suffix/prefix filters

type NotificationFilterRule

type NotificationFilterRule struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

NotificationFilterRule child of S3Key, a tag in the notification xml which carries suffix/prefix filters

type NotificationLambdaConfig

type NotificationLambdaConfig struct {
	NotificationCommonConfig
	Lambda string `json:"cloud_function"`
}

NotificationLambdaConfig carries one single cloudfunction notification configuration

type NotificationQueueConfig

type NotificationQueueConfig struct {
	NotificationCommonConfig
	Queue string `json:"queue"`
}

NotificationQueueConfig carries one single queue notification configuration

type NotificationS3Key

type NotificationS3Key struct {
	FilterRules []NotificationFilterRule `json:"filter_rule,omitempty"`
}

NotificationS3Key child of Filter, a tag in the notification xml which carries suffix/prefix filters

type NotificationTopicConfig

type NotificationTopicConfig struct {
	NotificationCommonConfig
	Topic string `json:"topic"`
}

NotificationTopicConfig carries one single topic notification configuration

type ObjectAbortIncompleteMultipartUpload

type ObjectAbortIncompleteMultipartUpload struct {
	DaysAfterInitiation *int `json:"days_after_initiation"`
}

AbortIncompleteMultipartUpload structure, not supported yet on MinIO

func (ObjectAbortIncompleteMultipartUpload) ToMap

ToMap encodes the struct to a value map

type ObjectLifecycleAllVersionsExpiration

type ObjectLifecycleAllVersionsExpiration struct {
	Days         *int  `json:"days"`
	DeleteMarker *bool `json:"delete_marker"`
}

ObjectLifecycleAllVersionsExpiration represents AllVersionsExpiration actions element in an ILM policy

func (ObjectLifecycleAllVersionsExpiration) ToMap

ToMap encodes the struct to a value map

type ObjectLifecycleConfiguration

type ObjectLifecycleConfiguration struct {
	Rules []ObjectLifecycleRule `json:"rules"`
}

ObjectLifecycleConfiguration is a collection of lifecycle Rule objects.

func (ObjectLifecycleConfiguration) ToMap

func (j ObjectLifecycleConfiguration) ToMap() map[string]any

ToMap encodes the struct to a value map

type ObjectLifecycleDelMarkerExpiration

type ObjectLifecycleDelMarkerExpiration struct {
	Days *int `json:"days"`
}

LifecycleDelMarkerExpiration represents DelMarkerExpiration actions element in an ILM policy

func (ObjectLifecycleDelMarkerExpiration) ToMap

ToMap encodes the struct to a value map

type ObjectLifecycleExpiration

type ObjectLifecycleExpiration struct {
	Date         *scalar.Date `json:"date,omitempty"`
	Days         *int         `json:"days,omitempty"`
	DeleteMarker *bool        `json:"expired_object_delete_marker,omitempty"`
	DeleteAll    *bool        `json:"expired_object_all_versions,omitempty"`
}

ObjectLifecycleExpiration expiration details of lifecycle configuration

func (ObjectLifecycleExpiration) IsEmpty

func (fe ObjectLifecycleExpiration) IsEmpty() bool

IsEmpty checks if all properties of the object are empty.

func (ObjectLifecycleExpiration) ToMap

func (j ObjectLifecycleExpiration) ToMap() map[string]any

ToMap encodes the struct to a value map

type ObjectLifecycleFilter

type ObjectLifecycleFilter struct {
	// MatchesPrefix is the condition matching an object if any of the
	// matches_prefix strings are an exact prefix of the object's name.
	MatchesPrefix []string `json:"matches_prefix,omitempty"`

	// MatchesStorageClasses is the condition matching the object's storage
	// class.
	//
	// Values include "STANDARD", "NEARLINE", "COLDLINE" and "ARCHIVE".
	MatchesStorageClasses []string `json:"matches_storage_classes,omitempty"`

	// MatchesSuffix is the condition matching an object if any of the
	// matches_suffix strings are an exact suffix of the object's name.
	MatchesSuffix []string `json:"matches_suffix,omitempty"`

	// Tags structure key/value pair representing an object tag to apply configuration
	Tags                  []StorageKeyValue `json:"tags,omitempty"`
	ObjectSizeLessThan    *int64            `json:"object_size_less_than,omitempty"`
	ObjectSizeGreaterThan *int64            `json:"object_size_greater_than,omitempty"`
}

ObjectLifecycleFilter will be used in selecting rule(s) for lifecycle configuration

func (ObjectLifecycleFilter) ToMap

func (j ObjectLifecycleFilter) ToMap() map[string]any

ToMap encodes the struct to a value map

type ObjectLifecycleNoncurrentVersionExpiration

type ObjectLifecycleNoncurrentVersionExpiration struct {
	NoncurrentDays          *int `json:"noncurrent_days,omitempty"`
	NewerNoncurrentVersions *int `json:"newer_noncurrent_versions,omitempty"`
}

ObjectLifecycleNoncurrentVersionExpiration - Specifies when noncurrent object versions expire. Upon expiration, server permanently deletes the noncurrent object versions. Set this lifecycle configuration action on a bucket that has versioning enabled (or suspended) to request server delete noncurrent object versions at a specific period in the object's lifetime.

func (ObjectLifecycleNoncurrentVersionExpiration) ToMap

ToMap encodes the struct to a value map

type ObjectLifecycleNoncurrentVersionTransition

type ObjectLifecycleNoncurrentVersionTransition struct {
	StorageClass            *string `json:"storage_class,omitempty"`
	NoncurrentDays          *int    `json:"noncurrent_days"`
	NewerNoncurrentVersions *int    `json:"newer_noncurrent_versions,omitempty"`
}

ObjectLifecycleNoncurrentVersionTransition sets this action to request server to transition noncurrent object versions to different set storage classes at a specific period in the object's lifetime.

func (ObjectLifecycleNoncurrentVersionTransition) ToMap

ToMap encodes the struct to a value map

type ObjectLifecycleRule

type ObjectLifecycleRule struct {
	ID                             string                                      `json:"id,omitempty"`
	Enabled                        bool                                        `json:"enabled,omitempty"`
	AbortIncompleteMultipartUpload *ObjectAbortIncompleteMultipartUpload       `json:"abort_incomplete_multipart_upload"`
	Expiration                     *ObjectLifecycleExpiration                  `json:"expiration,omitempty"`
	DelMarkerExpiration            *ObjectLifecycleDelMarkerExpiration         `json:"del_marker_expiration,omitempty"`
	AllVersionsExpiration          *ObjectLifecycleAllVersionsExpiration       `json:"all_versions_expiration,omitempty"`
	RuleFilter                     []ObjectLifecycleFilter                     `json:"filter,omitempty"`
	NoncurrentVersionExpiration    *ObjectLifecycleNoncurrentVersionExpiration `json:"noncurrent_version_expiration,omitempty"`
	NoncurrentVersionTransition    *ObjectLifecycleNoncurrentVersionTransition `json:"noncurrent_version_transition,omitempty"`
	Prefix                         *string                                     `json:"prefix,omitempty"`
	Transition                     *ObjectLifecycleTransition                  `json:"transition,omitempty"`
}

ObjectLifecycleRule represents a single rule in lifecycle configuration

func (ObjectLifecycleRule) ToMap

func (j ObjectLifecycleRule) ToMap() map[string]any

ToMap encodes the struct to a value map

type ObjectLifecycleTransition

type ObjectLifecycleTransition struct {
	Date         *scalar.Date `json:"date"`
	StorageClass *string      `json:"storage_class"`
	Days         *int         `json:"days"`
}

ObjectLifecycleTransition transition details of lifecycle configuration

func (ObjectLifecycleTransition) ToMap

func (j ObjectLifecycleTransition) ToMap() map[string]any

ToMap encodes the struct to a value map

type PresignedGetStorageObjectArguments

type PresignedGetStorageObjectArguments struct {
	StorageBucketArguments
	PresignedGetStorageObjectOptions

	Name  string            `json:"name"`
	Where schema.Expression `json:"where" ndc:"predicate=StorageObjectFilter"`
}

PresignedGetStorageObjectArguments represent the input arguments for the PresignedGetObject method.

func (*PresignedGetStorageObjectArguments) FromValue

func (j *PresignedGetStorageObjectArguments) FromValue(input map[string]any) error

FromValue decodes values from map

type PresignedGetStorageObjectOptions

type PresignedGetStorageObjectOptions struct {
	Expiry        *scalar.DurationString `json:"expiry"`
	RequestParams []StorageKeyValue      `json:"request_params,omitempty"`
}

PresignedGetStorageObjectOptions represent the options for the PresignedGetObject method.

func (*PresignedGetStorageObjectOptions) FromValue

func (j *PresignedGetStorageObjectOptions) FromValue(input map[string]any) error

FromValue decodes values from map

func (PresignedGetStorageObjectOptions) ToMap

ToMap encodes the struct to a value map

type PresignedPutStorageObjectArguments

type PresignedPutStorageObjectArguments struct {
	StorageBucketArguments

	Name   string                 `json:"name"`
	Expiry *scalar.DurationString `json:"expiry"`
	Where  schema.Expression      `json:"where"  ndc:"predicate=StorageObjectFilter"`
}

PresignedPutStorageObjectArguments represent the input arguments for the PresignedPutObject method.

func (*PresignedPutStorageObjectArguments) FromValue

func (j *PresignedPutStorageObjectArguments) FromValue(input map[string]any) error

FromValue decodes values from map

type PresignedURLResponse

type PresignedURLResponse struct {
	URL       string    `json:"url"`
	ExpiredAt time.Time `json:"expired_at"`
}

PresignedURLResponse holds the presigned URL and expiry information.

func (PresignedURLResponse) ToMap

func (j PresignedURLResponse) ToMap() map[string]any

ToMap encodes the struct to a value map

type PutStorageObjectArguments added in v0.0.4

type PutStorageObjectArguments struct {
	StorageBucketArguments

	Name    string                  `json:"name"`
	Options PutStorageObjectOptions `json:"options,omitempty"`
	Where   schema.Expression       `json:"where"             ndc:"predicate=StorageObjectFilter"`
}

PutStorageObjectArguments represents input arguments of the PutObject method.

func (PutStorageObjectArguments) ToMap added in v0.0.4

func (j PutStorageObjectArguments) ToMap() map[string]any

ToMap encodes the struct to a value map

type PutStorageObjectOptions

type PutStorageObjectOptions struct {
	Metadata           []StorageKeyValue                 `json:"metadata,omitempty"`
	Tags               []StorageKeyValue                 `json:"tags,omitempty"`
	ContentType        string                            `json:"content_type,omitempty"`
	ContentEncoding    string                            `json:"content_encoding,omitempty"`
	ContentDisposition string                            `json:"content_disposition,omitempty"`
	ContentLanguage    string                            `json:"content_language,omitempty"`
	CacheControl       string                            `json:"cache_control,omitempty"`
	Expires            *time.Time                        `json:"expires,omitempty"`
	Retention          *PutStorageObjectRetentionOptions `json:"retention,omitempty"`
	// ServerSideEncryption    *ServerSideEncryptionMethod `json:"serverSideEncryption,omitempty"`
	NumThreads              uint   `json:"num_threads,omitempty"`
	StorageClass            string `json:"storage_class,omitempty"`
	WebsiteRedirectLocation string `json:"website_redirect_location,omitempty"`
	PartSize                uint64 `json:"part_size,omitempty"`
	LegalHold               *bool  `json:"legal_hold"`
	SendContentMd5          bool   `json:"send_content_md5,omitempty"`
	DisableContentSha256    bool   `json:"disable_content_sha256,omitempty"`
	DisableMultipart        bool   `json:"disable_multipart,omitempty"`

	// AutoChecksum is the type of checksum that will be added if no other checksum is added,
	// like MD5 or SHA256 streaming checksum, and it is feasible for the upload type.
	// If none is specified CRC32C is used, since it is generally the fastest.
	AutoChecksum *ChecksumType `json:"auto_checksum"`

	// Checksum will force a checksum of the specific type.
	// This requires that the client was created with "TrailingHeaders:true" option,
	// and that the destination server supports it.
	// Unavailable with V2 signatures & Google endpoints.
	// This will disable content MD5 checksums if set.
	Checksum *ChecksumType `json:"checksum"`

	// ConcurrentStreamParts will create NumThreads buffers of PartSize bytes,
	// fill them serially and upload them in parallel.
	// This can be used for faster uploads on non-seekable or slow-to-seek input.
	ConcurrentStreamParts bool `json:"concurrent_stream_parts,omitempty"`
}

PutStorageObjectOptions represents options specified by user for PutObject call.

func (PutStorageObjectOptions) ToMap

func (j PutStorageObjectOptions) ToMap() map[string]any

ToMap encodes the struct to a value map

type PutStorageObjectRetentionOptions

type PutStorageObjectRetentionOptions struct {
	Mode             StorageRetentionMode `json:"mode"`
	RetainUntilDate  time.Time            `json:"retain_until_date"`
	GovernanceBypass bool                 `json:"governance_bypass,omitempty"`
}

PutStorageObjectRetentionOptions represent options of object retention configuration.

func (PutStorageObjectRetentionOptions) ToMap

ToMap encodes the struct to a value map

type RemoveIncompleteUploadArguments

type RemoveIncompleteUploadArguments struct {
	StorageBucketArguments

	Name string `json:"name"`
}

RemoveIncompleteUploadArguments represent the input arguments for the RemoveIncompleteUpload method.

type RemoveStorageObjectArguments

type RemoveStorageObjectArguments struct {
	StorageBucketArguments
	RemoveStorageObjectOptions

	Name  string            `json:"name"`
	Where schema.Expression `json:"where" ndc:"predicate=StorageObjectFilter"`
}

RemoveStorageObjectArguments represent arguments specified by user for RemoveObject call.

type RemoveStorageObjectError

type RemoveStorageObjectError struct {
	ObjectName string `json:"object_name"`
	VersionID  string `json:"version_id"`
	Error      string `json:"error"`
}

RemoveStorageObjectError the container of Multi Delete S3 API error.

func (RemoveStorageObjectError) ToMap

func (j RemoveStorageObjectError) ToMap() map[string]any

ToMap encodes the struct to a value map

type RemoveStorageObjectOptions

type RemoveStorageObjectOptions struct {
	SoftDelete       bool   `json:"soft_delete,omitempty"`
	ForceDelete      bool   `json:"force_delete,omitempty"`
	GovernanceBypass bool   `json:"governance_bypass,omitempty"`
	VersionID        string `json:"version_id,omitempty"`
}

RemoveStorageObjectOptions represents options specified by user for RemoveObject call.

func (RemoveStorageObjectOptions) ToMap

func (j RemoveStorageObjectOptions) ToMap() map[string]any

ToMap encodes the struct to a value map

type RemoveStorageObjectsArguments

type RemoveStorageObjectsArguments struct {
	StorageBucketArguments
	ListStorageObjectsArguments

	GovernanceBypass bool `json:"governance_bypass,omitempty"`
}

RemoveStorageObjectsArguments represents arguments specified by user for RemoveObjects call.

type RemoveStorageObjectsOptions

type RemoveStorageObjectsOptions struct {
	ListStorageObjectsOptions

	GovernanceBypass bool
}

RemoveStorageObjectsOptions represents options specified by user for RemoveObjects call.

type ReplicaModifications

type ReplicaModifications struct {
	Status StorageReplicationRuleStatus `json:"status"` // should be set to "Enabled" by default
}

ReplicaModifications specifies if replica modification sync is enabled

type RestoreStorageObjectArguments

type RestoreStorageObjectArguments struct {
	StorageBucketArguments

	Name  string            `json:"name"`
	Where schema.Expression `json:"where" ndc:"predicate=StorageObjectFilter"`
}

RestoreStorageObjectArguments represent arguments specified by user for RestoreObject call.

type ServerSideEncryptionConfiguration

type ServerSideEncryptionConfiguration struct {
	KmsMasterKeyID string `json:"kms_master_key_id,omitempty"`
	SSEAlgorithm   string `json:"sse_algorithm,omitempty"`
}

ServerSideEncryptionConfiguration is the default encryption configuration structure.

func (ServerSideEncryptionConfiguration) IsEmpty

func (ssec ServerSideEncryptionConfiguration) IsEmpty() bool

IsEmpty checks if the configuration is empty.

func (ServerSideEncryptionConfiguration) ToMap

ToMap encodes the struct to a value map

type SetStorageObjectLockConfig

type SetStorageObjectLockConfig struct {
	Mode     *StorageRetentionMode         `json:"mode"`
	Validity *uint                         `json:"validity"`
	Unit     *StorageRetentionValidityUnit `json:"unit"`
}

SetStorageObjectLockConfig represents the object lock configuration options in given bucket

func (SetStorageObjectLockConfig) ToMap

func (j SetStorageObjectLockConfig) ToMap() map[string]any

ToMap encodes the struct to a value map

type SetStorageObjectRetentionOptions

type SetStorageObjectRetentionOptions struct {
	Mode             *StorageRetentionMode `json:"mode"`
	GovernanceBypass bool                  `json:"governance_bypass,omitempty"`
	RetainUntilDate  *time.Time            `json:"retain_until_date,omitempty"`
}

SetStorageObjectRetentionOptions represents options specified by user for PutObject call.

func (SetStorageObjectRetentionOptions) ToMap

ToMap encodes the struct to a value map

type SourceSelectionCriteria

type SourceSelectionCriteria struct {
	ReplicaModifications *ReplicaModifications `json:"replica_modifications"`
}

SourceSelectionCriteria specifies additional source selection criteria in ReplicationConfiguration.

type StorageBucket

type StorageBucket struct {
	// Client ID
	ClientID string `json:"client_id"`
	// The name of the bucket.
	Name string `json:"name"`
	// Bucket tags or metadata.
	Tags []StorageKeyValue `json:"tags,omitempty"`
	// The versioning configuration
	Versioning *StorageBucketVersioningConfiguration `json:"versioning"`
	// The versioning configuration
	Lifecycle *ObjectLifecycleConfiguration `json:"lifecycle"`
	// The server-side encryption configuration.
	Encryption *ServerSideEncryptionConfiguration `json:"encryption"`

	// Retention policy enforces a minimum retention time for all objects
	// contained in the bucket. A RetentionPolicy of nil implies the bucket
	// has no minimum data retention.
	ObjectLock *StorageObjectLockConfig `json:"object_lock"`

	// The location of the bucket.
	Region *string `json:"region"`

	// The bucket's custom placement configuration that holds a list of
	// regional locations for custom dual regions.
	CustomPlacementConfig *CustomPlacementConfig `json:"custom_placement_config"`

	// DefaultEventBasedHold is the default value for event-based hold on newly created objects in this bucket. It defaults to false.
	DefaultEventBasedHold *bool `json:"default_event_based_hold"`

	// StorageClass is the default storage class of the bucket. This defines
	// how objects in the bucket are stored and determines the SLA and the cost of storage.
	StorageClass *string `json:"storage_class"`

	// Date time the bucket was created.
	CreationTime *time.Time `json:"creation_time"`
	// Date time the bucket was created.
	LastModified *time.Time `json:"last_modified"`

	// RequesterPays reports whether the bucket is a Requester Pays bucket.
	// Clients performing operations on Requester Pays buckets must provide
	// a user project (see BucketHandle.UserProject), which will be billed
	// for the operations.
	RequesterPays *bool `json:"requester_pays"`

	// The bucket's Cross-Origin Resource Sharing (CORS) configuration.
	CORS []BucketCors `json:"cors,omitempty"`

	// The logging configuration.
	Logging *BucketLogging `json:"logging"`

	// The website configuration.
	Website *BucketWebsite `json:"website,omitempty"`

	// Etag is the HTTP/1.1 Entity tag for the bucket.
	// This field is read-only.
	Etag *string `json:"etag"`

	// LocationType describes how data is stored and replicated.
	// Typical values are "multi-region", "region" and "dual-region".
	LocationType *string `json:"location_type"`

	// RPO configures the Recovery Point Objective (RPO) policy of the bucket.
	// Set to RPOAsyncTurbo to turn on Turbo Replication for a bucket.
	// See https://cloud.google.com/storage/docs/managing-turbo-replication for
	// more information.
	RPO *GoogleStorageRPO `json:"rpo"`

	// Autoclass holds the bucket's autoclass configuration. If enabled,
	// allows for the automatic selection of the best storage class
	// based on object access patterns.
	Autoclass *BucketAutoclass `json:"autoclass"`

	// SoftDeletePolicy contains the bucket's soft delete policy, which defines
	// the period of time that soft-deleted objects will be retained, and cannot
	// be permanently deleted.
	SoftDeletePolicy *StorageObjectSoftDeletePolicy `json:"soft_delete_policy"`

	// HierarchicalNamespace contains the bucket's hierarchical namespace
	// configuration. Hierarchical namespace enabled buckets can contain
	// [cloud.google.com/go/storage/control/apiv2/controlpb.Folder] resources.
	// It cannot be modified after bucket creation time.
	// UniformBucketLevelAccess must also be enabled on the bucket.
	HierarchicalNamespace *BucketHierarchicalNamespace `json:"hierarchical_namespace"`
}

StorageBucket the container for bucket metadata.

func (StorageBucket) ToMap

func (j StorageBucket) ToMap() map[string]any

ToMap encodes the struct to a value map

type StorageBucketArguments

type StorageBucketArguments struct {
	// The bucket name.
	Bucket string `json:"bucket,omitempty"`

	StorageClientCredentialArguments
}

StorageBucketArguments represent the common input arguments for bucket-related methods.

func (*StorageBucketArguments) FromValue

func (j *StorageBucketArguments) FromValue(input map[string]any) error

FromValue decodes values from map

func (StorageBucketArguments) ToMap

func (j StorageBucketArguments) ToMap() map[string]any

ToMap encodes the struct to a value map

type StorageBucketListResults

type StorageBucketListResults struct {
	Buckets  []StorageBucket       `json:"buckets"`
	PageInfo StoragePaginationInfo `json:"pageInfo"`
}

StorageBucketListResults hold the paginated results of the storage bucket list.

type StorageBucketVersioningConfiguration

type StorageBucketVersioningConfiguration struct {
	Enabled   bool    `json:"enabled"`
	MFADelete *string `json:"mfa_delete"`
	// MinIO extension - allows selective, prefix-level versioning exclusion.
	// Requires versioning to be enabled
	ExcludedPrefixes []string `json:"excluded_prefixes,omitempty"`
	ExcludeFolders   *bool    `json:"exclude_folders"`
}

StorageBucketVersioningConfiguration is the versioning configuration structure

func (StorageBucketVersioningConfiguration) ToMap

ToMap encodes the struct to a value map

type StorageClient

type StorageClient interface {
	// MakeBucket creates a new bucket.
	MakeBucket(ctx context.Context, options *MakeStorageBucketOptions) error
	// ListBuckets list all buckets.
	ListBuckets(ctx context.Context, options *ListStorageBucketsOptions, predicate func(string) bool) (*StorageBucketListResults, error)
	// GetBucket gets a bucket by name.
	GetBucket(ctx context.Context, name string, options BucketOptions) (*StorageBucket, error)
	// BucketExists checks if a bucket exists.
	BucketExists(ctx context.Context, bucketName string) (bool, error)
	// RemoveBucket removes a bucket, bucket should be empty to be successfully removed.
	RemoveBucket(ctx context.Context, bucketName string) error
	// UpdateBucket updates configurations for the bucket.
	UpdateBucket(ctx context.Context, bucketName string, opts UpdateStorageBucketOptions) error
	// ListObjects list objects in a bucket.
	ListObjects(ctx context.Context, bucketName string, opts *ListStorageObjectsOptions, predicate func(string) bool) (*StorageObjectListResults, error)
	// ListIncompleteUploads list partially uploaded objects in a bucket.
	ListIncompleteUploads(ctx context.Context, bucketName string, args ListIncompleteUploadsOptions) ([]StorageObjectMultipartInfo, error)
	// ListDeletedObjects list deleted objects in a bucket.
	ListDeletedObjects(ctx context.Context, bucketName string, opts *ListStorageObjectsOptions, predicate func(string) bool) (*StorageObjectListResults, error)
	// GetObject returns a stream of the object data. Most of the common errors occur when reading the stream.
	GetObject(ctx context.Context, bucketName string, objectName string, opts GetStorageObjectOptions) (io.ReadCloser, error)
	// PutObject uploads objects that are less than 128MiB in a single PUT operation. For objects that are greater than 128MiB in size,
	// PutObject seamlessly uploads the object as parts of 128MiB or more depending on the actual file size. The max upload size for an object is 5TB.
	PutObject(ctx context.Context, bucketName string, objectName string, opts *PutStorageObjectOptions, reader io.Reader, objectSize int64) (*StorageUploadInfo, error)
	// CopyObject creates or replaces an object through server-side copying of an existing object.
	// It supports conditional copying, copying a part of an object and server-side encryption of destination and decryption of source.
	// To copy multiple source objects into a single destination object see the ComposeObject API.
	CopyObject(ctx context.Context, dest StorageCopyDestOptions, src StorageCopySrcOptions) (*StorageUploadInfo, error)
	// ComposeObject creates an object by concatenating a list of source objects using server-side copying.
	ComposeObject(ctx context.Context, dest StorageCopyDestOptions, srcs []StorageCopySrcOptions) (*StorageUploadInfo, error)
	// StatObject fetches metadata of an object.
	StatObject(ctx context.Context, bucketName string, objectName string, opts GetStorageObjectOptions) (*StorageObject, error)
	// RemoveObject removes an object with some specified options
	RemoveObject(ctx context.Context, bucketName string, objectName string, opts RemoveStorageObjectOptions) error
	// RemoveObjects remove a list of objects obtained from an input channel. The call sends a delete request to the server up to 1000 objects at a time.
	// The errors observed are sent over the error channel.
	RemoveObjects(ctx context.Context, bucketName string, opts *RemoveStorageObjectsOptions, predicate func(string) bool) []RemoveStorageObjectError
	// UpdateObject updates object configurations.
	UpdateObject(ctx context.Context, bucketName string, objectName string, opts UpdateStorageObjectOptions) error
	// RestoreObject restores a soft-deleted object.
	RestoreObject(ctx context.Context, bucketName string, objectName string) error
	// RemoveIncompleteUpload removes a partially uploaded object.
	RemoveIncompleteUpload(ctx context.Context, bucketName string, objectName string) error
	// PresignedGetObject generates a presigned URL for HTTP GET operations. Browsers/Mobile clients may point to this URL to directly download objects even if the bucket is private.
	// This presigned URL can have an associated expiration time in seconds after which it is no longer operational.
	// The maximum expiry is 604800 seconds (i.e. 7 days) and minimum is 1 second.
	PresignedGetObject(ctx context.Context, bucketName string, objectName string, opts PresignedGetStorageObjectOptions) (string, error)
	// PresignedPutObject generates a presigned URL for HTTP PUT operations.
	// Browsers/Mobile clients may point to this URL to upload objects directly to a bucket even if it is private.
	// This presigned URL can have an associated expiration time in seconds after which it is no longer operational.
	// The default expiry is set to 7 days.
	PresignedPutObject(ctx context.Context, bucketName string, objectName string, expiry time.Duration) (string, error)
}

StorageClient abstracts required methods of the storage client.

type StorageClientCredentialArguments added in v0.0.4

type StorageClientCredentialArguments struct {
	ClientID        *StorageClientID     `json:"client_id,omitempty"`
	ClientType      *StorageProviderType `json:"client_type,omitempty"`
	Endpoint        string               `json:"endpoint,omitempty"`
	AccessKeyID     string               `json:"access_key_id,omitempty"`
	SecretAccessKey string               `json:"secret_access_key,omitempty"`
}

StorageClientCredentials hold common storage client credential arguments.

func (*StorageClientCredentialArguments) FromValue added in v0.0.4

func (j *StorageClientCredentialArguments) FromValue(input map[string]any) error

FromValue decodes values from map

func (StorageClientCredentialArguments) IsEmpty added in v0.0.4

IsEmpty checks if all properties are empty.

func (StorageClientCredentialArguments) ToMap added in v0.0.4

ToMap encodes the struct to a value map

type StorageClientID

type StorageClientID string

StorageClientID the storage client ID enum. @scalar StorageClientID string

func (StorageClientID) ScalarName

func (j StorageClientID) ScalarName() string

ScalarName get the schema name of the scalar

type StorageCopyDestOptions

type StorageCopyDestOptions struct {
	// points to destination bucket
	Bucket string `json:"bucket,omitempty"`
	// points to destination object
	Name string `json:"name"`

	// `userMeta` is the user-metadata key-value pairs to be set on the
	// destination. The keys are automatically prefixed with `x-amz-meta-`
	// if needed. If nil is passed, and if only a single source (of any
	// size) is provided in the ComposeObject call, then metadata from the
	// source is copied to the destination.
	// if no user-metadata is provided, it is copied from source
	// (when there is only once source object in the compose
	// request)
	Metadata []StorageKeyValue `json:"metadata,omitempty"`

	// `tags` is the user defined object tags to be set on destination.
	Tags []StorageKeyValue `json:"tags,omitempty"`

	// Specifies whether you want to apply a Legal Hold to the copied object.
	LegalHold *bool `json:"legal_hold"`

	// Object Retention related fields
	Mode            *StorageRetentionMode `json:"mode"`
	RetainUntilDate *time.Time            `json:"retain_until_date"`

	// Needs to be specified if progress bar is specified.
	Size int64 `json:"size,omitempty"`
}

StorageCopyDestOptions represents options specified by user for CopyObject/ComposeObject APIs.

func (StorageCopyDestOptions) ToMap

func (j StorageCopyDestOptions) ToMap() map[string]any

ToMap encodes the struct to a value map

type StorageCopySrcOptions

type StorageCopySrcOptions struct {
	// source bucket
	Bucket string `json:"bucket,omitempty"`
	// source object
	Name string `json:"name"`

	VersionID            string     `json:"version_id,omitempty"`
	MatchETag            string     `json:"match_etag,omitempty"`
	NoMatchETag          string     `json:"no_match_etag,omitempty"`
	MatchModifiedSince   *time.Time `json:"match_modified_since"`
	MatchUnmodifiedSince *time.Time `json:"match_unmodified_since"`
	MatchRange           bool       `json:"match_range,omitempty"`
	Start                int64      `json:"start,omitempty"`
	End                  int64      `json:"end,omitempty"`
}

StorageCopySrcOptions represents a source object to be copied, using server-side copying APIs.

func (StorageCopySrcOptions) ToMap

func (j StorageCopySrcOptions) ToMap() map[string]any

ToMap encodes the struct to a value map

type StorageGrant

type StorageGrant struct {
	Grantee    *StorageGrantee `json:"grantee"`
	Permission *string         `json:"permission"`
}

StorageGrant holds grant information.

func (StorageGrant) ToMap

func (j StorageGrant) ToMap() map[string]any

ToMap encodes the struct to a value map

type StorageGrantee

type StorageGrantee struct {
	ID          *string `json:"id"`
	DisplayName *string `json:"display_name"`
	URI         *string `json:"uri"`
}

StorageGrantee represents the person being granted permissions.

func (StorageGrantee) ToMap

func (j StorageGrantee) ToMap() map[string]any

ToMap encodes the struct to a value map

type StorageKeyValue added in v0.0.2

type StorageKeyValue struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

StorageKeyValue represent a key-value string pair

func StringMapToKeyValues added in v0.0.2

func StringMapToKeyValues(inputs map[string]string) []StorageKeyValue

StringMapToKeyValues converts a string map to a key value slice.

func (*StorageKeyValue) FromValue added in v0.0.2

func (j *StorageKeyValue) FromValue(input map[string]any) error

FromValue decodes values from map

func (StorageKeyValue) ToMap added in v0.0.2

func (j StorageKeyValue) ToMap() map[string]any

ToMap encodes the struct to a value map

type StorageObject

type StorageObject struct {
	// An ETag is optionally set to md5sum of an object.  In case of multipart objects,
	// ETag is of the form MD5SUM-N where MD5SUM is md5sum of all individual md5sums of
	// each parts concatenated into one string.
	ETag *string `json:"etag"`

	ClientID           string     `json:"client_id"`     // Client ID
	Bucket             string     `json:"bucket"`        // Name of the bucket
	Name               string     `json:"name"`          // Name of the object
	LastModified       time.Time  `json:"last_modified"` // Date and time the object was last modified.
	Size               *int64     `json:"size"`          // Size in bytes of the object.
	ContentType        *string    `json:"content_type"`  // A standard MIME type describing the format of the object data.
	ContentEncoding    *string    `json:"content_encoding,omitempty"`
	ContentDisposition *string    `json:"content_disposition,omitempty"`
	ContentLanguage    *string    `json:"content_language,omitempty"`
	CacheControl       *string    `json:"cache_control,omitempty"`
	Expires            *time.Time `json:"expires"` // The date and time at which the object is no longer able to be cached.
	IsDirectory        bool       `json:"is_directory"`

	// Collection of additional metadata on the object.
	// In MinIO and S3, x-amz-meta-* headers stripped "x-amz-meta-" prefix containing the first value.
	Metadata []StorageKeyValue `json:"metadata,omitempty"`

	// Raw metadata headers, eg: x-amz-meta-*, content-encoding etc... Only returned by MinIO servers.
	RawMetadata []StorageKeyValue `json:"raw_metadata,omitempty"`

	// User tags
	Tags []StorageKeyValue `json:"tags,omitempty"`

	// The total count value of tags
	TagCount int `json:"tag_count,omitempty"`

	// Owner name.
	Owner *StorageOwner `json:"owner"`

	// ACL grant.
	Grant []StorageGrant `json:"grant,omitempty"`

	// The class of storage used to store the object or the access tier on Azure blob storage.
	StorageClass *string `json:"storage_class,omitempty"`

	// Versioning related information
	IsLatest  *bool   `json:"is_latest"`
	Deleted   *bool   `json:"deleted"`
	VersionID *string `json:"version_id,omitempty"`

	// x-amz-replication-status value is either in one of the following states
	ReplicationStatus *StorageObjectReplicationStatus `json:"replication_status"`
	// set to true if delete marker has backing object version on target, and eligible to replicate
	ReplicationReady *bool `json:"replication_ready"`
	// Lifecycle expiry-date and ruleID associated with the expiry
	// not to be confused with `Expires` HTTP header.
	Expiration       *time.Time `json:"expiration"`
	ExpirationRuleID *string    `json:"expiration_rule_id"`

	Restore *StorageRestoreInfo `json:"restore"`

	// Checksum values
	StorageObjectChecksum

	// Azure Blob Store properties
	ACL                       any                    `json:"acl,omitempty"`
	AccessTierChangeTime      *time.Time             `json:"access_tier_change_time"`
	AccessTierInferred        *bool                  `json:"access_tier_inferred"`
	ArchiveStatus             *string                `json:"archive_status"`
	BlobSequenceNumber        *int64                 `json:"blob_sequence_number"`
	BlobType                  *string                `json:"blob_type"`
	ContentMD5                *string                `json:"content_md5"`
	Copy                      *StorageObjectCopyInfo `json:"copy"`
	CreationTime              *time.Time             `json:"creation_time"`
	DeletedTime               *time.Time             `json:"deleted_time"`
	CustomerProvidedKeySHA256 *string                `json:"customer_provided_key_sha256"`
	DestinationSnapshot       *string                `json:"destination_snapshot"`
	MediaLink                 *string                `json:"media_link"`
	// The name of the encryption scope under which the blob is encrypted.
	KMSKeyName         *string    `json:"kms_key_name"`
	ServerEncrypted    *bool      `json:"server_encrypted"`
	Group              *string    `json:"group"`
	RetentionUntilDate *time.Time `json:"retention_until_date"`
	RetentionMode      *string    `json:"retention_mode"`
	IncrementalCopy    *bool      `json:"incremental_copy"`
	IsSealed           *bool      `json:"sealed"`
	LastAccessTime     *time.Time `json:"last_access_time"`
	LeaseDuration      *string    `json:"lease_duration"`
	LeaseState         *string    `json:"lease_state"`
	LeaseStatus        *string    `json:"lease_status"`
	LegalHold          *bool      `json:"legal_hold"`
	Permissions        *string    `json:"permissions"`

	// If an object is in rehydrate pending state then this header is returned with priority of rehydrate. Valid values are High
	// and Standard.
	RehydratePriority      *string `json:"rehydrate_priority"`
	RemainingRetentionDays *int32  `json:"remaining_retention_days"`
	ResourceType           *string `json:"resource_type"`
}

StorageObject container for object metadata.

func (StorageObject) ToMap

func (j StorageObject) ToMap() map[string]any

ToMap encodes the struct to a value map

type StorageObjectChecksum

type StorageObjectChecksum struct {
	ChecksumCRC32     *string `json:"checksum_crc32,omitempty"`
	ChecksumCRC32C    *string `json:"checksum_crc32c,omitempty"`
	ChecksumSHA1      *string `json:"checksum_sha1,omitempty"`
	ChecksumSHA256    *string `json:"checksum_sha256,omitempty"`
	ChecksumCRC64NVME *string `json:"checksum_crc64_nvme,omitempty"`
}

StorageObjectChecksum represents checksum values of the object.

func (StorageObjectChecksum) ToMap

func (j StorageObjectChecksum) ToMap() map[string]any

ToMap encodes the struct to a value map

type StorageObjectCopyInfo

type StorageObjectCopyInfo struct {
	ID                string     `json:"id"`
	CompletionTime    *time.Time `json:"completion_time"`
	Progress          *string    `json:"progress"`
	Source            *string    `json:"source"`
	Status            *string    `json:"status"`
	StatusDescription *string    `json:"status_description"`
}

StorageObjectCopyInfo holds the copy information if the object was copied from another object.

func (StorageObjectCopyInfo) ToMap

func (j StorageObjectCopyInfo) ToMap() map[string]any

ToMap encodes the struct to a value map

type StorageObjectIncludeOptions

type StorageObjectIncludeOptions struct {
	// Include any checksums, if object was uploaded with checksum.
	// For multipart objects this is a checksum of part checksums.
	// https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
	Checksum bool
	// Include user tags in the listing
	Tags bool
	// Include objects versions in the listing
	Versions bool
	// Include objects metadata in the listing
	Metadata bool

	Copy        bool
	Snapshots   bool
	LegalHold   bool
	Retention   bool
	Permissions bool
	Lifecycle   bool
	Encryption  bool
}

StorageObjectIncludeOptions hold options to be included for the object information.

func (StorageObjectIncludeOptions) IsEmpty

func (soi StorageObjectIncludeOptions) IsEmpty() bool

IsEmpty checks if all include options are empty

type StorageObjectListResults

type StorageObjectListResults struct {
	Objects  []StorageObject       `json:"objects"`
	PageInfo StoragePaginationInfo `json:"pageInfo"`
}

StorageObjectListResults hold the paginated results of the storage object list.

func (StorageObjectListResults) ToMap

func (j StorageObjectListResults) ToMap() map[string]any

ToMap encodes the struct to a value map

type StorageObjectLockConfig

type StorageObjectLockConfig struct {
	SetStorageObjectLockConfig

	Enabled bool `json:"enabled"`
}

StorageObjectLockConfig represents the object lock configuration in given bucket

func (StorageObjectLockConfig) ToMap

func (j StorageObjectLockConfig) ToMap() map[string]any

ToMap encodes the struct to a value map

type StorageObjectMultipartInfo

type StorageObjectMultipartInfo struct {
	// Date and time at which the multipart upload was initiated.
	Initiated *time.Time `json:"initiated"`

	// The type of storage to use for the object. Defaults to 'STANDARD'.
	StorageClass *string `json:"storage_class"`

	// Key of the object for which the multipart upload was initiated.
	Name *string `json:"name"`

	// Size in bytes of the object.
	Size *int64 `json:"size"`

	// Upload ID that identifies the multipart upload.
	UploadID *string `json:"upload_id"`
}

StorageObjectMultipartInfo container for multipart object metadata.

func (StorageObjectMultipartInfo) ToMap

func (j StorageObjectMultipartInfo) ToMap() map[string]any

ToMap encodes the struct to a value map

type StorageObjectReplicationStatus

type StorageObjectReplicationStatus string

StorageObjectReplicationStatus represents the x-amz-replication-status value enum. @enum COMPLETED,PENDING,FAILED,REPLICA

const (
	StorageObjectReplicationStatusCompleted StorageObjectReplicationStatus = "COMPLETED"
	StorageObjectReplicationStatusPending   StorageObjectReplicationStatus = "PENDING"
	StorageObjectReplicationStatusFailed    StorageObjectReplicationStatus = "FAILED"
	StorageObjectReplicationStatusReplica   StorageObjectReplicationStatus = "REPLICA"
)

func ParseStorageObjectReplicationStatus

func ParseStorageObjectReplicationStatus(input string) (StorageObjectReplicationStatus, error)

ParseStorageObjectReplicationStatus parses a StorageObjectReplicationStatus enum from string

func (*StorageObjectReplicationStatus) FromValue

func (s *StorageObjectReplicationStatus) FromValue(value any) error

FromValue decodes the scalar from an unknown value

func (StorageObjectReplicationStatus) IsValid

IsValid checks if the value is invalid

func (StorageObjectReplicationStatus) ScalarName

func (j StorageObjectReplicationStatus) ScalarName() string

ScalarName get the schema name of the scalar

func (*StorageObjectReplicationStatus) UnmarshalJSON

func (j *StorageObjectReplicationStatus) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type StorageObjectSoftDeletePolicy

type StorageObjectSoftDeletePolicy struct {
	// EffectiveTime indicates the time from which the policy, or one with a
	// greater retention, was effective. This field is read-only.
	EffectiveTime time.Time `json:"effective_time"`

	// RetentionDuration is the amount of time that soft-deleted objects in the
	// bucket will be retained and cannot be permanently deleted.
	RetentionDuration scalar.DurationString `json:"retention_duration"`
}

StorageObjectSoftDeletePolicy contains the bucket's soft delete policy, which defines the period of time that soft-deleted objects will be retained, and cannot be permanently deleted.

func (StorageObjectSoftDeletePolicy) ToMap

ToMap encodes the struct to a value map

type StorageOwner

type StorageOwner struct {
	DisplayName *string `json:"name"`
	ID          *string `json:"id"`
}

StorageOwner name.

func (StorageOwner) ToMap

func (j StorageOwner) ToMap() map[string]any

ToMap encodes the struct to a value map

type StoragePaginationInfo

type StoragePaginationInfo struct {
	HasNextPage bool `json:"hasNextPage"`
}

StoragePaginationInfo holds the pagination information.

func (StoragePaginationInfo) ToMap

func (j StoragePaginationInfo) ToMap() map[string]any

ToMap encodes the struct to a value map

type StorageProviderType

type StorageProviderType string

StorageProviderType represents a storage provider type enum. @enum s3,gcs,azblob,fs

const (
	StorageProviderTypeS3     StorageProviderType = "s3"
	StorageProviderTypeGcs    StorageProviderType = "gcs"
	StorageProviderTypeAzblob StorageProviderType = "azblob"
	StorageProviderTypeFs     StorageProviderType = "fs"
)

func ParseStorageProviderType

func ParseStorageProviderType(input string) (StorageProviderType, error)

ParseStorageProviderType parses a StorageProviderType enum from string

func (*StorageProviderType) FromValue added in v0.0.4

func (s *StorageProviderType) FromValue(value any) error

FromValue decodes the scalar from an unknown value

func (StorageProviderType) IsValid added in v0.0.4

func (j StorageProviderType) IsValid() bool

IsValid checks if the value is invalid

func (StorageProviderType) JSONSchema

func (spt StorageProviderType) JSONSchema() *jsonschema.Schema

JSONSchema is used to generate a custom jsonschema.

func (StorageProviderType) ScalarName added in v0.0.4

func (j StorageProviderType) ScalarName() string

ScalarName get the schema name of the scalar

func (*StorageProviderType) UnmarshalJSON added in v0.0.4

func (j *StorageProviderType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (StorageProviderType) Validate

func (spt StorageProviderType) Validate() error

Validate checks if the provider type is valid.

type StorageReplicationConfig

type StorageReplicationConfig struct {
	Rules []StorageReplicationRule `json:"rules"`
	Role  *string                  `json:"role"`
}

StorageReplicationConfig replication configuration specified in https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html

type StorageReplicationDestination

type StorageReplicationDestination struct {
	Bucket       string  `json:"bucket"`
	StorageClass *string `json:"storage_class,omitempty"`
}

Destination the destination in ReplicationConfiguration.

type StorageReplicationFilter

type StorageReplicationFilter struct {
	Prefix *string                      `json:"prefix,omitempty"`
	And    *StorageReplicationFilterAnd `json:"and,omitempty"`
	Tag    []StorageKeyValue            `json:"tag,omitempty"`
}

StorageReplicationFilter a filter for a replication configuration Rule.

type StorageReplicationFilterAnd

type StorageReplicationFilterAnd struct {
	Prefix *string           `json:"prefix,omitempty"`
	Tags   []StorageKeyValue `json:"tag,omitempty"`
}

StorageReplicationFilterAnd - a tag to combine a prefix and multiple tags for replication configuration rule.

type StorageReplicationRule

type StorageReplicationRule struct {
	ID                        *string                        `json:"id,omitempty"`
	Status                    StorageReplicationRuleStatus   `json:"status"`
	Priority                  int                            `json:"priority"`
	DeleteMarkerReplication   *DeleteMarkerReplication       `json:"delete_marker_replication"`
	DeleteReplication         *DeleteReplication             `json:"delete_replication"`
	Destination               *StorageReplicationDestination `json:"destination"`
	Filter                    StorageReplicationFilter       `json:"filter"`
	SourceSelectionCriteria   *SourceSelectionCriteria       `json:"source_selection_criteria"`
	ExistingObjectReplication *ExistingObjectReplication     `json:"existing_object_replication,omitempty"`
}

StorageReplicationRule a rule for replication configuration.

type StorageReplicationRuleStatus

type StorageReplicationRuleStatus string

StorageReplicationRuleStatus represents Enabled/Disabled status @enum Enabled,Disabled

type StorageRestoreInfo

type StorageRestoreInfo struct {
	// Is the restoring operation is still ongoing
	OngoingRestore bool `json:"ongoing_restore"`
	// When the restored copy of the archived object will be removed
	ExpiryTime *time.Time `json:"expiry_time"`
}

StorageRestoreInfo contains information of the restore operation of an archived object.

func (StorageRestoreInfo) ToMap

func (j StorageRestoreInfo) ToMap() map[string]any

ToMap encodes the struct to a value map

type StorageRetentionMode

type StorageRetentionMode string

StorageRetentionMode the object retention mode. @enum Locked,Unlocked,Mutable,Delete

const (
	StorageRetentionModeLocked   StorageRetentionMode = "Locked"
	StorageRetentionModeUnlocked StorageRetentionMode = "Unlocked"
	StorageRetentionModeMutable  StorageRetentionMode = "Mutable"
	StorageRetentionModeDelete   StorageRetentionMode = "Delete"
)

func ParseStorageRetentionMode

func ParseStorageRetentionMode(input string) (StorageRetentionMode, error)

ParseStorageRetentionMode parses a StorageRetentionMode enum from string

func (*StorageRetentionMode) FromValue

func (s *StorageRetentionMode) FromValue(value any) error

FromValue decodes the scalar from an unknown value

func (StorageRetentionMode) IsValid

func (j StorageRetentionMode) IsValid() bool

IsValid checks if the value is invalid

func (StorageRetentionMode) ScalarName

func (j StorageRetentionMode) ScalarName() string

ScalarName get the schema name of the scalar

func (*StorageRetentionMode) UnmarshalJSON

func (j *StorageRetentionMode) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type StorageRetentionValidityUnit

type StorageRetentionValidityUnit string

StorageRetentionValidityUnit retention validity unit. @enum DAYS,YEARS

const (
	StorageRetentionValidityUnitDays  StorageRetentionValidityUnit = "DAYS"
	StorageRetentionValidityUnitYears StorageRetentionValidityUnit = "YEARS"
)

func ParseStorageRetentionValidityUnit

func ParseStorageRetentionValidityUnit(input string) (StorageRetentionValidityUnit, error)

ParseStorageRetentionValidityUnit parses a StorageRetentionValidityUnit enum from string

func (*StorageRetentionValidityUnit) FromValue

func (s *StorageRetentionValidityUnit) FromValue(value any) error

FromValue decodes the scalar from an unknown value

func (StorageRetentionValidityUnit) IsValid

func (j StorageRetentionValidityUnit) IsValid() bool

IsValid checks if the value is invalid

func (StorageRetentionValidityUnit) ScalarName

func (j StorageRetentionValidityUnit) ScalarName() string

ScalarName get the schema name of the scalar

func (*StorageRetentionValidityUnit) UnmarshalJSON

func (j *StorageRetentionValidityUnit) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type StorageUploadInfo

type StorageUploadInfo struct {
	// An ETag is optionally set to md5sum of an object.  In case of multipart objects,
	// ETag is of the form MD5SUM-N where MD5SUM is md5sum of all individual md5sums of
	// each parts concatenated into one string.
	ETag *string `json:"etag"`

	ClientID     string     `json:"client_id"`     // Client ID
	Bucket       string     `json:"bucket"`        // Name of the bucket
	Name         string     `json:"name"`          // Name of the object
	LastModified *time.Time `json:"last_modified"` // Date and time the object was last modified.
	Size         *int64     `json:"size"`          // Size in bytes of the object.
	Location     *string    `json:"location"`
	VersionID    *string    `json:"version_id"`
	ContentMD5   *string    `json:"content_md5"`

	// Lifecycle expiry-date and ruleID associated with the expiry
	// not to be confused with `Expires` HTTP header.
	Expiration       *time.Time `json:"expiration"`
	ExpirationRuleID *string    `json:"expiration_rule_id"`

	// Checksum values
	StorageObjectChecksum
}

StorageUploadInfo represents the information of the uploaded object.

func (StorageUploadInfo) ToMap

func (j StorageUploadInfo) ToMap() map[string]any

ToMap encodes the struct to a value map

type UpdateBucketArguments

type UpdateBucketArguments struct {
	GetStorageBucketArguments
	UpdateStorageBucketOptions
}

UpdateBucketArguments hold update options for the bucket.

type UpdateStorageBucketOptions

type UpdateStorageBucketOptions struct {
	Tags              *[]StorageKeyValue                 `json:"tags"`
	VersioningEnabled *bool                              `json:"versioning_enabled"`
	Lifecycle         *ObjectLifecycleConfiguration      `json:"lifecycle"`
	Encryption        *ServerSideEncryptionConfiguration `json:"encryption"`
	ObjectLock        *SetStorageObjectLockConfig        `json:"object_lock"`
}

UpdateStorageBucketOptions hold update options for the bucket.

func (UpdateStorageBucketOptions) IsEmpty

func (ubo UpdateStorageBucketOptions) IsEmpty() bool

IsEmpty checks if all elements in the option object is null.

func (UpdateStorageBucketOptions) ToMap

func (j UpdateStorageBucketOptions) ToMap() map[string]any

ToMap encodes the struct to a value map

type UpdateStorageObjectArguments

type UpdateStorageObjectArguments struct {
	StorageBucketArguments
	UpdateStorageObjectOptions

	Name  string            `json:"name"`
	Where schema.Expression `json:"where" ndc:"predicate=StorageObjectFilter"`
}

UpdateStorageObjectArguments represents options specified by user for updating object.

type UpdateStorageObjectOptions

type UpdateStorageObjectOptions struct {
	VersionID string                            `json:"version_id,omitempty"`
	Retention *SetStorageObjectRetentionOptions `json:"retention"`
	LegalHold *bool                             `json:"legal_hold"`
	Metadata  *[]StorageKeyValue                `json:"metadata"`
	Tags      *[]StorageKeyValue                `json:"tags"`
}

UpdateStorageObjectOptions represents options specified by user for updating object.

func (UpdateStorageObjectOptions) IsEmpty

func (ubo UpdateStorageObjectOptions) IsEmpty() bool

IsEmpty checks if all elements in the option object is null.

func (UpdateStorageObjectOptions) ToMap

func (j UpdateStorageObjectOptions) ToMap() map[string]any

ToMap encodes the struct to a value map

type UploadStorageObjectFromURLArguments added in v0.0.4

type UploadStorageObjectFromURLArguments struct {
	PutStorageObjectArguments
	HTTPRequestOptions
}

UploadStorageObjectFromURLArguments represents input arguments of the UploadStorageObjectFromURL method.

Directories

Path Synopsis
Code generated by github.com/hasura/ndc-sdk-go/cmd/hasura-ndc-go, DO NOT EDIT.
Code generated by github.com/hasura/ndc-sdk-go/cmd/hasura-ndc-go, DO NOT EDIT.

Jump to

Keyboard shortcuts

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