oci

package
v0.104.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Uploader
	ImageCreator
	// contains filtered or unexported fields
}

func NewClient

func NewClient(clientParams *ClientParams) (Client, error)

NewClient creates a new oci client from the passed in params. Pass nil clientParams if you want the client to automatically detect the configuration from the official disk location or and env file From the docs its: $HOME/.oci/config, $HOME/.obmcs/config and variable names starting with TF_VAR. Last is the environment variable OCI_CONFIG_FILE

func (Client) Upload

func (c Client) Upload(objectName string, bucketName string, namespace string, file *os.File, compartmentID, imageName string) (string, error)

Upload uploads a file into an objectName under the bucketName in the namespace.

type ClientParams

type ClientParams struct {
	User        string
	Region      string
	Tenancy     string
	PrivateKey  string
	Fingerprint string
}

type ImageCreator

type ImageCreator interface {
	// contains filtered or unexported methods
}

type Uploader

type Uploader interface {
	Upload(name string, bucketName string, namespace string, file *os.File, user, compartment string) (string, error)
}

Jump to

Keyboard shortcuts

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