catalogviews

package
v1.5.48 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: AGPL-3.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlbumView

type AlbumView struct {
	FindAlbumByOwnerPort   FindAlbumByOwnerPort
	FindAlbumsByIdsPort    FindAlbumsByIdsPort
	FindAlbumSharingToPort FindAlbumSharingToPort
	SharedWithUserPort     SharedWithUserPort
}

func (*AlbumView) ListAlbums

func (v *AlbumView) ListAlbums(ctx context.Context, user usermodel.CurrentUser, filter ListAlbumsFilter) ([]*VisibleAlbum, error)

ListAlbums returns albums visible by the user (owned by current user, and shared to him)

type FindAlbumByOwnerPort

type FindAlbumByOwnerPort interface {
	FindAlbumsByOwner(ctx context.Context, owner ownermodel.Owner) ([]*catalog.Album, error)
}

type FindAlbumSharingToPort

type FindAlbumSharingToPort interface {
	GetAlbumSharingGrid(ctx context.Context, owner ownermodel.Owner) (map[catalog.AlbumId][]usermodel.UserId, error)
}

type FindAlbumsByIdsPort

type FindAlbumsByIdsPort interface {
	FindAlbumsById(ctx context.Context, ids []catalog.AlbumId) ([]*catalog.Album, error)
}

type ListAlbumsFilter

type ListAlbumsFilter struct {
	OnlyDirectlyOwned bool // OnlyDirectlyOwned provides a sub-view where only resources directly owned by user are displayed and accessible
}

type SharedWithUserPort

type SharedWithUserPort interface {
	ListAlbumIdsSharedWithUser(ctx context.Context, userId usermodel.UserId) ([]catalog.AlbumId, error)
}

type VisibleAlbum

type VisibleAlbum struct {
	catalog.Album
	MediaCount         int                // Count is the number of medias on the album
	Visitors           []usermodel.UserId // Visitors are the users that can see the album ; only visible to the owner of the album
	OwnedByCurrentUser bool               // OwnedByCurrentUser is set to true when the user is an owner of the album
}

Jump to

Keyboard shortcuts

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