interfaces

package
v0.0.0-...-bd7327a Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

This package is needed to declare interfaces

This package is needed to declare interfaces

This package is needed to declare interfaces

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Playlist

type Playlist interface {
	Get() []entity.Playlist
	Create(*entity.Playlist) (*entity.Playlist, error)
	Update(uint, *entity.Playlist) (*entity.Playlist, error)
	Delete(uint) error
	Play(uint, uint, uint) error
	Pause(uint, uint, uint) error
	AddSong(uint, uint, uint) error
	Next(uint, uint, uint) error
	Prev(uint, uint, uint) error
}

This code defines an interface named Playlist that specifies a set of methods that should be implemented by types that represent a music playlist.

type Song

type Song interface {
	Get() []entity.Song
	Create(*entity.Song) (*entity.Song, error)
	Update(uint, *entity.Song) (*entity.Song, error)
	Delete(uint) error
}

This code defines an interface named Song that specifies a set of methods that should be implemented by types that represent a song.

type User

type User interface {
	Get() []entity.User
	Create(*entity.User) (*entity.User, error)
	Update(uint, *entity.User) (*entity.User, error)
	Delete(uint) error
}

This code defines an interface named User that specifies a set of methods that should be implemented by types that represent a user.

Jump to

Keyboard shortcuts

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