shareapp

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrShareNotFound             = errors.New("share not found")
	ErrShareAlreadyExists        = errors.New("share already exists")
	ErrUserNotFound              = errors.New("user not found")
	ErrExternalUserNotFound      = errors.New("external user not found")
	ErrExternalUserAlreadyExists = errors.New("external user already exists")
	ErrEncryptionPartRequired    = errors.New("encryption part is required")
	ErrEncryptionNotConfigured   = errors.New("encryption not configured")
	ErrInvalidEncryptionPart     = errors.New("invalid encryption part")
	ErrInvalidEncryptionSession  = errors.New("invalid encryption session")
	ErrInternal                  = errors.New("internal error")
)

Functions

This section is empty.

Types

type EncryptionParameters

type EncryptionParameters struct {
	Salt       string
	Iterations int
	Length     int
	Digest     string
}

type Option

type Option func(*options)

func WithEncryptionPart

func WithEncryptionPart(encryptionPart string) Option

func WithEncryptionSession added in v0.1.11

func WithEncryptionSession(encryptionSession string) Option

type ShareApplication

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

func New

func New(shareSvc services.ShareService, shareRepo repositories.ShareRepository, projectRepo repositories.ProjectRepository, encryptionFactory factories.EncryptionFactory, shamirJob *shamirjob.Job) *ShareApplication

func (*ShareApplication) DeleteShare added in v0.1.6

func (a *ShareApplication) DeleteShare(ctx context.Context) error

func (*ShareApplication) GetShare

func (a *ShareApplication) GetShare(ctx context.Context, opts ...Option) (*share.Share, error)

func (*ShareApplication) RegisterShare

func (a *ShareApplication) RegisterShare(ctx context.Context, shr *share.Share, opts ...Option) error

func (*ShareApplication) UpdateShare added in v0.1.11

func (a *ShareApplication) UpdateShare(ctx context.Context, shr *share.Share, opts ...Option) (*share.Share, error)

Jump to

Keyboard shortcuts

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