api

package
v0.0.0-...-60084ce Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAccountRouter

func CreateAccountRouter(router *mux.Router)

func CreateFolderRouter

func CreateFolderRouter(router *mux.Router)

func CreatePlaylistRouter

func CreatePlaylistRouter(router *mux.Router)

Types

type AddSongRequest

type AddSongRequest struct {
	SongId string `json:"songId"`
}

type Folder

type Folder struct {
	Id           string `json:"id"`
	Name         string `json:"name"`
	ParentFolder string `json:"parentFolder"`
}

type FullPlaylist

type FullPlaylist struct {
	Playlist Playlist `json:"playlist"`
	Songs    []Song   `json:"songs"`
}

type LoginRequest

type LoginRequest struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type LoginResponse

type LoginResponse struct {
	ApiKey string     `json:"apiKey"`
	User   PublicUser `json:"user"`
}

type Playlist

type Playlist struct {
	ID        string    `json:"id"`
	Name      string    `json:"name"`
	FolderId  string    `json:"folderId"`
	CreatedAt time.Time `json:"createdAt"`
}

type PublicUser

type PublicUser struct {
	ID          string `json:"id"`
	DisplayName string `json:"displayName"`
}

type RegisterErrorResponse

type RegisterErrorResponse struct {
	Error string `json:"error"`
}

type RegisterRequest

type RegisterRequest struct {
	Username string `json:"username"`
	Password string `json:"password"`
	Email    string `json:"email"`
}

type RegisterSuccessResponse

type RegisterSuccessResponse struct {
	ApiKey string     `json:"apiKey"`
	User   PublicUser `json:"user"`
}

type Song

type Song struct {
	ID       string `json:"id"`
	Title    string `json:"title"`
	Duration int    `json:"duration"`
}

Jump to

Keyboard shortcuts

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