controllers

package
v0.0.0-...-99409e2 Latest Latest
Warning

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

Go to latest
Published: May 27, 2018 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render404

func Render404(rw http.ResponseWriter, req *http.Request)

func Render500

func Render500(rw http.ResponseWriter, err error)

Types

type CreatePlaylistRequest

type CreatePlaylistRequest struct {
	PlaylistName string `json:"playlist_name`
}

type Home

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

func NewHome

func NewHome(sessions *requests.Sessions) *Home

func (*Home) BindToMux

func (h *Home) BindToMux(mux *mux.Router, oauth *oauth.OAuth, errorHandler func(http.ResponseWriter, error))

func (*Home) Logout

func (h *Home) Logout(rw http.ResponseWriter, req *http.Request)

func (*Home) View

func (h *Home) View(rw http.ResponseWriter, req *http.Request)

type Playlists

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

func NewPlaylistsController

func NewPlaylistsController(
	oauth *oauth.OAuth,
	spotifyClientFn func(user *model.User) (*spotify.SpotifyClient, error),
	playlistStore model.PlaylistStore,
	errorHandler func(http.ResponseWriter, error)) *Playlists

func (*Playlists) BindToMux

func (p *Playlists) BindToMux(mux *mux.Router)

func (*Playlists) Create

func (p *Playlists) Create(rw http.ResponseWriter, req *http.Request)

type ShareRequest

type ShareRequest struct {
	PlaylistOwnerID model.UserID     `json:"playlistOwnerId"`
	PlaylistID      model.PlaylistID `json:"playlistId"`
	Email           string           `json:"email"`
}

type Subscriptions

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

func NewSubscriptionsController

func NewSubscriptionsController(
	oauth *oauth.OAuth,
	spotifyClientFn func(user *model.User) (*spotify.SpotifyClient, error),
	playlistStore model.PlaylistStore,
	notifier *notifiers.Notifier,
	errorHandler func(http.ResponseWriter, error)) *Subscriptions

func (*Subscriptions) BindToMux

func (s *Subscriptions) BindToMux(mux *mux.Router)

func (*Subscriptions) Create

func (s *Subscriptions) Create(rw http.ResponseWriter, req *http.Request)

func (*Subscriptions) Delete

func (s *Subscriptions) Delete(rw http.ResponseWriter, req *http.Request)

func (*Subscriptions) ShareCreate

func (s *Subscriptions) ShareCreate(rw http.ResponseWriter, req *http.Request)

func (*Subscriptions) ShareView

func (s *Subscriptions) ShareView(rw http.ResponseWriter, req *http.Request)

func (*Subscriptions) View

func (s *Subscriptions) View(rw http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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