ibmcloud

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: Apache-2.0 Imports: 23 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

func New

func New(opts *Options) (*API, error)

New creates an IBMCloud API wrapper

func (*API) CheckBucketExists

func (a *API) CheckBucketExists(bucketName string) (bool, error)

CheckBucketExists will verify the existence of the bucket for the particular account in the particular cloud object storage instance

func (*API) CopyObject

func (a *API) CopyObject(srcBucket, srcName, destBucket string) error

CopyObject - Copy an Object to a new location

func (*API) CreateBucket

func (a *API) CreateBucket(bucketName string) error

CreateBucket creates a new bucket in the provided cloud object storage instance

func (*API) CreateCloudObjectStorageInstance

func (a *API) CreateCloudObjectStorageInstance(storageName string, resourceGroup string) (string, error)

CreateCloudObjectStorageInstance creates a cloud object storage instance

func (*API) ListCloudObjectStorageInstances

func (a *API) ListCloudObjectStorageInstances() (map[string]string, error)

ListCloudObjectStorageInstances list all available cloud object storage instances of particular servicetype

func (*API) NewS3Client

func (a *API) NewS3Client(cloudObjectStorageName, region string) (err error)

NewS3Client accepts apikey, instanceid of the IBM Cloud Object Storage instance and returns the s3 client

func (*API) UploadObject

func (a *API) UploadObject(r io.Reader, objectName, bucketName string, force bool) error

UploadObject - upload to s3 bucket

type Client

Client used to interact with the IBMCloud apis

type Options

type Options struct {
	*platform.Options
	// The path to the shared credentials file, if not ~/.bluemix/credentials
	CredentialsFile string

	// ApiKey is the optional access key to use. It will override all other sources
	ApiKey string

	// Cloud Object storage name to use
	CloudObjectStorage string
}

type S3Client

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

S3Client - to interface with the IBMCloud s3 storage

Jump to

Keyboard shortcuts

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