handler

package
v0.0.0-...-6c99f1e Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: GPL-3.0 Imports: 14 Imported by: ? modules, 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

View Source
const HoursInDay = 24

Variables

This section is empty.

Functions

This section is empty.

Types

type Playlist

type Playlist struct {
	Store PlaylistStore
}

func (Playlist) AddSong

func (p Playlist) AddSong(c echo.Context) error

AddSong adds a song to the playlist.

func (Playlist) Create

func (p Playlist) Create(c echo.Context) error

Create creates a new empty playlist.

func (Playlist) Get

func (p Playlist) Get(c echo.Context) error

Get returns a playlist with its songs.

func (Playlist) List

func (p Playlist) List(c echo.Context) error

List returns the playlists that the user owns or are shared with them.

func (Playlist) Register

func (p Playlist) Register(g *echo.Group)

func (Playlist) RemoveSong

func (p Playlist) RemoveSong(c echo.Context) error

RemoveSong removes a song from the playlist.

func (Playlist) Share

func (p Playlist) Share(c echo.Context) error

Share shares the playlist with another user.

type PlaylistStore

type PlaylistStore interface {
	Create(ctx context.Context, owner, name string) (model.Playlist, error)
	Get(ctx context.Context, id int, viewer string) (model.PlaylistDetail, error)
	List(ctx context.Context, username string) ([]model.Playlist, error)
	AddSong(ctx context.Context, id int, username string, songID int) error
	RemoveSong(ctx context.Context, id int, username string, songID int) error
	Share(ctx context.Context, id int, username, with string) error
}

PlaylistStore is the persistence layer that the playlist handler depends on.

type Premium

type Premium struct {
	Store *sql.DB
}

func (Premium) Extend

func (p Premium) Extend(c echo.Context) error

func (Premium) Register

func (p Premium) Register(g *echo.Group)

type Purchase

type Purchase struct {
	Store *sql.DB
}

func (Purchase) Buy

func (p Purchase) Buy(c echo.Context) error

func (Purchase) Register

func (p Purchase) Register(g *echo.Group)

type SignUp

type SignUp struct {
	Store *sql.DB
}

func (*SignUp) Create

func (s *SignUp) Create(c echo.Context) error

func (*SignUp) Register

func (s *SignUp) Register(g *echo.Group)

func (*SignUp) Retrieve

func (s *SignUp) Retrieve(c echo.Context) error

Retrieve retrieves URL for given short URL and redirect to it. nolint: wrapcheck

func (*SignUp) Update

func (s *SignUp) Update(c echo.Context) error

type Song

type Song struct {
	Store *sql.DB
}

func (Song) Assign

func (s Song) Assign(c echo.Context) error

func (Song) Category

func (s Song) Category(c echo.Context) error

func (Song) Like

func (s Song) Like(c echo.Context) error

func (Song) New

func (s Song) New(c echo.Context) error

func (Song) Play

func (s Song) Play(c echo.Context) error

func (Song) Register

func (s Song) Register(g *echo.Group)

type Wallet

type Wallet struct {
	Store *sql.DB
}

func (*Wallet) Register

func (w *Wallet) Register(g *echo.Group)

func (*Wallet) Transfer

func (w *Wallet) Transfer(c echo.Context) error

func (*Wallet) Update

func (w *Wallet) Update(c echo.Context) error

Jump to

Keyboard shortcuts

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