sql

package
v3.5.1-eos53revad Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: Apache-2.0 Imports: 41 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOCMShareManager added in v3.4.0

func NewOCMShareManager(ctx context.Context, m map[string]any) (share.Repository, error)

func NewPublicShareManager

func NewPublicShareManager(ctx context.Context, m map[string]any) (publicshare.Manager, error)

func NewShareManager

func NewShareManager(ctx context.Context, m map[string]any) (revashare.Manager, error)

Types

type Config added in v3.4.0

type Config struct {
	config.Database      `mapstructure:",squash"`
	GatewaySvc           string `mapstructure:"gatewaysvc"`
	LinkPasswordHashCost int    `mapstructure:"password_hash_cost"`
}

func (*Config) ApplyDefaults added in v3.4.0

func (c *Config) ApplyDefaults()

type ExpiryRange

type ExpiryRange struct {
	From time.Time
	To   time.Time
}

type PublicShareMgr

type PublicShareMgr struct {
	// contains filtered or unexported fields
}

func (*PublicShareMgr) CreatePublicShare

func (m *PublicShareMgr) CreatePublicShare(ctx context.Context, u *user.User, md *provider.ResourceInfo, g *link.Grant, description string, internal bool, notifyUploads bool, notifyUploadsExtraRecipients string) (*link.PublicShare, error)
func (m *PublicShareMgr) GetPublicLink(ctx context.Context, ref *link.PublicShareReference, filter bool) (*model.PublicLink, error)

func (*PublicShareMgr) GetPublicShare

func (m *PublicShareMgr) GetPublicShare(ctx context.Context, u *user.User, ref *link.PublicShareReference, sign bool) (*link.PublicShare, error)

func (*PublicShareMgr) GetPublicShareByToken

func (m *PublicShareMgr) GetPublicShareByToken(ctx context.Context, token string, auth *link.PublicShareAuthentication, sign bool) (*link.PublicShare, error)

Get a PublicShare identified by token. This function returns `errtypes.InvalidCredentials` if `auth` does not contain a valid password or signature in case the PublicShare is password-protected

func (m *PublicShareMgr) ListPublicLinks(u *user.User, filters []*link.ListPublicSharesRequest_Filter, expiry *ExpiryRange, remove_orphan bool) ([]model.PublicLink, error)

List public links in the CERN-specific format. Used in cernboxcop.

func (*PublicShareMgr) ListPublicShares

func (m *PublicShareMgr) ListPublicShares(ctx context.Context, u *user.User, filters []*link.ListPublicSharesRequest_Filter, md *provider.ResourceInfo, sign bool) ([]*link.PublicShare, error)

List public shares that match the given filters

func (*PublicShareMgr) MarkAsOrphaned

func (m *PublicShareMgr) MarkAsOrphaned(ctx context.Context, ref *link.PublicShareReference) error

func (*PublicShareMgr) MovePublicShare

func (m *PublicShareMgr) MovePublicShare(ctx context.Context, ref *link.PublicShareReference, newLocation *provider.ResourceId, newOwner string) error

MovePublicShare moves a PublicShare to a new location, also updating its owner. It is the reponsibility of the caller to ensure that `newOwner` corresponds to the owner of `newLocation`

func (*PublicShareMgr) RevokePublicShare

func (m *PublicShareMgr) RevokePublicShare(ctx context.Context, u *user.User, ref *link.PublicShareReference) error

func (*PublicShareMgr) TransferPublicShare

func (m *PublicShareMgr) TransferPublicShare(ctx context.Context, ref *link.PublicShareReference, newInitiator string) error

TransferPublicShare transfers a publicshare to a new initiator. Only to be used for shares in projects.

func (*PublicShareMgr) UpdatePublicShare

func (m *PublicShareMgr) UpdatePublicShare(ctx context.Context, u *user.User, req *link.UpdatePublicShareRequest, g *link.Grant) (*link.PublicShare, error)

type ShareMgr

type ShareMgr struct {
	// contains filtered or unexported fields
}

func (*ShareMgr) GetReceivedShare

func (*ShareMgr) GetShare

func (*ShareMgr) GetShareUnfiltered

func (m *ShareMgr) GetShareUnfiltered(ctx context.Context, ref *collaboration.ShareReference) (*model.Share, error)

func (*ShareMgr) GetSharesByShareWith

func (m *ShareMgr) GetSharesByShareWith(ctx context.Context, shareWith string) ([]model.Share, error)

func (*ShareMgr) ListModelShares

func (m *ShareMgr) ListModelShares(u *user.User, filters []*collaboration.Filter, remove_orphan bool) ([]model.Share, error)

Used by cernboxcop, to include listings with orphans (which cannot be represented in the CS3 Shares)

func (*ShareMgr) ListReceivedShares

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

we list the shares that are targeted to the user in context or to the user groups.

func (*ShareMgr) ListShares

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

func (*ShareMgr) MarkAsOrphaned

func (m *ShareMgr) MarkAsOrphaned(ctx context.Context, ref *collaboration.ShareReference) error

func (*ShareMgr) MoveShare

func (m *ShareMgr) MoveShare(ctx context.Context, ref *collaboration.ShareReference, newLocation *provider.ResourceId, newOwner string) error

func (*ShareMgr) Share

func (*ShareMgr) TransferShare

func (m *ShareMgr) TransferShare(ctx context.Context, ref *collaboration.ShareReference, newInitiator string) error

TransferShare transfers a share to a new initiator. Only to be used for shares in projects.

func (*ShareMgr) Unshare

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

func (*ShareMgr) UpdateReceivedShare

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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