playlist

package
v0.0.0-...-51cd039 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPlaylistRepo

type IPlaylistRepo interface {
	Create(context.Context, *Playlist) (*Playlist, error)
	Find(ctx context.Context, playlist *Playlist) (*Playlist, error)
}

type IPlaylistWorkflow

type IPlaylistWorkflow interface {
	Start(context.Context, *Playlist) error
}

type Playlist

type Playlist struct {
	ID     primitive.ObjectID `json:"id" bson:"_id"`
	User   string             `json:"user" bson:"user"`
	Tracks []string           `json:"tracks" bson:"tracks"`
	Status string             `json:"status" bson:"status"`
}

type PlaylistRepo

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

func NewPlaylistRepo

func NewPlaylistRepo(mongo *db.Mongo) *PlaylistRepo

func (*PlaylistRepo) Create

func (r *PlaylistRepo) Create(ctx context.Context, playlist *Playlist) (*Playlist, error)

func (*PlaylistRepo) Find

func (r *PlaylistRepo) Find(ctx context.Context, playlist *Playlist) (*Playlist, error)

type PlaylistService

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

func NewPlaylistService

func NewPlaylistService(repo IPlaylistRepo, work IPlaylistWorkflow) *PlaylistService

func (*PlaylistService) Save

func (s *PlaylistService) Save(ctx context.Context, pl *Playlist) (*Playlist, error)

type PlaylistWorkflow

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

func NewPlaylisteWorkflow

func NewPlaylisteWorkflow(cl client.Client) *PlaylistWorkflow

func (*PlaylistWorkflow) Start

func (w *PlaylistWorkflow) Start(ctx context.Context, playlist *Playlist) error

Jump to

Keyboard shortcuts

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