storage

package
v0.44.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessKey added in v0.40.0

type AccessKey struct {
	// Access key ID used as the username in S3 authentication. Pass this in the
	// `AWS_ACCESS_KEY_ID` field of your S3 client configuration.
	AccessKey string `json:"access_key" api:"required"`
	// ISO 8601 timestamp when the access key was created
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AccessKey   respjson.Field
		CreatedAt   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AccessKey) RawJSON added in v0.40.0

func (r AccessKey) RawJSON() string

Returns the unmodified JSON received from the API

func (*AccessKey) UnmarshalJSON added in v0.40.0

func (r *AccessKey) UnmarshalJSON(data []byte) error

type AccessKeyCreated added in v0.40.0

type AccessKeyCreated struct {
	// Access key ID used as the username in S3 authentication. Pass this in the
	// `AWS_ACCESS_KEY_ID` field of your S3 client.
	AccessKey string `json:"access_key" api:"required"`
	// ISO 8601 timestamp when the access key was created
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Secret key used as the password in S3 authentication. Save this now — it cannot
	// be retrieved again.
	SecretKey string `json:"secret_key" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AccessKey   respjson.Field
		CreatedAt   respjson.Field
		SecretKey   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AccessKeyCreated) RawJSON added in v0.40.0

func (r AccessKeyCreated) RawJSON() string

Returns the unmodified JSON received from the API

func (*AccessKeyCreated) UnmarshalJSON added in v0.40.0

func (r *AccessKeyCreated) UnmarshalJSON(data []byte) error

type Bucket

type Bucket struct {
	Cors      BucketCors      `json:"cors" api:"required"`
	Lifecycle BucketLifecycle `json:"lifecycle" api:"required"`
	// Globally unique bucket name within the storage. Used as the path prefix when
	// accessing objects via S3 API.
	Name   string       `json:"name" api:"required"`
	Policy BucketPolicy `json:"policy" api:"required"`
	// Parent storage this bucket belongs to. Use this ID in the URL path for bucket
	// operations.
	StorageID int64 `json:"storage_id" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Cors        respjson.Field
		Lifecycle   respjson.Field
		Name        respjson.Field
		Policy      respjson.Field
		StorageID   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Bucket) RawJSON

func (r Bucket) RawJSON() string

Returns the unmodified JSON received from the API

func (*Bucket) UnmarshalJSON

func (r *Bucket) UnmarshalJSON(data []byte) error

type BucketCors

type BucketCors struct {
	// Web domains allowed to make direct browser requests to this bucket (e.g.,
	// "https://myapp.com"). Use "\*" to allow any origin.
	AllowedOrigins []string `json:"allowed_origins" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AllowedOrigins respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BucketCors) RawJSON

func (r BucketCors) RawJSON() string

Returns the unmodified JSON received from the API

func (*BucketCors) UnmarshalJSON

func (r *BucketCors) UnmarshalJSON(data []byte) error

type BucketLifecycle added in v0.40.0

type BucketLifecycle struct {
	// Days after upload before objects are automatically deleted. For example, 30
	// means files are removed 30 days after creation.
	ExpirationDays int64 `json:"expiration_days" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ExpirationDays respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BucketLifecycle) RawJSON added in v0.40.0

func (r BucketLifecycle) RawJSON() string

Returns the unmodified JSON received from the API

func (*BucketLifecycle) UnmarshalJSON added in v0.40.0

func (r *BucketLifecycle) UnmarshalJSON(data []byte) error

type BucketPolicy added in v0.40.0

type BucketPolicy struct {
	// When true, anyone can download objects without credentials. When false, all
	// requests require valid S3 authentication.
	IsPublic bool `json:"is_public" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		IsPublic    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BucketPolicy) RawJSON added in v0.40.0

func (r BucketPolicy) RawJSON() string

Returns the unmodified JSON received from the API

func (*BucketPolicy) UnmarshalJSON added in v0.40.0

func (r *BucketPolicy) UnmarshalJSON(data []byte) error

type Error

type Error = apierror.Error

type Location

type Location struct {
	// Full hostname/address for accessing the storage endpoint.
	Address string `json:"address" api:"required"`
	// Human-readable display name for the location.
	Name string `json:"name" api:"required"`
	// Internal technical identifier for the location
	TechnicalName string `json:"technical_name" api:"required"`
	// Display title for the location (English). Null if no title is set.
	Title string `json:"title" api:"required"`
	// Storage type supported by this location
	//
	// Any of "s3_compatible", "sftp".
	Type LocationType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Address       respjson.Field
		Name          respjson.Field
		TechnicalName respjson.Field
		Title         respjson.Field
		Type          respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Location) RawJSON

func (r Location) RawJSON() string

Returns the unmodified JSON received from the API

func (*Location) UnmarshalJSON

func (r *Location) UnmarshalJSON(data []byte) error

type LocationListParams

type LocationListParams struct {
	// Max number of records in response
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Number of records to skip before beginning to return results
	Offset  param.Opt[int64]  `query:"offset,omitzero" json:"-"`
	OrderBy param.Opt[string] `query:"order_by,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (LocationListParams) URLQuery

func (r LocationListParams) URLQuery() (v url.Values, err error)

URLQuery serializes LocationListParams's query parameters as `url.Values`.

type LocationService

type LocationService struct {
	Options []option.RequestOption
}

Locations represent cloud regions where new storages can be created.

LocationService contains methods and other services that help with interacting with the gcore API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLocationService method instead.

func NewLocationService

func NewLocationService(opts ...option.RequestOption) (r LocationService)

NewLocationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*LocationService) List

Returns storage locations where you can create new storages. Only locations currently accepting new storage creation are returned.

func (*LocationService) ListAutoPaging

Returns storage locations where you can create new storages. Only locations currently accepting new storage creation are returned.

type LocationType

type LocationType string

Storage type supported by this location

const (
	LocationTypeS3Compatible LocationType = "s3_compatible"
	LocationTypeSftp         LocationType = "sftp"
)

type ObjectStorageAccessKeyDeleteParams added in v0.40.0

type ObjectStorageAccessKeyDeleteParams struct {
	StorageID int64 `path:"storage_id" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type ObjectStorageAccessKeyListParams added in v0.40.0

type ObjectStorageAccessKeyListParams struct {
	// Max number of records in response
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Number of records to skip before beginning to return results
	Offset  param.Opt[int64]  `query:"offset,omitzero" json:"-"`
	OrderBy param.Opt[string] `query:"order_by,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ObjectStorageAccessKeyListParams) URLQuery added in v0.40.0

func (r ObjectStorageAccessKeyListParams) URLQuery() (v url.Values, err error)

URLQuery serializes ObjectStorageAccessKeyListParams's query parameters as `url.Values`.

type ObjectStorageAccessKeyService added in v0.40.0

type ObjectStorageAccessKeyService struct {
	Options []option.RequestOption
}

ObjectStorageAccessKeyService contains methods and other services that help with interacting with the gcore API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewObjectStorageAccessKeyService method instead.

func NewObjectStorageAccessKeyService added in v0.40.0

func NewObjectStorageAccessKeyService(opts ...option.RequestOption) (r ObjectStorageAccessKeyService)

NewObjectStorageAccessKeyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ObjectStorageAccessKeyService) Delete added in v0.40.0

