album

package
v0.0.0-...-61c90a5 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultListSize = 100

Variables

View Source
var (
	ErrInvalidAlbum = errors.New("invalid album")
	ErrNotFound     = errors.New("album not found")
)

Functions

This section is empty.

Types

type Album

type Album struct {
	ID           string
	CircleID     string
	CreatorID    string
	CreatorName  string
	Title        string
	Description  string
	LocationName string
	EventStart   *time.Time
	EventEnd     *time.Time
	CoverMediaID string
	PostCount    int
	CreatedAt    time.Time
	UpdatedAt    time.Time
}

type CreateParams

type CreateParams struct {
	CreatorID    string
	Title        string
	Description  string
	LocationName string
	EventStart   *time.Time
	EventEnd     *time.Time
}

type Repository

type Repository interface {
	CreateAlbum(context.Context, Album) (Album, error)
	AlbumsForViewer(context.Context, string, int) ([]Album, error)
	AlbumForViewer(context.Context, string, string) (Album, error)
}

type Service

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

func NewService

func NewService(repository Repository) *Service

func (*Service) Create

func (s *Service) Create(ctx context.Context, params CreateParams) (Album, error)

func (*Service) Get

func (s *Service) Get(ctx context.Context, viewerID, albumID string) (Album, error)

func (*Service) List

func (s *Service) List(ctx context.Context, viewerID string) ([]Album, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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