Documentation ¶
Index ¶
- func NewDefault(m map[string]interface{}) (publicshare.Manager, error)
- type Manager
- func (m *Manager) CreatePublicShare(ctx context.Context, u *user.User, ri *provider.ResourceInfo, g *link.Grant) (*link.PublicShare, error)
- func (m *Manager) GetPublicShare(ctx context.Context, u *user.User, ref *link.PublicShareReference, sign bool) (*link.PublicShare, error)
- func (m *Manager) GetPublicShareByToken(ctx context.Context, token string, auth *link.PublicShareAuthentication, ...) (*link.PublicShare, error)
- func (m *Manager) ListPublicShares(ctx context.Context, u *user.User, ...) ([]*link.PublicShare, error)
- func (m *Manager) Load(ctx context.Context, shareChan <-chan *publicshare.WithPassword) error
- func (m *Manager) RevokePublicShare(ctx context.Context, u *user.User, ref *link.PublicShareReference) error
- func (m *Manager) UpdatePublicShare(ctx context.Context, u *user.User, req *link.UpdatePublicShareRequest) (*link.PublicShare, error)
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 ¶
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) 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
Click to show internal directories.
Click to hide internal directories.