Deletes an access key from an S3-compatible storage.

func (*ObjectStorageAccessKeyService) List added in v0.40.0

Returns a list of access keys for an S3-compatible storage.

func (*ObjectStorageAccessKeyService) ListAutoPaging added in v0.40.0

Returns a list of access keys for an S3-compatible storage.

func (*ObjectStorageAccessKeyService) New added in v0.40.0

func (r *ObjectStorageAccessKeyService) New(ctx context.Context, storageID int64, opts ...option.RequestOption) (res *AccessKeyCreated, err error)

Creates a new access key for an S3-compatible storage. Returns the new access key and secret key. Maximum 2 access keys per storage.

type ObjectStorageBucketDeleteParams added in v0.40.0

type ObjectStorageBucketDeleteParams struct {
	StorageID int64 `path:"storage_id" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type ObjectStorageBucketGetParams added in v0.40.0

type ObjectStorageBucketGetParams struct {
	StorageID int64 `path:"storage_id" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type ObjectStorageBucketListParams added in v0.40.0

type ObjectStorageBucketListParams struct {
	// Max number of records in response
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Number of records to skip before beginning to return results
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ObjectStorageBucketListParams) URLQuery added in v0.40.0

func (r ObjectStorageBucketListParams) URLQuery() (v url.Values, err error)

URLQuery serializes ObjectStorageBucketListParams's query parameters as `url.Values`.

type ObjectStorageBucketNewParams added in v0.40.0

type ObjectStorageBucketNewParams struct {
	// Name of the bucket to create
	Name string `json:"name" api:"required"`
	// contains filtered or unexported fields
}

func (ObjectStorageBucketNewParams) MarshalJSON added in v0.40.0

func (r ObjectStorageBucketNewParams) MarshalJSON() (data []byte, err error)

func (*ObjectStorageBucketNewParams) UnmarshalJSON added in v0.40.0

func (r *ObjectStorageBucketNewParams) UnmarshalJSON(data []byte) error

type ObjectStorageBucketService added in v0.40.0

type ObjectStorageBucketService struct {
	Options []option.RequestOption
}

ObjectStorageBucketService contains methods and other services that help with interacting with the gcore API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewObjectStorageBucketService method instead.

func NewObjectStorageBucketService added in v0.40.0

func NewObjectStorageBucketService(opts ...option.RequestOption) (r ObjectStorageBucketService)

NewObjectStorageBucketService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ObjectStorageBucketService) Delete added in v0.40.0

Removes a bucket from an S3-compatible storage. All objects in the bucket will be deleted.

func (*ObjectStorageBucketService) Get added in v0.40.0

Returns bucket configuration including CORS, Lifecycle, and Policy settings in a consolidated response.

func (*ObjectStorageBucketService) List added in v0.40.0

Returns a paginated list of buckets for an S3-compatible storage, including each bucket's CORS, Lifecycle, and Policy configuration. Results are sorted alphabetically by bucket name (ascending).

func (*ObjectStorageBucketService) ListAutoPaging added in v0.40.0

Returns a paginated list of buckets for an S3-compatible storage, including each bucket's CORS, Lifecycle, and Policy configuration. Results are sorted alphabetically by bucket name (ascending).

func (*ObjectStorageBucketService) New added in v0.40.0

Creates a new bucket within an S3-compatible storage.

func (*ObjectStorageBucketService) Update added in v0.40.0

func (r *ObjectStorageBucketService) Update(ctx context.Context, bucketName string, params ObjectStorageBucketUpdateParams, opts ...option.RequestOption) (res *Bucket, err error)

Updates bucket CORS, Lifecycle, and/or Policy settings. Supports partial updates - only specified fields will be modified.

Lifecycle: set `expiration_days` to a positive integer to enable, null or 0 to remove. Negative values return 400. CORS: set `allowed_origins` to a non-empty array to configure, empty array to remove. Policy: set `is_public` to true/false to update.

type ObjectStorageBucketUpdateParams added in v0.40.0

type ObjectStorageBucketUpdateParams struct {
	StorageID int64                                    `path:"storage_id" api:"required" json:"-"`
	Cors      ObjectStorageBucketUpdateParamsCors      `json:"cors,omitzero"`
	Lifecycle ObjectStorageBucketUpdateParamsLifecycle `json:"lifecycle,omitzero"`
	Policy    ObjectStorageBucketUpdateParamsPolicy    `json:"policy,omitzero"`
	// contains filtered or unexported fields
}

func (ObjectStorageBucketUpdateParams) MarshalJSON added in v0.40.0

func (r ObjectStorageBucketUpdateParams) MarshalJSON() (data []byte, err error)

func (*ObjectStorageBucketUpdateParams) UnmarshalJSON added in v0.40.0

func (r *ObjectStorageBucketUpdateParams) UnmarshalJSON(data []byte) error

type ObjectStorageBucketUpdateParamsCors added in v0.40.0

type ObjectStorageBucketUpdateParamsCors struct {
	// Web domains allowed to make direct browser requests. Send an empty array to
	// remove CORS configuration.
	AllowedOrigins []string `json:"allowed_origins,omitzero"`
	// contains filtered or unexported fields
}

func (ObjectStorageBucketUpdateParamsCors) MarshalJSON added in v0.40.0

func (r ObjectStorageBucketUpdateParamsCors) MarshalJSON() (data []byte, err error)

func (*ObjectStorageBucketUpdateParamsCors) UnmarshalJSON added in v0.40.0

func (r *ObjectStorageBucketUpdateParamsCors) UnmarshalJSON(data []byte) error

type ObjectStorageBucketUpdateParamsLifecycle added in v0.40.0

type ObjectStorageBucketUpdateParamsLifecycle struct {
	// Days before objects are automatically deleted. Set to a positive number to
	// enable, or null/0 to remove the rule.
	ExpirationDays param.Opt[int64] `json:"expiration_days,omitzero"`
	// contains filtered or unexported fields
}

func (ObjectStorageBucketUpdateParamsLifecycle) MarshalJSON added in v0.40.0

func (r ObjectStorageBucketUpdateParamsLifecycle) MarshalJSON() (data []byte, err error)

func (*ObjectStorageBucketUpdateParamsLifecycle) UnmarshalJSON added in v0.40.0

func (r *ObjectStorageBucketUpdateParamsLifecycle) UnmarshalJSON(data []byte) error

type ObjectStorageBucketUpdateParamsPolicy added in v0.40.0

type ObjectStorageBucketUpdateParamsPolicy struct {
	// Set to true to allow unauthenticated object downloads, false to require valid S3
	// credentials.
	IsPublic param.Opt[bool] `json:"is_public,omitzero"`
	// contains filtered or unexported fields
}

func (ObjectStorageBucketUpdateParamsPolicy) MarshalJSON added in v0.40.0

func (r ObjectStorageBucketUpdateParamsPolicy) MarshalJSON() (data []byte, err error)

func (*ObjectStorageBucketUpdateParamsPolicy) UnmarshalJSON added in v0.40.0

func (r *ObjectStorageBucketUpdateParamsPolicy) UnmarshalJSON(data []byte) error

type ObjectStorageListParams added in v0.40.0

