Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResourceIDFilter ¶
func ResourceIDFilter(id *provider.ResourceId) *ocm.ListOCMSharesRequest_Filter
ResourceIDFilter is an abstraction for creating filter by resource id.
Types ¶
type Manager ¶
type Manager interface {
Share(ctx context.Context, md *provider.ResourceId, g *ocm.ShareGrant, name string,
pi *ocmprovider.ProviderInfo, pm string, owner *userpb.UserId, token string, st ocm.Share_ShareType) (*ocm.Share, error)
GetShare(ctx context.Context, ref *ocm.ShareReference) (*ocm.Share, error)
Unshare(ctx context.Context, ref *ocm.ShareReference) error
UpdateShare(ctx context.Context, ref *ocm.ShareReference, p *ocm.SharePermissions) (*ocm.Share, error)
// it returns only shares attached to the given resource.
ListShares(ctx context.Context, filters []*ocm.ListOCMSharesRequest_Filter) ([]*ocm.Share, error)
ListReceivedShares(ctx context.Context) ([]*ocm.ReceivedShare, error)
GetReceivedShare(ctx context.Context, ref *ocm.ShareReference) (*ocm.ReceivedShare, error)
UpdateReceivedShare(ctx context.Context, share *ocm.ReceivedShare, fieldMask *field_mask.FieldMask) (*ocm.ReceivedShare, error)
}
Manager is the interface that manipulates the OCM shares.
Click to show internal directories.
Click to hide internal directories.