console

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 21 Imported by: 0 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

Overview

Package console provides the adapter that implements consoleapi.API by calling the DirIO service layer directly (no HTTP round-trips).

Index

Constants

This section is empty.

Variables

View Source
var ErrNotImplemented = errors.New("not implemented")

ErrNotImplemented is returned for API methods not yet backed by the service layer.

Functions

This section is empty.

Types

type Adapter

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

Adapter implements consoleapi.API via the service layer.

func NewAdapter

func NewAdapter(services *service.ServicesFactory) *Adapter

NewAdapter creates an Adapter backed by the given service factory.

func (*Adapter) AddGroupMember

func (a *Adapter) AddGroupMember(ctx context.Context, groupName, userAccessKey string) error

func (*Adapter) AttachGroupPolicy

func (a *Adapter) AttachGroupPolicy(ctx context.Context, groupName, policyName string) error

func (*Adapter) AttachPolicy

func (a *Adapter) AttachPolicy(ctx context.Context, policyName, accessKey string) error

func (*Adapter) CopyObject

func (a *Adapter) CopyObject(ctx context.Context, srcBucket, srcKey, dstBucket, dstKey string) error

func (*Adapter) CreateBucket

func (a *Adapter) CreateBucket(ctx context.Context, name, ownerAccessKey string) error

func (*Adapter) CreateGroup

func (*Adapter) CreatePolicy

func (*Adapter) CreateUser

func (*Adapter) DeleteBucket

func (a *Adapter) DeleteBucket(ctx context.Context, name string) error

func (*Adapter) DeleteGroup

func (a *Adapter) DeleteGroup(ctx context.Context, name string) error

func (*Adapter) DeleteObject

func (a *Adapter) DeleteObject(ctx context.Context, bucket, key string) error

func (*Adapter) DeletePolicy

func (a *Adapter) DeletePolicy(ctx context.Context, name string) error

func (*Adapter) DeleteServiceAccount

func (a *Adapter) DeleteServiceAccount(ctx context.Context, uuidStr string) error

func (*Adapter) DeleteUser

func (a *Adapter) DeleteUser(ctx context.Context, uuidStr string) error

func (*Adapter) DetachGroupPolicy

func (a *Adapter) DetachGroupPolicy(ctx context.Context, groupName, policyName string) error

func (*Adapter) DetachPolicy

func (a *Adapter) DetachPolicy(ctx context.Context, policyName, accessKey string) error

func (*Adapter) GeneratePresignedURL

func (a *Adapter) GeneratePresignedURL(ctx context.Context, req consoleapi.GeneratePresignedURLRequest) (string, error)

func (*Adapter) GetBucket

func (a *Adapter) GetBucket(ctx context.Context, bucket string) (*consoleapi.Bucket, error)

func (*Adapter) GetBucketOwner

func (a *Adapter) GetBucketOwner(ctx context.Context, bucket string) (*consoleapi.Owner, error)

func (*Adapter) GetBucketPolicy

func (a *Adapter) GetBucketPolicy(ctx context.Context, bucket string) (string, error)

func (*Adapter) GetEffectivePermissions

func (a *Adapter) GetEffectivePermissions(ctx context.Context, accessKey, bucket string) (*consoleapi.EffectivePermissions, error)

func (*Adapter) GetGroup

func (a *Adapter) GetGroup(ctx context.Context, name string) (*consoleapi.Group, error)

func (*Adapter) GetObjectMetadata

func (a *Adapter) GetObjectMetadata(ctx context.Context, bucket, key string) (*consoleapi.ObjectMetadata, error)

func (*Adapter) GetObjectOwner

func (a *Adapter) GetObjectOwner(ctx context.Context, bucket, key string) (*consoleapi.Owner, error)

func (*Adapter) GetObjectTags

func (a *Adapter) GetObjectTags(ctx context.Context, bucket, key string) (map[string]string, error)

func (*Adapter) GetPolicy

func (a *Adapter) GetPolicy(ctx context.Context, name string) (*consoleapi.Policy, error)

func (*Adapter) GetServiceAccount

func (a *Adapter) GetServiceAccount(ctx context.Context, uuidStr string) (*consoleapi.ServiceAccount, error)

func (*Adapter) GetServiceAccountSecret

func (a *Adapter) GetServiceAccountSecret(ctx context.Context, uuidStr string) (string, error)

func (*Adapter) GetUser

func (a *Adapter) GetUser(ctx context.Context, uuidStr string) (*consoleapi.User, error)

func (*Adapter) GetUserSecret

func (a *Adapter) GetUserSecret(ctx context.Context, uuidStr string) (string, error)

func (*Adapter) ListBuckets

func (a *Adapter) ListBuckets(ctx context.Context) ([]*consoleapi.Bucket, error)

func (*Adapter) ListGroups

func (a *Adapter) ListGroups(ctx context.Context) ([]*consoleapi.Group, error)

func (*Adapter) ListObjects

func (a *Adapter) ListObjects(ctx context.Context, bucket, prefix, delimiter string) ([]*consoleapi.ObjectInfo, error)

func (*Adapter) ListPolicies

func (a *Adapter) ListPolicies(ctx context.Context) ([]*consoleapi.Policy, error)

func (*Adapter) ListServiceAccounts

func (a *Adapter) ListServiceAccounts(ctx context.Context) ([]*consoleapi.ServiceAccount, error)

func (*Adapter) ListUsers

func (a *Adapter) ListUsers(ctx context.Context) ([]*consoleapi.User, error)

func (*Adapter) RemoveGroupMember

func (a *Adapter) RemoveGroupMember(ctx context.Context, groupName, userUUID string) error

func (*Adapter) SetBucketPolicy

func (a *Adapter) SetBucketPolicy(ctx context.Context, bucket, policyJSON string) error

func (*Adapter) SetGroupStatus

func (a *Adapter) SetGroupStatus(ctx context.Context, groupName string, enabled bool) error

func (*Adapter) SetObjectTags

func (a *Adapter) SetObjectTags(ctx context.Context, bucket, key string, tags map[string]string) error

func (*Adapter) SetServiceAccountStatus

func (a *Adapter) SetServiceAccountStatus(ctx context.Context, uuidStr string, enabled bool) error

func (*Adapter) SetUserStatus

func (a *Adapter) SetUserStatus(ctx context.Context, uuidStr string, enabled bool) error

func (*Adapter) SimulateRequest

func (*Adapter) TransferBucketOwnership

func (a *Adapter) TransferBucketOwnership(ctx context.Context, bucket, newOwnerAccessKey string) error

func (*Adapter) UpdatePolicy

func (a *Adapter) UpdatePolicy(ctx context.Context, name string, req consoleapi.UpdatePolicyRequest) (*consoleapi.Policy, error)

func (*Adapter) UpdateServiceAccount

func (a *Adapter) UpdateServiceAccount(ctx context.Context, uuidStr string, req consoleapi.UpdateServiceAccountRequest) (*consoleapi.ServiceAccount, error)

func (*Adapter) UpdateUser

func (a *Adapter) UpdateUser(ctx context.Context, uuidStr string, req consoleapi.UpdateUserRequest) (*consoleapi.User, error)

Jump to

Keyboard shortcuts

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