cs3

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

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

New returns a new manager instance

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 (*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) 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

type PublicShareWithPassword

type PublicShareWithPassword struct {
	PublicShare    *link.PublicShare `json:"public_share"`
	HashedPassword string            `json:"password"`
}

PublicShareWithPassword represents a public share including its hashes password

Jump to

Keyboard shortcuts

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