bucket

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2025 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsEndpointTLS

func IsEndpointTLS(endpoint string) bool

IsEndpointTLS determines if an endpoint uses TLS based on its protocol

Types

type BucketInfo

type BucketInfo struct {
	Name      string `json:"name"`
	Endpoint  string `json:"endpoint"`
	Bucket    string `json:"bucket"`
	AccessKey string `json:"access_key"`
	SecretKey string `json:"secret_key"`
}

func (*BucketInfo) Validate

func (r *BucketInfo) Validate(ctx context.Context, log *slog.Logger) error

type BucketListInfo

type BucketListInfo struct {
	Name     string `json:"name"`
	Endpoint string `json:"endpoint"`
	Bucket   string `json:"bucket"`
}

BucketListInfo represents bucket information for listing (without sensitive credentials)

type BucketServer

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

func NewServer

func NewServer(db *pgxpool.Pool, encryptionKey string) (*BucketServer, error)

func (*BucketServer) AddBucket

func (s *BucketServer) AddBucket(ctx context.Context, log *slog.Logger, req *BucketInfo) (err error)

func (*BucketServer) ListBuckets

func (s *BucketServer) ListBuckets(ctx context.Context, log *slog.Logger) ([]*BucketListInfo, error)

type ValidationError

type ValidationError error

Jump to

Keyboard shortcuts

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