cs3

package
v2.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 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{}) (share.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 share manager using a cs3 storage backend

func New

func New(gatewayClient gatewayv1beta1.GatewayAPIClient, s metadata.Storage, indexer indexer.Indexer) (*Manager, error)

New returns a new manager instance

func (*Manager) GetReceivedShare

GetReceivedShare returns the information for a received share.

func (*Manager) GetShare

GetShare gets the information for a share by the given ref.

func (*Manager) ListReceivedShares

func (m *Manager) ListReceivedShares(ctx context.Context, filters []*collaboration.Filter) ([]*collaboration.ReceivedShare, error)

ListReceivedShares returns the list of shares the user has access to.

func (*Manager) ListShares

func (m *Manager) ListShares(ctx context.Context, filters []*collaboration.Filter) ([]*collaboration.Share, error)

ListShares returns the shares created by the user

func (*Manager) Load added in v2.6.0

func (m *Manager) Load(ctx context.Context, shareChan <-chan *collaboration.Share, receivedShareChan <-chan share.ReceivedShareWithUser) error

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

func (*Manager) Share

Share creates a new share

func (*Manager) Unshare

func (m *Manager) Unshare(ctx context.Context, ref *collaboration.ShareReference) error

Unshare deletes the share pointed by ref.

func (*Manager) UpdateReceivedShare

func (m *Manager) UpdateReceivedShare(ctx context.Context, rshare *collaboration.ReceivedShare, fieldMask *field_mask.FieldMask) (*collaboration.ReceivedShare, error)

UpdateReceivedShare updates the received share with share state.

func (*Manager) UpdateShare

UpdateShare updates the mode of the given share.

type ReceivedShareMetadata

type ReceivedShareMetadata struct {
	State      collaboration.ShareState `json:"state"`
	MountPoint *provider.Reference      `json:"mountpoint"`
}

ReceivedShareMetadata hold the state information or a received share

Jump to

Keyboard shortcuts

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