providers

package
v0.0.0-...-e7c744b Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBucketLocation

func GetBucketLocation(provider string, secret *secret.SecretItemResponse, bucketName string, orgID uint, log logrus.FieldLogger) (string, error)

func Migrate

func Migrate(db *gorm.DB, logger logrus.FieldLogger) error

Migrate runs migrations for cloud provider services.

func NewNetworkService

func NewNetworkService(params ServiceParams) (network.Service, error)

NewNetworkService returns a new network Service instance of the specified provider

func NewObjectStore

NewObjectStore creates an object store client for the given cloud provider. The created object is initialized with the passed in secret and organization.

Types

type ObjectStoreContext

type ObjectStoreContext struct {
	Provider     string
	Secret       *secret.SecretItemResponse
	Organization *auth.Organization

	// Location (or region) is used by some cloud providers to determine where the bucket should be created.
	Location string

	// Azure specific parameters
	ResourceGroup  string
	StorageAccount string

	// ForceOperation indicates whether the operation needs to be executed forcibly (some errors are ignored)
	ForceOperation bool
}

ObjectStoreContext describes all parameters necessary to create a cloud provider agnostic object store instance.

type ServiceParams

type ServiceParams struct {
	Logger            logrus.FieldLogger
	Provider          string
	Region            string
	ResourceGroupName string
	Secret            *secret.SecretItemResponse
}

ServiceParams describes all parameters necessary to create cloud provider agnostic VPC network queries

Jump to

Keyboard shortcuts

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