cs3

package
v2.19.3 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDefault

func NewDefault(m map[string]interface{}) (publicshare.Manager, error)

NewDefault returns a new manager instance with default dependencies

Types

type Manager

type Manager struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Manager implements a publicshare manager using a cs3 storage backend

func New

func New(gatewayClient gateway.GatewayAPIClient, storage metadata.Storage, indexer indexer.Indexer, passwordHashCost int) (*Manager, error)

New returns a new manager instance

func (*Manager) CreatePublicShare

func (m *Manager) CreatePublicShare(ctx context.Context, u *user.User, ri *provider.ResourceInfo, g *link.Grant) (*link.PublicShare, error)

CreatePublicShare creates a new public share

func (*Manager) Dump added in v2.10.0

func (m *Manager) Dump(ctx context.Context, shareChan chan<- *publicshare.WithPassword) error

Dump exports public shares to channels (e.g. during migration)

func (*Manager) GetPublicShare

func (m *Manager) GetPublicShare(ctx context.Context, u *user.User, ref *link.PublicShareReference, sign bool) (*link.PublicShare, error)

GetPublicShare returns an existing public share

func (*Manager) GetPublicShareByToken

func (m *Manager) GetPublicShareByToken(ctx context.Context, token string, auth *link.PublicShareAuthentication, sign bool) (*link.PublicShare, error)

GetPublicShareByToken gets an existing public share in an unauthenticated context using either a password or a signature

func (*Manager) ListPublicShares

func (m *Manager) ListPublicShares(ctx context.Context, u *user.User, filters []*link.ListPublicSharesRequest_Filter, sign bool) ([]*link.PublicShare, error)

ListPublicShares lists existing public shares matching the given filters

func (*Manager) Load added in v2.6.0

func (m *Manager) Load(ctx context.Context, shareChan <-chan *publicshare.WithPassword) error

Load imports public shares and received shares from channels (e.g. during migration)

func (*Manager) RevokePublicShare

func (m *Manager) RevokePublicShare(ctx context.Context, u *user.User, ref *link.PublicShareReference) error

RevokePublicShare revokes an existing public share

func (*Manager) UpdatePublicShare

func (m *Manager) UpdatePublicShare(ctx context.Context, u *user.User, req *link.UpdatePublicShareRequest) (*link.PublicShare, error)

UpdatePublicShare updates an existing public share

Jump to

Keyboard shortcuts

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