Documentation ¶
Index ¶
- func DRLogErrorMessage(e []error) *returnMessage
- func DetailedErrorMessage(e validator.ValidationErrors) *returnMessage
- func GenericErrorMessage(e error) *returnMessage
- func InformationMessage(message ...string) *returnMessage
- type Album
- type AlbumList
- type Art
- type Empty
- type ExportMeta
- type Response
- type Track
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DRLogErrorMessage ¶ added in v1.1.8
func DRLogErrorMessage(e []error) *returnMessage
func DetailedErrorMessage ¶
func DetailedErrorMessage(e validator.ValidationErrors) *returnMessage
func GenericErrorMessage ¶
func GenericErrorMessage(e error) *returnMessage
func InformationMessage ¶
func InformationMessage(message ...string) *returnMessage
Types ¶
type Album ¶
type Album struct { ID string `json:"id,omitempty"` Barcode string `json:"barcode" binding:"required,min=11,max=13,numeric"` Artist string `json:"artist" binding:"required,min=1,max=90"` Album string `json:"album" binding:"required,min=1,max=128"` Label string `json:"label,omitempty" binding:"omitempty,min=1,max=64"` Country string `json:"country,omitempty" binding:"omitempty,len=2"` Source string `json:"source" binding:"required,oneof=CDROM SHMCD SACD DVDA BLURAY DOWNLOAD"` CatalogNumber string `json:"catalogNumber" binding:"omitempty,min=1,max=128"` Comment string `json:"comment,omitempty" binding:"omitempty,min=1,max=1024"` DRLog string `json:"drLog,omitempty" binding:"required"` Art string `json:"art,omitempty" binding:"required,encodedimage"` LabelCode string `json:"labelCode" binding:"omitempty,min=4,max=5"` ReleaseYear int `json:"releaseYear" binding:"required,numeric,min=1000,max=3000"` AverageDR int8 `json:"averageDR"` MinimumDR int8 `json:"minimumDR"` MaximumDR int8 `json:"maximumDR"` InCollection bool `json:"in_collection,omitempty"` Tracks []*Track `json:"tracks,omitempty"` }
Album Describes an album.
func (*Album) SourceFriendly ¶
type AlbumList ¶
type AlbumList struct { TotalAlbums int `json:"total_albums"` PageCount int `json:"page_count,omitempty"` ExportMeta *ExportMeta `json:"export_meta,omitempty"` Albums []*Album `json:"albums"` }
AlbumList Describes a list of albums, together with pagination information.
type Empty ¶
type Empty struct { }
Empty An empty struct, needed for doing POST calls where no body is needed. Again, this is a workaround for the current HTTP client.
type ExportMeta ¶
type ExportMeta struct { ExportDate int64 `json:"export_date"` Version string `json:"version"` Username string `json:"username"` }
ExportMeta Contains information about the exported albums.
type Response ¶
type Response struct { Headers *http.Header `json:"-"` // This field should not appear Information []string `json:"information,omitempty"` Errors []*errorMessage `json:"errors,omitempty"` }
Response API responses fit in this struct.
func (*Response) IsNotValid ¶
IsNotValid Checks whether the response is valid. Workaround, because the current HTTP client doesn't handle errors very well.
func (*Response) XLogIDHeader ¶ added in v1.2.6
type Track ¶
type Track struct { ID string `json:"id,omitempty"` Name string `json:"name" binding:"required,min=1,max=128"` Peak float32 `json:"peakDB" binding:"required,numeric,min=-100,max=0"` Average float32 `json:"averageDB" binding:"required,numeric,min=-100,max=0"` Position int8 `json:"position" binding:"required,numeric,min=1,max=99"` DynamicRange int8 `json:"dr" binding:"required,numeric,min=1,max=32"` }
Track Describes one track. A track is a part of an album.
Click to show internal directories.
Click to hide internal directories.