Documentation
¶
Overview ¶
Copyright 2025 Clyso GmbH
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶
func NewClient(ctx context.Context, addr StorageAddress, user Credentials) (*gophercloud.ServiceClient, error)
Types ¶
type Client ¶
type Client interface {
For(ctx context.Context, storage, account string) (*gophercloud.ServiceClient, error)
}
type Credentials ¶
type Credentials struct {
// Username - [REQUIRED] user name. Equal to openstack OS_USERNAME.
Username string `yaml:"username"`
// Password - [REQUIRED] user password. Equal to openstack OS_PASSWORD.
Password string `yaml:"password"`
// DomainName - [REQUIRED] user domain name. Equal to openstack OS_DOMAIN_NAME.
DomainName string `yaml:"domainName"`
// TenantName - [REQUIRED] tenant/project name. Equal to openstack OS_TENANT_NAME.
TenantName string `yaml:"tenantName"`
}
func (Credentials) Validate ¶
func (c Credentials) Validate() error
type DownloadOpts ¶
type DownloadOpts struct {
*objects.DownloadOpts
Raw bool
}
Extends the gophercloud DownloadOpts to support swift "format=raw" query parameter.
func (*DownloadOpts) ToObjectDownloadParams ¶
func (d *DownloadOpts) ToObjectDownloadParams() (map[string]string, string, error)
type ProxyStorage ¶
type ProxyStorage struct {
StorageURL string `yaml:"storageURL"`
HttpTimeout time.Duration `yaml:"httpTimeout"`
}
func (*ProxyStorage) Validate ¶
func (s *ProxyStorage) Validate() error
type Storage ¶
type Storage struct {
// ProjectUsers - [OPTIONAL] user credentials per **projectID** (ex: 26720c5080bd4fd9af5b1e4a7dc565f8). If set, will be used to sync data within project.
Credentials map[string]Credentials `yaml:"credentials"`
StorageAddress `yaml:",inline" mapstructure:",squash"`
}
type StorageAddress ¶
type StorageAddress struct {
// StorageEndpointName - [REQUIRED] name of the object storage endpoint in openstack keystone.
StorageEndpointName string `yaml:"storageEndpointName"`
// Keystone Endpoint service type. Default is "object-storage"
StorageEndpointType string `yaml:"storageEndpointType"`
// Region - [OPTIONAL] openstack region name.
Region string `yaml:"region"`
// AuthURL - [REQUIRED] keystone auth URL.
AuthURL string `yaml:"authURL"`
}
Click to show internal directories.
Click to hide internal directories.