Help us shape the future of Go! Take the 2026 Go Developer Survey

objectstorage

package
v0.4.16 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ProviderProject = "baseharbor-object-storage"
	ProviderService = "seaweedfs"
	ProviderNetwork = "baseharbor-object-storage"
	ProviderImage   = "docker.io/chrislusf/seaweedfs:4.47"
)

Variables

This section is empty.

Functions

func DestroySharedProvider

func DestroySharedProvider(ctx context.Context, runtime Runtime) error

func DestroySharedProviderAt added in v0.4.15

func DestroySharedProviderAt(ctx context.Context, runtime Runtime, dataDir, namespace string) error

func EnsureSharedProvider added in v0.4.8

func EnsureSharedProvider(ctx context.Context, runtime Runtime, issuer serviceaccess.Issuer) (ProviderFiles, AdminCredentials, string, error)

func EnsureSharedProviderAt added in v0.4.15

func EnsureSharedProviderAt(ctx context.Context, runtime Runtime, issuer serviceaccess.Issuer, dataDir, namespace string) (ProviderFiles, AdminCredentials, string, error)

func ExistingReadySharedProvider added in v0.4.15

func ExistingReadySharedProvider(ctx context.Context) (ProviderFiles, AdminCredentials, string, error)

func ExistingReadySharedProviderAt added in v0.4.15

func ExistingReadySharedProviderAt(ctx context.Context, dataDir, namespace string) (ProviderFiles, AdminCredentials, string, error)

func PhysicalBucketName

func PhysicalBucketName(m application.Manifest, logical string) string

func ServiceContainerEndpoint added in v0.4.15

func ServiceContainerEndpoint(files ProviderFiles) (string, error)

func ServiceTrustBundle added in v0.4.15

func ServiceTrustBundle(files ProviderFiles) (string, error)

func VerifyApplicationBuckets

func VerifyApplicationBuckets(ctx context.Context, runtime Runtime, app application.Manifest, files application.RuntimeFiles) error

func VerifyApplicationBucketsAt added in v0.4.15

func VerifyApplicationBucketsAt(ctx context.Context, runtime Runtime, app application.Manifest, files application.RuntimeFiles, dataDir, namespace string) error

Types

type AdminCredentials added in v0.4.8

type AdminCredentials struct {
	AccessKeyID     string
	SecretAccessKey string
}

func EnsureAdminCredentials added in v0.4.8

func EnsureAdminCredentials(files ProviderFiles) (AdminCredentials, string, error)

func LoadAdminCredentials added in v0.4.8

func LoadAdminCredentials(path string) (AdminCredentials, error)

func LoadContainerAdminCredentials added in v0.4.8

func LoadContainerAdminCredentials(path string) (AdminCredentials, error)

type BackupObject added in v0.4.16

type BackupObject struct {
	Key  string `json:"key"`
	Data []byte `json:"data"`
}

type BucketBackup added in v0.4.16

type BucketBackup struct {
	LogicalBucket string         `json:"logical_bucket"`
	Objects       []BackupObject `json:"objects"`
}

type Driver

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

func NewDriver

func NewDriver(runtime Runtime, app application.Manifest, files application.RuntimeFiles, issuer serviceaccess.Issuer) *Driver

func NewDriverAt added in v0.4.15

func NewDriverAt(runtime Runtime, app application.Manifest, files application.RuntimeFiles, issuer serviceaccess.Issuer, dataDir, namespace string) *Driver

func (*Driver) Bind

func (d *Driver) Bind(_ context.Context, resource capability.Resource, _ capability.Binding) error

func (*Driver) Descriptor

func (d *Driver) Descriptor() capability.Provider

func (*Driver) DestroyBucket

func (d *Driver) DestroyBucket(ctx context.Context, logicalBucket string) error

func (*Driver) EnsureSharedProvider added in v0.4.8

func (d *Driver) EnsureSharedProvider(ctx context.Context) (ProviderFiles, AdminCredentials, string, error)

func (*Driver) ExportBucket added in v0.4.16

func (d *Driver) ExportBucket(ctx context.Context, logical string) (BucketBackup, error)

func (*Driver) Preflight

func (d *Driver) Preflight(_ context.Context, resource capability.Resource, binding capability.Binding) error

func (*Driver) Provision

