content

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 11, 2020 License: BSD-3-Clause, BSD-3-Clause Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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