content

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2019 License: BSD-3-Clause, BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Song

type Song struct {
	item.Item

	Title      string `json:"title"`
	Artist     string `json:"artist"`
	Rating     int    `json:"rating"`
	Opinion    string `json:"opinion"`
	SpotifyURL string `json:"spotify_url"`
}

func (*Song) AfterAPIDelete

func (s *Song) AfterAPIDelete(res http.ResponseWriter, req *http.Request) error

AfterAPIDelete is called after Delete, and is useful for logging or triggering notifications, etc. after the data is deleted frm the database, etc.

func (*Song) BeforeAPIDelete

func (s *Song) BeforeAPIDelete(res http.ResponseWriter, req *http.Request) error

BeforeAPIDelete is only called if the Song type implements api.Deleteable It is called before Delete, and returning an error will cancel the request causing the system to reject the data sent in the POST

func (*Song) Delete

func (s *Song) Delete(res http.ResponseWriter, req *http.Request) error

Delete is called after BeforeAPIDelete and implements api.Deleteable. All other delete-based hooks are only called if this is implemented.

func (*Song) MarshalEditor

func (s *Song) MarshalEditor() ([]byte, error)

MarshalEditor writes a buffer of html to edit a Song within the CMS and implements editor.Editable

func (*Song) String

func (s *Song) String() string

String defines the display name of a Song in the CMS list-view

Jump to

Keyboard shortcuts

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