func (d *Driver) Provision(ctx context.Context, resource capability.Resource, _ capability.Binding) error

func (*Driver) RestoreBucket added in v0.4.16

func (d *Driver) RestoreBucket(ctx context.Context, backup BucketBackup) error

func (*Driver) Rollback

func (d *Driver) Rollback(ctx context.Context)

func (*Driver) Verify

func (d *Driver) Verify(ctx context.Context, resource capability.Resource, _ capability.Binding) error

type IAMAccessKey added in v0.4.8

type IAMAccessKey struct {
	AccessKeyID     string
	SecretAccessKey string
}

type IAMClient added in v0.4.8

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

func NewIAMClient added in v0.4.8

func NewIAMClient(endpoint string, client *http.Client, credentials AdminCredentials) (*IAMClient, error)

func (*IAMClient) CreateAccessKey added in v0.4.8

func (c *IAMClient) CreateAccessKey(ctx context.Context, user string) (IAMAccessKey, error)

func (*IAMClient) CreateUser added in v0.4.8

func (c *IAMClient) CreateUser(ctx context.Context, user string) error

func (*IAMClient) DeleteAccessKey added in v0.4.8

func (c *IAMClient) DeleteAccessKey(ctx context.Context, user, accessKeyID string) error

func (*IAMClient) DeleteUser added in v0.4.8

func (c *IAMClient) DeleteUser(ctx context.Context, user string) error

func (*IAMClient) DeleteUserPolicy added in v0.4.8

func (c *IAMClient) DeleteUserPolicy(ctx context.Context, user, policyName string) error

func (*IAMClient) ListAccessKeys added in v0.4.8

func (c *IAMClient) ListAccessKeys(ctx context.Context, user string) ([]string, error)

func (*IAMClient) PutUserPolicy added in v0.4.8

func (c *IAMClient) PutUserPolicy(ctx context.Context, user, policyName, policyDocument string) error

type ProviderFiles

type ProviderFiles struct {
	Dir     string
	Compose string
	Env     string
	Project string
	Network string
}

func EnsureProviderFiles

func EnsureProviderFiles(ctx context.Context, issuer serviceaccess.Issuer) (ProviderFiles, error)

func EnsureProviderFilesAt added in v0.4.15

func EnsureProviderFilesAt(ctx context.Context, issuer serviceaccess.Issuer, dataDir, namespace string) (ProviderFiles, error)

func ExistingProviderFiles

func ExistingProviderFiles() (ProviderFiles, error)

func ExistingProviderFilesAt added in v0.4.15

func ExistingProviderFilesAt(dataDir, namespace string) (ProviderFiles, error)

type Runtime

type Runtime interface {
	ConfigProject(context.Context, string, string, string) error
	UpProject(context.Context, string, string, string) error
	ExecProject(context.Context, string, string, string, string, ...string) (string, error)
	ExecProjectInput(context.Context, string, string, string, []byte, string, ...string) (string, error)
	DestroyProject(context.Context, string, string, string) error
}

type RuntimeResourceBinding added in v0.4.8

type RuntimeResourceBinding struct {
	ResourceID      string `json:"resource_id"`
	Endpoint        string `json:"endpoint"`
	Bucket          string `json:"bucket"`
	Region          string `json:"region"`
	AccessKeyID     string `json:"access_key_id"`
	SecretAccessKey string `json:"secret_access_key"`
}

type RuntimeResourceManager added in v0.4.8

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

func NewRuntimeResourceManager added in v0.4.8

func NewRuntimeResourceManager(dir, endpoint string, client *http.Client, admin AdminCredentials) (*RuntimeResourceManager, error)

func (*RuntimeResourceManager) Check added in v0.4.8

func (*RuntimeResourceManager) Create added in v0.4.8

func (m *RuntimeResourceManager) Create(ctx context.Context, applicationName, environment, name string) (RuntimeResourceBinding, error)

func (*RuntimeResourceManager) Delete added in v0.4.8

func (m *RuntimeResourceManager) Delete(ctx context.Context, applicationName, environment, name string) error

func (*RuntimeResourceManager) Get added in v0.4.8

func (m *RuntimeResourceManager) Get(ctx context.Context, applicationName, environment, name string) (RuntimeResourceBinding, error)

Jump to

Keyboard shortcuts

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