Documentation ¶
Index ¶
- type Song
- func (s *Song) AfterAPIDelete(res http.ResponseWriter, req *http.Request) error
- func (s *Song) BeforeAPIDelete(res http.ResponseWriter, req *http.Request) error
- func (s *Song) Delete(res http.ResponseWriter, req *http.Request) error
- func (s *Song) MarshalEditor() ([]byte, error)
- func (s *Song) String() string
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 ¶
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 ¶
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 ¶
Delete is called after BeforeAPIDelete and implements api.Deleteable. All other delete-based hooks are only called if this is implemented.
func (*Song) MarshalEditor ¶
MarshalEditor writes a buffer of html to edit a Song within the CMS and implements editor.Editable
Click to show internal directories.
Click to hide internal directories.