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

objectstorage

package
v0.4.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func DestroySharedProvider

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

func EnsureSharedProvider added in v0.4.8

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

func PhysicalBucketName

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

func VerifyApplicationBuckets

func VerifyApplicationBuckets(ctx context.Context, runtime Runtime, app application.Manifest, files application.RuntimeFiles) 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 Driver

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

func NewDriver

func NewDriver(runtime Runtime, app application.Manifest, files application.RuntimeFiles) *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) 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) 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
}

func EnsureProviderFiles

func EnsureProviderFiles() (ProviderFiles, error)

func ExistingProviderFiles

func ExistingProviderFiles() (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