uc

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bootstrap

func Bootstrap(ctx context.Context, cmd BootstrapCommand) error

func Configure

func Configure()

func CreateBucket

func CreateBucket(ctx context.Context, name string) (*bucket.Bucket, error)

func CreateObjectFromCopy added in v0.2.0

func CreateObjectFromCopy(ctx context.Context, b *bucket.Bucket, src *object.Object, key string) (*object.Object, error)

func CreateObjectFromData added in v0.2.0

func CreateObjectFromData(ctx context.Context, b *bucket.Bucket, cmd object.CreateCommand) (*object.Object, error)

func DeleteBucket added in v0.5.0

func DeleteBucket(ctx context.Context, b *bucket.Bucket) error

func DeleteObject

func DeleteObject(ctx context.Context, b *bucket.Bucket, o *object.Object) error

func EmptyBucket added in v0.5.0

func EmptyBucket(ctx context.Context, b *bucket.Bucket) error

func IsBootstrapped

func IsBootstrapped(ctx context.Context) (bool, error)

func Login

func Login(ctx context.Context, cmd LoginCommand) (*user.User, string, error)

Login logs in a user. Returns the user and a session token on success

func ReconcileBucket

func ReconcileBucket(ctx context.Context, b *bucket.Bucket) error

func UpdateObjectFromCopy added in v0.2.0

func UpdateObjectFromCopy(ctx context.Context, b *bucket.Bucket, src, dest *object.Object) (*object.Object, error)

func UpdateObjectWithData added in v0.2.0

func UpdateObjectWithData(ctx context.Context, b *bucket.Bucket, o *object.Object, cmd object.UpdateCommand) (*object.Object, error)

Types

type BootstrapCommand

type BootstrapCommand struct {
	Email                string
	Password             string
	PasswordConfirmation string
}

func (BootstrapCommand) Validate

func (c BootstrapCommand) Validate() error

type LoginCommand

type LoginCommand struct {
	IpAddress string
	Email     string
	Password  string
}

type ObjectPrefixSearchResult added in v0.2.0

type ObjectPrefixSearchResult struct {
	IsTruncated    bool
	CommonPrefixes []string
	Objects        []*object.Object
}

func ObjectPrefixSearch added in v0.2.0

func ObjectPrefixSearch(ctx context.Context, b *bucket.Bucket, delimiter, prefix, startAfter string, maxKeys int) (*ObjectPrefixSearchResult, error)

type UserChangePasswordCommand added in v0.5.0

type UserChangePasswordCommand struct {
	CurrentPassword string
	NewPassword     string
}

type UserChangePasswordResult added in v0.5.0

type UserChangePasswordResult struct {
	Message string
}

func UserChangePassword added in v0.5.0

func UserChangePassword(ctx context.Context, u *user.User, cmd *UserChangePasswordCommand) (*UserChangePasswordResult, error)

Jump to

Keyboard shortcuts

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