sql

package
v3.15.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: Apache-2.0 Imports: 44 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) ListPublicShareSpaces added in v3.14.0

func (m *PublicShareMgr) ListPublicShareSpaces(ctx context.Context) ([]string, error)

ListPublicShareSpaces returns the id of every space that holds at least one public link ListPublicShares would return. A row without a space id is left out: there is no space to reconcile it under.

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) ListPublicSharesInSpaces added in v3.14.0

func (m *PublicShareMgr) ListPublicSharesInSpaces(ctx context.Context, spaceIDs []string) ([]*link.PublicShare, error)

ListPublicSharesInSpaces returns the public links of the given spaces that ListPublicShares would return, and the links of every space when given none. The public share API has no space filter, so the reconciliation jobs pass the spaces themselves.

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) Stats added in v3.14.0

func (m *PublicShareMgr) Stats(ctx context.Context) (*stats.Payload, error)

Stats implements stats.Reporter for the public link manager.

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) ListExpiredShares added in v3.14.0

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

func (*ShareMgr) ListModelShares

func (m *ShareMgr) ListModelShares(u *user.User, filters []*collaboration.Filter, hideOrphans 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) ListShareSpaces added in v3.14.0

func (m *ShareMgr) ListShareSpaces(ctx context.Context) ([]string, error)

ListShareSpaces returns the id of every space that holds at least one share ListShares would return, which is what the reconciliation jobs walk. A row without a space id is left out: there is no space to reconcile it under.

func (*ShareMgr) ListShares

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

func (*ShareMgr) MarkAsExpired added in v3.14.0

func (m *ShareMgr) MarkAsExpired(ctx context.Context, ref *collaboration.ShareReference) 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) Stats added in v3.14.0

func (m *ShareMgr) Stats(ctx context.Context) (*stats.Payload, error)

Stats implements stats.Reporter for the user/group share manager.

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