type ObjectStorageListParams struct {
	// Filter by storage ID
	ID param.Opt[string] `query:"id,omitzero" json:"-"`
	// Max number of records in response
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Filter by storage location/region
	LocationName param.Opt[string] `query:"location_name,omitzero" json:"-"`
	// Filter by storage name
	Name param.Opt[string] `query:"name,omitzero" json:"-"`
	// Number of records to skip
	Offset  param.Opt[int64]  `query:"offset,omitzero" json:"-"`
	OrderBy param.Opt[string] `query:"order_by,omitzero" json:"-"`
	// Include deleted storages
	ShowDeleted param.Opt[bool] `query:"show_deleted,omitzero" json:"-"`
	// Filter by provisioning status
	//
	// Any of "active", "creating", "updating", "deleting", "deleted".
	ProvisioningStatus ObjectStorageListParamsProvisioningStatus `query:"provisioning_status,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ObjectStorageListParams) URLQuery added in v0.40.0

func (r ObjectStorageListParams) URLQuery() (v url.Values, err error)

URLQuery serializes ObjectStorageListParams's query parameters as `url.Values`.

type ObjectStorageListParamsProvisioningStatus added in v0.40.0

type ObjectStorageListParamsProvisioningStatus string

Filter by provisioning status

const (
	ObjectStorageListParamsProvisioningStatusActive   ObjectStorageListParamsProvisioningStatus = "active"
	ObjectStorageListParamsProvisioningStatusCreating ObjectStorageListParamsProvisioningStatus = "creating"
	ObjectStorageListParamsProvisioningStatusUpdating ObjectStorageListParamsProvisioningStatus = "updating"
	ObjectStorageListParamsProvisioningStatusDeleting ObjectStorageListParamsProvisioningStatus = "deleting"
	ObjectStorageListParamsProvisioningStatusDeleted  ObjectStorageListParamsProvisioningStatus = "deleted"
)

type ObjectStorageNewParams added in v0.40.0

type ObjectStorageNewParams struct {
	// Location code where the storage should be created
	LocationName string `json:"location_name" api:"required"`
	// User-defined name for the storage instance
	Name string `json:"name" api:"required"`
	// contains filtered or unexported fields
}

func (ObjectStorageNewParams) MarshalJSON added in v0.40.0

func (r ObjectStorageNewParams) MarshalJSON() (data []byte, err error)

func (*ObjectStorageNewParams) UnmarshalJSON added in v0.40.0

func (r *ObjectStorageNewParams) UnmarshalJSON(data []byte) error

type ObjectStorageService added in v0.40.0

type ObjectStorageService struct {
	Options    []option.RequestOption
	AccessKeys ObjectStorageAccessKeyService
	Buckets    ObjectStorageBucketService
}

ObjectStorageService contains methods and other services that help with interacting with the gcore API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewObjectStorageService method instead.

func NewObjectStorageService added in v0.40.0

func NewObjectStorageService(opts ...option.RequestOption) (r ObjectStorageService)

NewObjectStorageService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ObjectStorageService) Delete added in v0.40.0

func (r *ObjectStorageService) Delete(ctx context.Context, storageID int64, opts ...option.RequestOption) (err error)

Deletes an S3-compatible storage instance. This operation cannot be undone.

func (*ObjectStorageService) Get added in v0.40.0

func (r *ObjectStorageService) Get(ctx context.Context, storageID int64, opts ...option.RequestOption) (res *S3Storage, err error)

Returns details of a specific S3-compatible storage instance.

func (*ObjectStorageService) List added in v0.40.0

Returns a paginated list of S3-compatible storage instances for the authenticated client.

func (*ObjectStorageService) ListAutoPaging added in v0.40.0

Returns a paginated list of S3-compatible storage instances for the authenticated client.

func (*ObjectStorageService) New added in v0.40.0

Creates a new S3-compatible storage instance in the specified location and returns the storage details including credentials.

func (*ObjectStorageService) Restore added in v0.40.0

func (r *ObjectStorageService) Restore(ctx context.Context, storageID int64, opts ...option.RequestOption) (err error)

Restores a previously deleted S3-compatible storage instance if it was deleted within the last 2 weeks.

type S3Storage added in v0.40.0

type S3Storage struct {
	// Unique identifier for the storage instance
	ID int64 `json:"id" api:"required"`
	// Full hostname/address for accessing the storage endpoint
	Address string `json:"address" api:"required"`
	// ISO 8601 timestamp when the storage was created
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Read-only internal full name of the storage, composed as "{`client_id`}-{name}".
	// Used internally by the backend. Clients should continue to identify the storage
	// by `name`.
	FullName string `json:"full_name" api:"required"`
	// Geographic location code where the storage is provisioned
	LocationName string `json:"location_name" api:"required"`
	// User-defined name for the storage instance, as supplied at creation time.
	Name string `json:"name" api:"required"`
	// Lifecycle status of the storage. Use this to check readiness before operations.
	//
	// Any of "creating", "active", "updating", "deleting", "deleted".
	ProvisioningStatus S3StorageProvisioningStatus `json:"provisioning_status" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                 respjson.Field
		Address            respjson.Field
		CreatedAt          respjson.Field
		FullName           respjson.Field
		LocationName       respjson.Field
		Name               respjson.Field
		ProvisioningStatus respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (S3Storage) RawJSON added in v0.40.0

func (r S3Storage) RawJSON() string

Returns the unmodified JSON received from the API

func (*S3Storage) UnmarshalJSON added in v0.40.0

func (r *S3Storage) UnmarshalJSON(data []byte) error

type S3StorageCreated added in v0.40.0

type S3StorageCreated struct {
	// Unique identifier for the storage instance
	ID int64 `json:"id" api:"required"`
	// S3 access keys
	AccessKeys []S3StorageCreatedAccessKey `json:"access_keys" api:"required"`
	// Full hostname/address for accessing the storage endpoint
	Address string `json:"address" api:"required"`
	// ISO 8601 timestamp when the storage was created
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Read-only internal full name of the storage, composed as "{`client_id`}-{name}".
	// Used internally by the backend. Clients should continue to identify the storage
	// by `name`.
	FullName string `json:"full_name" api:"required"`
	// Geographic location code where the storage is provisioned
	LocationName string `json:"location_name" api:"required"`
	// User-defined name for the storage instance, as supplied at creation time.
	Name string `json:"name" api:"required"`
	// Lifecycle status of the storage. Use this to check readiness before operations.
	//
	// Any of "creating", "active", "updating", "deleting", "deleted".
	ProvisioningStatus S3StorageCreatedProvisioningStatus `json:"provisioning_status" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                 respjson.Field
		AccessKeys         respjson.Field
		Address            respjson.Field
		CreatedAt          respjson.Field
		FullName           respjson.Field
		LocationName       respjson.Field
		Name               respjson.Field
		ProvisioningStatus respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (S3StorageCreated) RawJSON added in v0.40.0

func (r S3StorageCreated) RawJSON() string

Returns the unmodified JSON received from the API

func (*S3StorageCreated) UnmarshalJSON added in v0.40.0

func (r *S3StorageCreated) UnmarshalJSON(data []byte) error

type S3StorageCreatedAccessKey added in v0.40.0

type S3StorageCreatedAccessKey struct {
	// Access key ID used as the username in S3 authentication. Pass this in the
	// `AWS_ACCESS_KEY_ID` field of your S3 client.
	AccessKey string `json:"access_key" api:"required"`
	// Secret key used as the password in S3 authentication. Save this now — it cannot
	// be retrieved again.
	SecretKey string `json:"secret_key" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AccessKey   respjson.Field
		SecretKey   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (S3StorageCreatedAccessKey) RawJSON added in v0.40.0

func (r S3StorageCreatedAccessKey) RawJSON() string

Returns the unmodified JSON received from the API

func (*S3StorageCreatedAccessKey) UnmarshalJSON added in v0.40.0

func (r *S3StorageCreatedAccessKey) UnmarshalJSON(data []byte) error

type S3StorageCreatedProvisioningStatus added in v0.40.0

type S3StorageCreatedProvisioningStatus string

Lifecycle status of the storage. Use this to check readiness before operations.

const (
	S3StorageCreatedProvisioningStatusCreating S3StorageCreatedProvisioningStatus = "creating"
	S3StorageCreatedProvisioningStatusActive   S3StorageCreatedProvisioningStatus = "active"
	S3StorageCreatedProvisioningStatusUpdating S3StorageCreatedProvisioningStatus = "updating"
	S3StorageCreatedProvisioningStatusDeleting S3StorageCreatedProvisioningStatus = "deleting"
	S3StorageCreatedProvisioningStatusDeleted  S3StorageCreatedProvisioningStatus = "deleted"
)

type S3StorageProvisioningStatus added in v0.40.0

type S3StorageProvisioningStatus string

Lifecycle status of the storage. Use this to check readiness before operations.

const (
	S3StorageProvisioningStatusCreating S3StorageProvisioningStatus = "creating"
	S3StorageProvisioningStatusActive   S3StorageProvisioningStatus = "active"
	S3StorageProvisioningStatusUpdating S3StorageProvisioningStatus = "updating"
	S3StorageProvisioningStatusDeleting S3StorageProvisioningStatus = "deleting"
	S3StorageProvisioningStatusDeleted  S3StorageProvisioningStatus = "deleted"
)

type SSHKey added in v0.40.0

type SSHKey struct {
	// Unique identifier for the SSH key
	ID int64 `json:"id" api:"required"`
	// ISO 8601 timestamp when the SSH key was created
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// User-defined name for the SSH key
	Name string `json:"name" api:"required"`
	// The SSH public key content
	PublicKey string `json:"public_key" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		Name        respjson.Field
		PublicKey   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SSHKey) RawJSON added in v0.40.0

func (r SSHKey) RawJSON() string

Returns the unmodified JSON received from the API

func (*SSHKey) UnmarshalJSON added in v0.40.0

func (r *SSHKey) UnmarshalJSON(data []byte) error

type SSHKeyListParams added in v0.40.0

type SSHKeyListParams struct {
	// Maximum number of items to return
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Filter by name (partial match)
	Name param.Opt[string] `query:"name,omitzero" json:"-"`
	// Number of items to skip
	Offset  param.Opt[int64]  `query:"offset,omitzero" json:"-"`
	OrderBy param.Opt[string] `query:"order_by,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SSHKeyListParams) URLQuery added in v0.40.0

func (r SSHKeyListParams) URLQuery() (v url.Values, err error)

URLQuery serializes SSHKeyListParams's query parameters as `url.Values`.

type SSHKeyNewParams added in v0.40.0

type SSHKeyNewParams struct {
	// User-defined name for the SSH key
	Name string `json:"name" api:"required"`
	// The SSH public key content (ssh-rsa or ssh-ed25519 format)
	PublicKey string `json:"public_key" api:"required"`
	// contains filtered or unexported fields
}

func (SSHKeyNewParams) MarshalJSON added in v0.40.0

func (r SSHKeyNewParams) MarshalJSON() (data []byte, err error)

func (*SSHKeyNewParams) UnmarshalJSON added in v0.40.0

func (r *SSHKeyNewParams) UnmarshalJSON(data []byte) error

type SSHKeyService added in v0.40.0

type SSHKeyService struct {
	Options []option.RequestOption
}

SSH keys enable secure access to SFTP storage by associating public keys with user accounts for authentication.

SSHKeyService contains methods and other services that help with interacting with the gcore API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSSHKeyService method instead.

func NewSSHKeyService added in v0.40.0

func NewSSHKeyService(opts ...option.RequestOption) (r SSHKeyService)

NewSSHKeyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*SSHKeyService) Delete added in v0.40.0

func (r *SSHKeyService) Delete(ctx context.Context, sshKeyID int64, opts ...option.RequestOption) (err error)

Removes an SSH public key. This will revoke SFTP access for any storages using this key.

func (*SSHKeyService) Get added in v0.40.0

func (r *SSHKeyService) Get(ctx context.Context, sshKeyID int64, opts ...option.RequestOption) (res *SSHKey, err error)

Retrieves a single SSH key by ID.

func (*SSHKeyService) List added in v0.40.0

Returns a paginated list of all SSH public keys for SFTP storage access.

func (*SSHKeyService) ListAutoPaging added in v0.40.0

Returns a paginated list of all SSH public keys for SFTP storage access.

func (*SSHKeyService) New added in v0.40.0

func (r *SSHKeyService) New(ctx context.Context, body SSHKeyNewParams, opts ...option.RequestOption) (res *SSHKey, err error)

Creates an SSH public key for SFTP storage access. These keys are used for passwordless authentication to SFTP storages.

type SftpStorage added in v0.40.0

type SftpStorage struct {
	// Unique identifier for the storage instance
	ID int64 `json:"id" api:"required"`
	// Full hostname/address for accessing the storage endpoint
	Address string `json:"address" api:"required"`
	// ISO 8601 timestamp when the storage was created
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Duration when the storage will expire. Null if no expiration is set.
	Expires string `json:"expires" api:"required"`
	// Read-only internal full name of the storage, composed as "{`client_id`}-{name}".
	// Used by the SFTP backend as the login username. Clients should use this value
	// when connecting but should continue to identify the storage by `name` in their
	// own configuration.
	FullName string `json:"full_name" api:"required"`
	// Whether this storage uses a custom configuration file
	HasCustomConfigFile bool `json:"has_custom_config_file" api:"required"`
	// Whether password authentication is configured for this storage
	HasPassword bool `json:"has_password" api:"required"`
	// Whether HTTP access is disabled for this storage (HTTPS only)
	IsHTTPDisabled bool `json:"is_http_disabled" api:"required"`
	// Geographic location code where the storage is provisioned
	LocationName string `json:"location_name" api:"required"`
	// User-defined name for the storage instance, as supplied at creation time.
	Name string `json:"name" api:"required"`
	// Lifecycle status of the storage. Use this to check readiness before operations.
	//
	// Any of "creating", "active", "updating", "deleting", "deleted".
	ProvisioningStatus SftpStorageProvisioningStatus `json:"provisioning_status" api:"required"`
	// Custom domain alias for accessing the storage. Null if no alias is configured.
	ServerAlias string `json:"server_alias" api:"required"`
	// IDs of SSH keys associated with this SFTP storage
	SSHKeyIDs []int64 `json:"ssh_key_ids" api:"required"`
	// SFTP password. Only returned when newly generated or set (create/patch). Omitted
	// in GET/list responses.
	Password string `json:"password"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                  respjson.Field
		Address             respjson.Field
		CreatedAt           respjson.Field
		Expires             respjson.Field
		FullName            respjson.Field
		HasCustomConfigFile respjson.Field
		HasPassword         respjson.Field
		IsHTTPDisabled      respjson.Field
		LocationName        respjson.Field
		Name                respjson.Field
		ProvisioningStatus  respjson.Field
		ServerAlias         respjson.Field
		SSHKeyIDs           respjson.Field
		Password            respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SftpStorage) RawJSON added in v0.40.0

func (r SftpStorage) RawJSON() string

Returns the unmodified JSON received from the API

func (*SftpStorage) UnmarshalJSON added in v0.40.0

func (r *SftpStorage) UnmarshalJSON(data []byte) error

type SftpStorageListParams added in v0.40.0

type SftpStorageListParams struct {
	// Filter by storage ID
	ID param.Opt[string] `query:"id,omitzero" json:"-"`
	// Max number of records in response
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Filter by storage location/region
	LocationName param.Opt[string] `query:"location_name,omitzero" json:"-"`
	// Filter by storage name
	Name param.Opt[string] `query:"name,omitzero" json:"-"`
	// Number of records to skip
	Offset  param.Opt[int64]  `query:"offset,omitzero" json:"-"`
	OrderBy param.Opt[string] `query:"order_by,omitzero" json:"-"`
	// Include deleted storages
	ShowDeleted param.Opt[bool] `query:"show_deleted,omitzero" json:"-"`
	// Filter by provisioning status
	//
	// Any of "active", "creating", "updating", "deleting", "deleted".
	ProvisioningStatus SftpStorageListParamsProvisioningStatus `query:"provisioning_status,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SftpStorageListParams) URLQuery added in v0.40.0

func (r SftpStorageListParams) URLQuery() (v url.Values, err error)

URLQuery serializes SftpStorageListParams's query parameters as `url.Values`.

type SftpStorageListParamsProvisioningStatus added in v0.40.0

type SftpStorageListParamsProvisioningStatus string

Filter by provisioning status

const (
	SftpStorageListParamsProvisioningStatusActive   SftpStorageListParamsProvisioningStatus = "active"
	SftpStorageListParamsProvisioningStatusCreating SftpStorageListParamsProvisioningStatus = "creating"
	SftpStorageListParamsProvisioningStatusUpdating SftpStorageListParamsProvisioningStatus = "updating"
	SftpStorageListParamsProvisioningStatusDeleting SftpStorageListParamsProvisioningStatus = "deleting"
	SftpStorageListParamsProvisioningStatusDeleted  SftpStorageListParamsProvisioningStatus = "deleted"
)

type SftpStorageNewParams added in v0.40.0

type SftpStorageNewParams struct {
	// Location code where the storage should be created
	LocationName string `json:"location_name" api:"required"`
	// User-defined name for the storage instance
	Name string `json:"name" api:"required"`
	// Password handling mode for SFTP access: 'auto': generate a random password
	// (returned in the response) 'set': use the password provided in `sftp_password`
	// 'none': no password (SSH-key-only access)
	//
	// Any of "auto", "set", "none".
	PasswordMode SftpStorageNewParamsPasswordMode `json:"password_mode,omitzero" api:"required"`
	// Duration when the storage should expire (e.g., "2 years 6 months"). Omit for no
	// expiration.
	Expires param.Opt[string] `json:"expires,omitzero"`
	// Whether this storage should use a custom configuration file
	HasCustomConfigFile param.Opt[bool] `json:"has_custom_config_file,omitzero"`
	// Whether HTTP access should be disabled (HTTPS only)
	IsHTTPDisabled param.Opt[bool] `json:"is_http_disabled,omitzero"`
	// Custom domain alias for accessing the storage. Omit for no alias.
	ServerAlias param.Opt[string] `json:"server_alias,omitzero"`
	// SFTP password (8-63 chars). Required when `password_mode` is 'set'. Must be
	// omitted when `password_mode` is 'auto' or 'none'.
	SftpPassword param.Opt[string] `json:"sftp_password,omitzero"`
	// SSH key IDs to associate with this storage at creation time. If omitted, no keys
	// are linked.
	SSHKeyIDs []int64 `json:"ssh_key_ids,omitzero"`
	// contains filtered or unexported fields
}

func (SftpStorageNewParams) MarshalJSON added in v0.40.0

func (r SftpStorageNewParams) MarshalJSON() (data []byte, err error)

func (*SftpStorageNewParams) UnmarshalJSON added in v0.40.0

func (r *SftpStorageNewParams) UnmarshalJSON(data []byte) error

type SftpStorageNewParamsPasswordMode added in v0.40.0

type SftpStorageNewParamsPasswordMode string

Password handling mode for SFTP access: 'auto': generate a random password (returned in the response) 'set': use the password provided in `sftp_password` 'none': no password (SSH-key-only access)

const (
	SftpStorageNewParamsPasswordModeAuto SftpStorageNewParamsPasswordMode = "auto"
	SftpStorageNewParamsPasswordModeSet  SftpStorageNewParamsPasswordMode = "set"
	SftpStorageNewParamsPasswordModeNone SftpStorageNewParamsPasswordMode = "none"
)

type SftpStorageProvisioningStatus added in v0.40.0

type SftpStorageProvisioningStatus string

Lifecycle status of the storage. Use this to check readiness before operations.

const (
	SftpStorageProvisioningStatusCreating SftpStorageProvisioningStatus = "creating"
	SftpStorageProvisioningStatusActive   SftpStorageProvisioningStatus = "active"
	SftpStorageProvisioningStatusUpdating SftpStorageProvisioningStatus = "updating"
	SftpStorageProvisioningStatusDeleting SftpStorageProvisioningStatus = "deleting"
	SftpStorageProvisioningStatusDeleted  SftpStorageProvisioningStatus = "deleted"
)

type SftpStorageService added in v0.40.0

type SftpStorageService struct {
	Options []option.RequestOption
}

SftpStorageService contains methods and other services that help with interacting with the gcore API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSftpStorageService method instead.

func NewSftpStorageService added in v0.40.0

func NewSftpStorageService(opts ...option.RequestOption) (r SftpStorageService)

NewSftpStorageService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*SftpStorageService) Delete added in v0.40.0

func (r *SftpStorageService) Delete(ctx context.Context, storageID int64, opts ...option.RequestOption) (err error)

Deletes an SFTP storage instance. This operation cannot be undone.

func (*SftpStorageService) Get added in v0.40.0

func (r *SftpStorageService) Get(ctx context.Context, storageID int64, opts ...option.RequestOption) (res *SftpStorage, err error)

Returns details of a specific SFTP storage instance (without credentials).

func (*SftpStorageService) List added in v0.40.0

Returns a paginated list of SFTP storage instances for the authenticated client.

func (*SftpStorageService) ListAutoPaging added in v0.40.0

Returns a paginated list of SFTP storage instances for the authenticated client.

func (*SftpStorageService) New added in v0.40.0

Creates a new SFTP storage instance in the specified location and returns the storage details including credentials.

func (*SftpStorageService) Update added in v0.40.0

func (r *SftpStorageService) Update(ctx context.Context, storageID int64, body SftpStorageUpdateParams, opts ...option.RequestOption) (res *SftpStorage, err error)

Updates SFTP storage configuration and/or credentials including password and SSH key management. Supports JSON merge patch semantics: "password": null deletes the password, "ssh_key_ids": [] clears all keys.

type SftpStorageUpdateParams added in v0.40.0

type SftpStorageUpdateParams struct {
	// Duration when the storage should expire (e.g., "2 years 6 months"). Empty string
	// to remove.
	Expires param.Opt[string] `json:"expires,omitzero"`
	// Whether this storage should use a custom configuration file
	HasCustomConfigFile param.Opt[bool] `json:"has_custom_config_file,omitzero"`
	// Whether HTTP access should be disabled (HTTPS only)
	IsHTTPDisabled param.Opt[bool] `json:"is_http_disabled,omitzero"`
	// Custom domain alias for accessing the storage. Empty string to remove.
	ServerAlias param.Opt[string] `json:"server_alias,omitzero"`
	// Password handling mode. Omit to leave password unchanged. 'auto': regenerate
	// password (returned in response) 'none': remove password Note: 'set' is not
	// allowed in PATCH.
	//
	// Any of "auto", "none".
	PasswordMode SftpStorageUpdateParamsPasswordMode `json:"password_mode,omitzero"`
	// SSH key IDs to associate with this storage. Replaces all existing keys. If
	// omitted, existing keys are unchanged. If empty array, all keys are removed.
	SSHKeyIDs []int64 `json:"ssh_key_ids,omitzero"`
	// contains filtered or unexported fields
}

func (SftpStorageUpdateParams) MarshalJSON added in v0.40.0

func (r SftpStorageUpdateParams) MarshalJSON() (data []byte, err error)

func (*SftpStorageUpdateParams) UnmarshalJSON added in v0.40.0

func (r *SftpStorageUpdateParams) UnmarshalJSON(data []byte) error

type SftpStorageUpdateParamsPasswordMode added in v0.40.0

type SftpStorageUpdateParamsPasswordMode string

Password handling mode. Omit to leave password unchanged. 'auto': regenerate password (returned in response) 'none': remove password Note: 'set' is not allowed in PATCH.

const (
	SftpStorageUpdateParamsPasswordModeAuto SftpStorageUpdateParamsPasswordMode = "auto"
	SftpStorageUpdateParamsPasswordModeNone SftpStorageUpdateParamsPasswordMode = "none"
)

type StatisticGetUsageAggregatedParams

type StatisticGetUsageAggregatedParams struct {
	// a From date filter
	From param.Opt[string] `json:"from,omitzero"`
	// a To date filter
	To param.Opt[string] `json:"to,omitzero"`
	// a Locations list of filter
	Locations []string `json:"locations,omitzero"`
	// a Storages list of filter
	Storages []string `json:"storages,omitzero"`
	// contains filtered or unexported fields
}

func (StatisticGetUsageAggregatedParams) MarshalJSON

func (r StatisticGetUsageAggregatedParams) MarshalJSON() (data []byte, err error)

func (*StatisticGetUsageAggregatedParams) UnmarshalJSON

func (r *StatisticGetUsageAggregatedParams) UnmarshalJSON(data []byte) error

type StatisticGetUsageSeriesParams

type StatisticGetUsageSeriesParams struct {
	// a From date filter
	From param.Opt[string] `json:"from,omitzero"`
	// a Granularity is period of time for grouping data Valid values are: 1h, 12h, 24h
	Granularity param.Opt[string] `json:"granularity,omitzero"`
	// a Source is deprecated parameter
	Source param.Opt[int64] `json:"source,omitzero"`
	// a To date filter
	To param.Opt[string] `json:"to,omitzero"`
	// a TsString is configurator of response time format switch response from unix
	// time format to RFC3339 (2006-01-02T15:04:05Z07:00)
	TsString param.Opt[bool] `json:"ts_string,omitzero"`
	// a Locations list of filter
	Locations []string `json:"locations,omitzero"`
	// a Storages list of filter
	Storages []string `json:"storages,omitzero"`
	// contains filtered or unexported fields
}

func (StatisticGetUsageSeriesParams) MarshalJSON

func (r StatisticGetUsageSeriesParams) MarshalJSON() (data []byte, err error)

func (*StatisticGetUsageSeriesParams) UnmarshalJSON

func (r *StatisticGetUsageSeriesParams) UnmarshalJSON(data []byte) error

type StatisticGetUsageSeriesResponse

type StatisticGetUsageSeriesResponse struct {
	Data UsageSeries `json:"data"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (StatisticGetUsageSeriesResponse) RawJSON

Returns the unmodified JSON received from the API

func (*StatisticGetUsageSeriesResponse) UnmarshalJSON

func (r *StatisticGetUsageSeriesResponse) UnmarshalJSON(data []byte) error

type StatisticService

type StatisticService struct {
	Options []option.RequestOption
}

StatisticService contains methods and other services that help with interacting with the gcore API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewStatisticService method instead.

func NewStatisticService

func NewStatisticService(opts ...option.RequestOption) (r StatisticService)

NewStatisticService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*StatisticService) GetUsageAggregated

func (r *StatisticService) GetUsageAggregated(ctx context.Context, body StatisticGetUsageAggregatedParams, opts ...option.RequestOption) (res *UsageTotal, err error)

Consumption statistics is updated in near real-time as a standard practice. However, the frequency of updates can vary, but they are typically available within a 60 minutes period. Exceptions, such as maintenance periods, may delay data beyond 60 minutes until servers resume and backfill missing statistics.

Shows storage total usage data in filtered by storages, locations and interval.

func (*StatisticService) GetUsageSeries

Consumption statistics is updated in near real-time as a standard practice. However, the frequency of updates can vary, but they are typically available within a 60 minutes period. Exceptions, such as maintenance periods, may delay data beyond 60 minutes until servers resume and backfill missing statistics.

Shows storage usage data in series format filtered by clients, storages and interval.

type StorageService

type StorageService struct {
	Options []option.RequestOption
	// Locations represent cloud regions where new storages can be created.
	Locations      LocationService
	ObjectStorages ObjectStorageService
	SftpStorages   SftpStorageService
	// SSH keys enable secure access to SFTP storage by associating public keys with
	// user accounts for authentication.
	SSHKeys    SSHKeyService
	Statistics StatisticService
}

StorageService contains methods and other services that help with interacting with the gcore API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewStorageService method instead.

func NewStorageService

func NewStorageService(opts ...option.RequestOption) (r StorageService)

NewStorageService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type UsageSeries

type UsageSeries struct {
	// a Clients grouped data
	Clients map[string]UsageSeriesClient `json:"clients"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Clients     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (UsageSeries) RawJSON

func (r UsageSeries) RawJSON() string

Returns the unmodified JSON received from the API

func (*UsageSeries) UnmarshalJSON

func (r *UsageSeries) UnmarshalJSON(data []byte) error

type UsageSeriesClient

type UsageSeriesClient struct {
	// an ID of client
	ID int64 `json:"id"`
	// a FileQuantitySumMax is max sum of files quantity for grouped period
	FileQuantitySumMax int64 `json:"file_quantity_sum_max"`
	// a Locations grouped data
	Locations map[string]UsageSeriesClientLocation `json:"locations"`
	// a RequestsInSum is sum of incoming requests for grouped period
	RequestsInSum int64 `json:"requests_in_sum"`
	// a RequestsOutEdgesSum is sum of out edges requests for grouped period
	RequestsOutEdgesSum int64 `json:"requests_out_edges_sum"`
	// a RequestsOutWoEdgesSum is sum of out no edges requests for grouped period
	RequestsOutWoEdgesSum int64 `json:"requests_out_wo_edges_sum"`
	// a RequestsSum is sum of all requests for grouped period
	RequestsSum int64 `json:"requests_sum"`
	// a SizeSumBytesHour is sum of bytes hour for grouped period
	SizeSumBytesHour int64 `json:"size_sum_bytes_hour"`
	// a SizeSumMax is max sum of all files sizes for grouped period
	SizeSumMax int64 `json:"size_sum_max"`
	// a SizeSumMean is mean sum of all files sizes for grouped period
	SizeSumMean int64 `json:"size_sum_mean"`
	// a TrafficInSum is sum of incoming traffic for grouped period
	TrafficInSum int64 `json:"traffic_in_sum"`
	// a TrafficOutEdgesSum is sum of out edges traffic for grouped period
	TrafficOutEdgesSum int64 `json:"traffic_out_edges_sum"`
	// a TrafficOutWoEdgesSum is sum of out no edges traffic for grouped period
	TrafficOutWoEdgesSum int64 `json:"traffic_out_wo_edges_sum"`
	// a TrafficSum is sum of all traffic for grouped period
	TrafficSum int64 `json:"traffic_sum"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                    respjson.Field
		FileQuantitySumMax    respjson.Field
		Locations             respjson.Field
		RequestsInSum         respjson.Field
		RequestsOutEdgesSum   respjson.Field
		RequestsOutWoEdgesSum respjson.Field
		RequestsSum           respjson.Field
		SizeSumBytesHour      respjson.Field
		SizeSumMax            respjson.Field
		SizeSumMean           respjson.Field
		TrafficInSum          respjson.Field
		TrafficOutEdgesSum    respjson.Field
		TrafficOutWoEdgesSum  respjson.Field
		TrafficSum            respjson.Field
		ExtraFields           map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (UsageSeriesClient) RawJSON

func (r UsageSeriesClient) RawJSON() string

Returns the unmodified JSON received from the API

func (*UsageSeriesClient) UnmarshalJSON

func (r *UsageSeriesClient) UnmarshalJSON(data []byte) error

type UsageSeriesClientLocation

type UsageSeriesClientLocation struct {
	// a FileQuantitySumMax is max sum of files quantity for grouped period
	FileQuantitySumMax int64 `json:"file_quantity_sum_max"`
	// a Name of location
	Name string `json:"name"`
	// a RequestsInSum is sum of incoming requests for grouped period
	RequestsInSum int64 `json:"requests_in_sum"`
	// a RequestsOutEdgesSum is sum of out edges requests for grouped period
	RequestsOutEdgesSum int64 `json:"requests_out_edges_sum"`
	// a RequestsOutWoEdgesSum is sum of out no edges requests for grouped period
	RequestsOutWoEdgesSum int64 `json:"requests_out_wo_edges_sum"`
	// a RequestsSum is sum of all requests for grouped period
	RequestsSum int64 `json:"requests_sum"`
	// a SizeSumBytesHour is sum of bytes hour for grouped period
	SizeSumBytesHour int64 `json:"size_sum_bytes_hour"`
	// a SizeSumMax is max sum of all files sizes for grouped period
	SizeSumMax int64 `json:"size_sum_max"`
	// a SizeSumMean is mean sum of all files sizes for grouped period
	SizeSumMean int64 `json:"size_sum_mean"`
	// a Storages grouped data
	Storages map[string]UsageSeriesClientLocationStorage `json:"storages"`
	// a TrafficInSum is sum of incoming traffic for grouped period
	TrafficInSum int64 `json:"traffic_in_sum"`
	// a TrafficOutEdgesSum is sum of out edges traffic for grouped period
	TrafficOutEdgesSum int64 `json:"traffic_out_edges_sum"`
	// a TrafficOutWoEdgesSum is sum of out no edges traffic for grouped period
	TrafficOutWoEdgesSum int64 `json:"traffic_out_wo_edges_sum"`
	// a TrafficSum is sum of all traffic for grouped period
	TrafficSum int64 `json:"traffic_sum"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FileQuantitySumMax    respjson.Field
		Name                  respjson.Field
		RequestsInSum         respjson.Field
		RequestsOutEdgesSum   respjson.Field
		RequestsOutWoEdgesSum respjson.Field
		RequestsSum           respjson.Field
		SizeSumBytesHour      respjson.Field
		SizeSumMax            respjson.Field
		SizeSumMean           respjson.Field
		Storages              respjson.Field
		TrafficInSum          respjson.Field
		TrafficOutEdgesSum    respjson.Field
		TrafficOutWoEdgesSum  respjson.Field
		TrafficSum            respjson.Field
		ExtraFields           map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (UsageSeriesClientLocation) RawJSON

func (r UsageSeriesClientLocation) RawJSON() string

Returns the unmodified JSON received from the API

func (*UsageSeriesClientLocation) UnmarshalJSON

func (r *UsageSeriesClientLocation) UnmarshalJSON(data []byte) error

type UsageSeriesClientLocationStorage

type UsageSeriesClientLocationStorage struct {
	// a BucketsSeries is max bucket files count for grouped period
	// {name:[[timestamp, count]]}
	BucketsSeries map[string][][]any `json:"buckets_series"`
	// a FileQuantitySumMax is max sum of files quantity for grouped period
	FileQuantitySumMax int64 `json:"file_quantity_sum_max"`
	// a Name of storage
	Name string `json:"name"`
	// a RequestsInSeries is sum of incoming requests for grouped period
	// [[timestamp, count]]
	RequestsInSeries [][]any `json:"requests_in_series"`
	// a RequestsInSum is sum of incoming requests for grouped period
	RequestsInSum int64 `json:"requests_in_sum"`
	// a RequestsOutWoEdgesSeries is sum of out requests (only edges) for grouped
	// period [[timestamp, count]]
	RequestsOutEdgesSeries [][]any `json:"requests_out_edges_series"`
	// a RequestsOutEdgesSum is sum of out edges requests for grouped period
	RequestsOutEdgesSum int64 `json:"requests_out_edges_sum"`
	// a RequestsOutWoEdgesSeries is sum of out requests (without edges) for grouped
	// period [[timestamp, count]]
	RequestsOutWoEdgesSeries [][]any `json:"requests_out_wo_edges_series"`
	// a RequestsOutWoEdgesSum is sum of out no edges requests for grouped period
	RequestsOutWoEdgesSum int64 `json:"requests_out_wo_edges_sum"`
	// a RequestsSeries is sum of out requests for grouped period [[timestamp, count]]
	RequestsSeries [][]any `json:"requests_series"`
	// a RequestsSum is sum of all requests for grouped period
	RequestsSum int64 `json:"requests_sum"`
	// a SizeBytesHourSeries is value that displays how many bytes were stored per hour
	// [[timestamp, count]]
	SizeBytesHourSeries [][]any `json:"size_bytes_hour_series"`
	// a SizeMaxSeries is max of files size for grouped period [[timestamp, count]]
	SizeMaxSeries [][]any `json:"size_max_series"`
	// a SizeMeanSeries is mean of files size for grouped period [[timestamp, count]]
	SizeMeanSeries [][]any `json:"size_mean_series"`
	// a SizeSumBytesHour is sum of bytes hour for grouped period
	SizeSumBytesHour int64 `json:"size_sum_bytes_hour"`
	// a SizeSumMax is max sum of all files sizes for grouped period
	SizeSumMax int64 `json:"size_sum_max"`
	// a SizeSumMean is mean sum of all files sizes for grouped period
	SizeSumMean int64 `json:"size_sum_mean"`
	// a TrafficInSeries is sum of incoming traffic bytes for grouped period
	// [[timestamp, count]]
	TrafficInSeries [][]any `json:"traffic_in_series"`
	// a TrafficInSum is sum of incoming traffic for grouped period
	TrafficInSum int64 `json:"traffic_in_sum"`
	// a TrafficOutWoEdgesSeries is sum of out traffic bytes (only edges) for grouped
	// period [[timestamp, count]]
	TrafficOutEdgesSeries [][]any `json:"traffic_out_edges_series"`
	// a TrafficOutEdgesSum is sum of out edges traffic for grouped period
	TrafficOutEdgesSum int64 `json:"traffic_out_edges_sum"`
	// a TrafficOutWoEdgesSeries is sum of out traffic bytes (without edges) for
	// grouped period [[timestamp, count]]
	TrafficOutWoEdgesSeries [][]any `json:"traffic_out_wo_edges_series"`
	// a TrafficOutWoEdgesSum is sum of out no edges traffic for grouped period
	TrafficOutWoEdgesSum int64 `json:"traffic_out_wo_edges_sum"`
	// a TrafficSeries is sum of traffic bytes for grouped period [[timestamp, count]]
	TrafficSeries [][]any `json:"traffic_series"`
	// a TrafficSum is sum of all traffic for grouped period
	TrafficSum int64 `json:"traffic_sum"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		BucketsSeries            respjson.Field
		FileQuantitySumMax       respjson.Field
		Name                     respjson.Field
		RequestsInSeries         respjson.Field
		RequestsInSum            respjson.Field
		RequestsOutEdgesSeries   respjson.Field
		RequestsOutEdgesSum      respjson.Field
		RequestsOutWoEdgesSeries respjson.Field
		RequestsOutWoEdgesSum    respjson.Field
		RequestsSeries           respjson.Field
		RequestsSum              respjson.Field
		SizeBytesHourSeries      respjson.Field
		SizeMaxSeries            respjson.Field
		SizeMeanSeries           respjson.Field
		SizeSumBytesHour         respjson.Field
		SizeSumMax               respjson.Field
		SizeSumMean              respjson.Field
		TrafficInSeries          respjson.Field
		TrafficInSum             respjson.Field
		TrafficOutEdgesSeries    respjson.Field
		TrafficOutEdgesSum       respjson.Field
		TrafficOutWoEdgesSeries  respjson.Field
		TrafficOutWoEdgesSum     respjson.Field
		TrafficSeries            respjson.Field
		TrafficSum               respjson.Field
		ExtraFields              map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (UsageSeriesClientLocationStorage) RawJSON

Returns the unmodified JSON received from the API

func (*UsageSeriesClientLocationStorage) UnmarshalJSON

func (r *UsageSeriesClientLocationStorage) UnmarshalJSON(data []byte) error

type UsageTotal

type UsageTotal struct {
	// StorageUsageTotalRes for response
	Data []UsageTotalData `json:"data"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (UsageTotal) RawJSON

func (r UsageTotal) RawJSON() string

Returns the unmodified JSON received from the API

func (*UsageTotal) UnmarshalJSON

func (r *UsageTotal) UnmarshalJSON(data []byte) error

type UsageTotalData

type UsageTotalData struct {
	Metrics UsageTotalDataMetrics `json:"metrics"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Metrics     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

StorageStatsTotalElement for response

func (UsageTotalData) RawJSON

func (r UsageTotalData) RawJSON() string

Returns the unmodified JSON received from the API

func (*UsageTotalData) UnmarshalJSON

func (r *UsageTotalData) UnmarshalJSON(data []byte) error

type UsageTotalDataMetrics

type UsageTotalDataMetrics struct {
	// a FileQuantitySumMax is max sum of files quantity for grouped period
	FileQuantitySumMax int64 `json:"file_quantity_sum_max"`
	// a RequestsInSum is sum of incoming requests for grouped period
	RequestsInSum int64 `json:"requests_in_sum"`
	// a RequestsOutEdgesSum is sum of out edges requests for grouped period
	RequestsOutEdgesSum int64 `json:"requests_out_edges_sum"`
	// a RequestsOutWoEdgesSum is sum of out no edges requests for grouped period
	RequestsOutWoEdgesSum int64 `json:"requests_out_wo_edges_sum"`
	// a RequestsSum is sum of all requests for grouped period
	RequestsSum int64 `json:"requests_sum"`
	// a SizeSumBytesHour is sum of bytes hour for grouped period
	SizeSumBytesHour int64 `json:"size_sum_bytes_hour"`
	// a SizeSumMax is max sum of all files sizes for grouped period
	SizeSumMax int64 `json:"size_sum_max"`
	// a SizeSumMean is mean sum of all files sizes for grouped period
	SizeSumMean int64 `json:"size_sum_mean"`
	// a TrafficInSum is sum of incoming traffic for grouped period
	TrafficInSum int64 `json:"traffic_in_sum"`
	// a TrafficOutEdgesSum is sum of out edges traffic for grouped period
	TrafficOutEdgesSum int64 `json:"traffic_out_edges_sum"`
	// a TrafficOutWoEdgesSum is sum of out no edges traffic for grouped period
	TrafficOutWoEdgesSum int64 `json:"traffic_out_wo_edges_sum"`
	// a TrafficSum is sum of all traffic for grouped period
	TrafficSum int64 `json:"traffic_sum"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FileQuantitySumMax    respjson.Field
		RequestsInSum         respjson.Field
		RequestsOutEdgesSum   respjson.Field
		RequestsOutWoEdgesSum respjson.Field
		RequestsSum           respjson.Field
		SizeSumBytesHour      respjson.Field
		SizeSumMax            respjson.Field
		SizeSumMean           respjson.Field
		TrafficInSum          respjson.Field
		TrafficOutEdgesSum    respjson.Field
		TrafficOutWoEdgesSum  respjson.Field
		TrafficSum            respjson.Field
		ExtraFields           map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (UsageTotalDataMetrics) RawJSON

func (r UsageTotalDataMetrics) RawJSON() string

Returns the unmodified JSON received from the API

func (*UsageTotalDataMetrics) UnmarshalJSON

func (r *UsageTotalDataMetrics) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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