Documentation
¶
Index ¶
- Variables
- func NewEmbeddedProtocol(payload string) *ocm.Protocol
- func NewWebDAVProtocol(uri, sharedSecret string, perms *ocm.SharePermissions, ...) *ocm.Protocol
- func NewWebDavAccessMethod(perms *provider.ResourcePermissions, accTypes []ocm.AccessType, reqs []string) *ocm.AccessMethod
- func NewWebappAccessMethod(mode appprovider.ViewMode) *ocm.AccessMethod
- func NewWebappProtocol(uri string, viewMode appprovider.ViewMode) *ocm.Protocol
- func ResourceIDFilter(id *provider.ResourceId) *ocm.ListOCMSharesRequest_Filter
- type Repository
Constants ¶
This section is empty.
Variables ¶
ErrShareAlreadyExisting is the error returned when the share already exists for the 3-tuple consisting of (owner, resource, grantee).
ErrShareNotFound is the error returned where the share does not exist.
Functions ¶
func NewEmbeddedProtocol ¶ added in v3.5.1
NewEmbeddedProtocol is an abstraction for creating an OCM embedded protocol.
func NewWebDAVProtocol ¶
func NewWebDAVProtocol(uri, sharedSecret string, perms *ocm.SharePermissions, accTypes []ocm.AccessType, reqs []string) *ocm.Protocol
NewWebDAVProtocol is an abstraction for creating a WebDAV protocol.
func NewWebDavAccessMethod ¶
func NewWebDavAccessMethod(perms *provider.ResourcePermissions, accTypes []ocm.AccessType, reqs []string) *ocm.AccessMethod
NewWebDavAccessMethod is an abstraction for creating a WebDAV access method, which is the protocol used by remote users to access an OCM share.
func NewWebappAccessMethod ¶
func NewWebappAccessMethod(mode appprovider.ViewMode) *ocm.AccessMethod
NewWebappAccessMethod is an abstraction for creating a Webapp access method, which is the protocol used by remote users to access an OCM share.
func NewWebappProtocol ¶
func NewWebappProtocol(uri string, viewMode appprovider.ViewMode) *ocm.Protocol
NewWebappProtocol is an abstraction for creating a Webapp protocol.
func ResourceIDFilter ¶
func ResourceIDFilter(id *provider.ResourceId) *ocm.ListOCMSharesRequest_Filter
ResourceIDFilter is an abstraction for creating filter by resource id.
Types ¶
type Repository ¶
type Repository interface {
StoreShare(ctx context.Context, share *ocm.Share) (*ocm.Share, error)
GetShare(ctx context.Context, user *userpb.User, ref *ocm.ShareReference) (*ocm.Share, error)
DeleteShare(ctx context.Context, user *userpb.User, ref *ocm.ShareReference) error
UpdateShare(ctx context.Context, user *userpb.User, ref *ocm.ShareReference, f ...*ocm.UpdateOCMShareRequest_UpdateField) (*ocm.Share, error)
// it returns only shares attached to the given resource.
ListShares(ctx context.Context, user *userpb.User, filters []*ocm.ListOCMSharesRequest_Filter) ([]*ocm.Share, error)
StoreReceivedShare(ctx context.Context, share *ocm.ReceivedShare) (*ocm.ReceivedShare, error)
ListReceivedShares(ctx context.Context, user *userpb.User, filters []*ocm.ListReceivedOCMSharesRequest_Filter) ([]*ocm.ReceivedShare, error)
GetReceivedShare(ctx context.Context, user *userpb.User, ref *ocm.ShareReference) (*ocm.ReceivedShare, error)
UpdateReceivedShare(ctx context.Context, user *userpb.User, share *ocm.ReceivedShare, fieldMask *field_mask.FieldMask) (*ocm.ReceivedShare, error)
}
Repository is the interface that manipulates the OCM shares repository.