Documentation ¶
Index ¶
- func CreateMusicPath() string
- func CreateUserPath() string
- func FollowUserPath(id string, followeeID string) string
- func ListMusicPath() string
- func ListUserPath() string
- func ListenUserPath(id string, musicID string) string
- func RecommendRecommendationsPath(userID string, limit int) string
- func ShowMusicPath(id string) string
- func ShowUserPath(id string) string
- type BluelensMusic
- type BluelensMusicCollection
- type BluelensMusicFull
- type BluelensMusicFullCollection
- type BluelensMusicLink
- type BluelensMusicLinkCollection
- type BluelensRecommendations
- type BluelensRecommendationsAll
- type BluelensRecommendationsLinks
- type BluelensUser
- type BluelensUserCollection
- type BluelensUserFull
- type BluelensUserFullCollection
- type BluelensUserLink
- type BluelensUserLinkCollection
- type BluelensUserLinks
- type BluelensUserLinksArray
- type Client
- func (c *Client) CreateMusic(ctx context.Context, path string, payload *Music) (*http.Response, error)
- func (c *Client) CreateUser(ctx context.Context, path string, payload *User) (*http.Response, error)
- func (c *Client) DecodeBluelensMusic(resp *http.Response) (*BluelensMusic, error)
- func (c *Client) DecodeBluelensMusicCollection(resp *http.Response) (BluelensMusicCollection, error)
- func (c *Client) DecodeBluelensMusicFull(resp *http.Response) (*BluelensMusicFull, error)
- func (c *Client) DecodeBluelensMusicFullCollection(resp *http.Response) (BluelensMusicFullCollection, error)
- func (c *Client) DecodeBluelensMusicLink(resp *http.Response) (*BluelensMusicLink, error)
- func (c *Client) DecodeBluelensMusicLinkCollection(resp *http.Response) (BluelensMusicLinkCollection, error)
- func (c *Client) DecodeBluelensRecommendations(resp *http.Response) (*BluelensRecommendations, error)
- func (c *Client) DecodeBluelensRecommendationsAll(resp *http.Response) (*BluelensRecommendationsAll, error)
- func (c *Client) DecodeBluelensUser(resp *http.Response) (*BluelensUser, error)
- func (c *Client) DecodeBluelensUserCollection(resp *http.Response) (BluelensUserCollection, error)
- func (c *Client) DecodeBluelensUserFull(resp *http.Response) (*BluelensUserFull, error)
- func (c *Client) DecodeBluelensUserFullCollection(resp *http.Response) (BluelensUserFullCollection, error)
- func (c *Client) DecodeBluelensUserLink(resp *http.Response) (*BluelensUserLink, error)
- func (c *Client) DecodeBluelensUserLinkCollection(resp *http.Response) (BluelensUserLinkCollection, error)
- func (c *Client) DecodeErrorResponse(resp *http.Response) (*goa.ErrorResponse, error)
- func (c *Client) DownloadSwaggerJSON(ctx context.Context, dest string) (int64, error)
- func (c *Client) DownloadSwaggerYaml(ctx context.Context, dest string) (int64, error)
- func (c *Client) FollowUser(ctx context.Context, path string, payload *FollowUserPayload) (*http.Response, error)
- func (c *Client) ListMusic(ctx context.Context, path string, limit *int, offset *int) (*http.Response, error)
- func (c *Client) ListUser(ctx context.Context, path string, limit *int, offset *int) (*http.Response, error)
- func (c *Client) ListenUser(ctx context.Context, path string, payload *ListenUserPayload) (*http.Response, error)
- func (c *Client) NewCreateMusicRequest(ctx context.Context, path string, payload *Music) (*http.Request, error)
- func (c *Client) NewCreateUserRequest(ctx context.Context, path string, payload *User) (*http.Request, error)
- func (c *Client) NewFollowUserRequest(ctx context.Context, path string, payload *FollowUserPayload) (*http.Request, error)
- func (c *Client) NewListMusicRequest(ctx context.Context, path string, limit *int, offset *int) (*http.Request, error)
- func (c *Client) NewListUserRequest(ctx context.Context, path string, limit *int, offset *int) (*http.Request, error)
- func (c *Client) NewListenUserRequest(ctx context.Context, path string, payload *ListenUserPayload) (*http.Request, error)
- func (c *Client) NewRecommendRecommendationsRequest(ctx context.Context, path string) (*http.Request, error)
- func (c *Client) NewShowMusicRequest(ctx context.Context, path string) (*http.Request, error)
- func (c *Client) NewShowUserRequest(ctx context.Context, path string) (*http.Request, error)
- func (c *Client) RecommendRecommendations(ctx context.Context, path string) (*http.Response, error)
- func (c *Client) SetAPIKeySigner(signer goaclient.Signer)
- func (c *Client) SetBasicAuthSigner(signer goaclient.Signer)
- func (c *Client) ShowMusic(ctx context.Context, path string) (*http.Response, error)
- func (c *Client) ShowUser(ctx context.Context, path string) (*http.Response, error)
- type FollowUserPayload
- type ListenUserPayload
- type Music
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateMusicPath ¶
func CreateMusicPath() string
CreateMusicPath computes a request path to the create action of music.
func CreateUserPath ¶
func CreateUserPath() string
CreateUserPath computes a request path to the create action of user.
func FollowUserPath ¶
FollowUserPath computes a request path to the follow action of user.
func ListMusicPath ¶
func ListMusicPath() string
ListMusicPath computes a request path to the list action of music.
func ListUserPath ¶
func ListUserPath() string
ListUserPath computes a request path to the list action of user.
func ListenUserPath ¶
ListenUserPath computes a request path to the listen action of user.
func RecommendRecommendationsPath ¶
RecommendRecommendationsPath computes a request path to the recommend action of recommendations.
func ShowMusicPath ¶
ShowMusicPath computes a request path to the show action of music.
func ShowUserPath ¶
ShowUserPath computes a request path to the show action of user.
Types ¶
type BluelensMusic ¶
type BluelensMusic struct { Href string `form:"href" json:"href" xml:"href"` ID string `form:"id" json:"id" xml:"id"` Tags []string `form:"tags,omitempty" json:"tags,omitempty" xml:"tags,omitempty"` }
Media type of a music resource (default view)
Identifier: application/vnd.bluelens.music+json; view=default
func (*BluelensMusic) Validate ¶
func (mt *BluelensMusic) Validate() (err error)
Validate validates the BluelensMusic media type instance.
type BluelensMusicCollection ¶
type BluelensMusicCollection []*BluelensMusic
BluelensMusicCollection is the media type for an array of BluelensMusic (default view)
Identifier: application/vnd.bluelens.music+json; type=collection; view=default
func (BluelensMusicCollection) Validate ¶
func (mt BluelensMusicCollection) Validate() (err error)
Validate validates the BluelensMusicCollection media type instance.
type BluelensMusicFull ¶
type BluelensMusicFull struct { Href string `form:"href" json:"href" xml:"href"` ID string `form:"id" json:"id" xml:"id"` Tags []string `form:"tags,omitempty" json:"tags,omitempty" xml:"tags,omitempty"` }
Media type of a music resource (full view)
Identifier: application/vnd.bluelens.music+json; view=full
func (*BluelensMusicFull) Validate ¶
func (mt *BluelensMusicFull) Validate() (err error)
Validate validates the BluelensMusicFull media type instance.
type BluelensMusicFullCollection ¶
type BluelensMusicFullCollection []*BluelensMusicFull
BluelensMusicCollection is the media type for an array of BluelensMusic (full view)
Identifier: application/vnd.bluelens.music+json; type=collection; view=full
func (BluelensMusicFullCollection) Validate ¶
func (mt BluelensMusicFullCollection) Validate() (err error)
Validate validates the BluelensMusicFullCollection media type instance.
type BluelensMusicLink ¶
type BluelensMusicLink struct {
Href string `form:"href" json:"href" xml:"href"`
}
Media type of a music resource (link view)
Identifier: application/vnd.bluelens.music+json; view=link
func (*BluelensMusicLink) Validate ¶
func (mt *BluelensMusicLink) Validate() (err error)
Validate validates the BluelensMusicLink media type instance.
type BluelensMusicLinkCollection ¶
type BluelensMusicLinkCollection []*BluelensMusicLink
BluelensMusicCollection is the media type for an array of BluelensMusic (link view)
Identifier: application/vnd.bluelens.music+json; type=collection; view=link
func (BluelensMusicLinkCollection) Validate ¶
func (mt BluelensMusicLinkCollection) Validate() (err error)
Validate validates the BluelensMusicLinkCollection media type instance.
type BluelensRecommendations ¶
type BluelensRecommendations struct { // Links to related resources Links *BluelensRecommendationsLinks `form:"links,omitempty" json:"links,omitempty" xml:"links,omitempty"` MusicID []string `form:"musicID,omitempty" json:"musicID,omitempty" xml:"musicID,omitempty"` }
A list of recommendations for the specified user (default view)
Identifier: application/vnd.bluelens.recommendations+json; view=default
func (*BluelensRecommendations) Validate ¶
func (mt *BluelensRecommendations) Validate() (err error)
Validate validates the BluelensRecommendations media type instance.
type BluelensRecommendationsAll ¶
type BluelensRecommendationsAll struct { List BluelensMusicCollection `form:"list" json:"list" xml:"list"` MusicID []string `form:"musicID,omitempty" json:"musicID,omitempty" xml:"musicID,omitempty"` User *BluelensUser `form:"user" json:"user" xml:"user"` }
A list of recommendations for the specified user (all view)
Identifier: application/vnd.bluelens.recommendations+json; view=all
func (*BluelensRecommendationsAll) Validate ¶
func (mt *BluelensRecommendationsAll) Validate() (err error)
Validate validates the BluelensRecommendationsAll media type instance.
type BluelensRecommendationsLinks ¶
type BluelensRecommendationsLinks struct { List BluelensMusicLinkCollection `form:"list,omitempty" json:"list,omitempty" xml:"list,omitempty"` User *BluelensUserLink `form:"user,omitempty" json:"user,omitempty" xml:"user,omitempty"` }
BluelensRecommendationsLinks contains links to related resources of BluelensRecommendations.
func (*BluelensRecommendationsLinks) Validate ¶
func (ut *BluelensRecommendationsLinks) Validate() (err error)
Validate validates the BluelensRecommendationsLinks type instance.
type BluelensUser ¶
type BluelensUser struct { Href string `form:"href" json:"href" xml:"href"` ID string `form:"id" json:"id" xml:"id"` // Links to related resources Links *BluelensUserLinks `form:"links,omitempty" json:"links,omitempty" xml:"links,omitempty"` }
Media type of a user resource (default view)
Identifier: application/vnd.bluelens.user+json; view=default
func (*BluelensUser) Validate ¶
func (mt *BluelensUser) Validate() (err error)
Validate validates the BluelensUser media type instance.
type BluelensUserCollection ¶
type BluelensUserCollection []*BluelensUser
BluelensUserCollection is the media type for an array of BluelensUser (default view)
Identifier: application/vnd.bluelens.user+json; type=collection; view=default
func (BluelensUserCollection) Validate ¶
func (mt BluelensUserCollection) Validate() (err error)
Validate validates the BluelensUserCollection media type instance.
type BluelensUserFull ¶
type BluelensUserFull struct { Followees BluelensUserCollection `form:"followees,omitempty" json:"followees,omitempty" xml:"followees,omitempty"` History BluelensMusicCollection `form:"history,omitempty" json:"history,omitempty" xml:"history,omitempty"` Href string `form:"href" json:"href" xml:"href"` ID string `form:"id" json:"id" xml:"id"` }
Media type of a user resource (full view)
Identifier: application/vnd.bluelens.user+json; view=full
func (*BluelensUserFull) Validate ¶
func (mt *BluelensUserFull) Validate() (err error)
Validate validates the BluelensUserFull media type instance.
type BluelensUserFullCollection ¶
type BluelensUserFullCollection []*BluelensUserFull
BluelensUserCollection is the media type for an array of BluelensUser (full view)
Identifier: application/vnd.bluelens.user+json; type=collection; view=full
func (BluelensUserFullCollection) Validate ¶
func (mt BluelensUserFullCollection) Validate() (err error)
Validate validates the BluelensUserFullCollection media type instance.
type BluelensUserLink ¶
type BluelensUserLink struct {
Href string `form:"href" json:"href" xml:"href"`
}
Media type of a user resource (link view)
Identifier: application/vnd.bluelens.user+json; view=link
func (*BluelensUserLink) Validate ¶
func (mt *BluelensUserLink) Validate() (err error)
Validate validates the BluelensUserLink media type instance.
type BluelensUserLinkCollection ¶
type BluelensUserLinkCollection []*BluelensUserLink
BluelensUserCollection is the media type for an array of BluelensUser (link view)
Identifier: application/vnd.bluelens.user+json; type=collection; view=link
func (BluelensUserLinkCollection) Validate ¶
func (mt BluelensUserLinkCollection) Validate() (err error)
Validate validates the BluelensUserLinkCollection media type instance.
type BluelensUserLinks ¶
type BluelensUserLinks struct { Followees BluelensUserLinkCollection `form:"followees,omitempty" json:"followees,omitempty" xml:"followees,omitempty"` History BluelensMusicLinkCollection `form:"history,omitempty" json:"history,omitempty" xml:"history,omitempty"` }
BluelensUserLinks contains links to related resources of BluelensUser.
func (*BluelensUserLinks) Validate ¶
func (ut *BluelensUserLinks) Validate() (err error)
Validate validates the BluelensUserLinks type instance.
type BluelensUserLinksArray ¶
type BluelensUserLinksArray []*BluelensUserLinks
BluelensUserLinksArray contains links to related resources of BluelensUserCollection.
func (BluelensUserLinksArray) Validate ¶
func (ut BluelensUserLinksArray) Validate() (err error)
Validate validates the BluelensUserLinksArray type instance.
type Client ¶
type Client struct { *goaclient.Client APIKeySigner goaclient.Signer BasicAuthSigner goaclient.Signer Encoder *goa.HTTPEncoder Decoder *goa.HTTPDecoder }
Client is the bluelens service client.
func (*Client) CreateMusic ¶
func (c *Client) CreateMusic(ctx context.Context, path string, payload *Music) (*http.Response, error)
CreateMusic makes a request to the create action endpoint of the music resource
func (*Client) CreateUser ¶
func (c *Client) CreateUser(ctx context.Context, path string, payload *User) (*http.Response, error)
CreateUser makes a request to the create action endpoint of the user resource
func (*Client) DecodeBluelensMusic ¶
func (c *Client) DecodeBluelensMusic(resp *http.Response) (*BluelensMusic, error)
DecodeBluelensMusic decodes the BluelensMusic instance encoded in resp body.
func (*Client) DecodeBluelensMusicCollection ¶
func (c *Client) DecodeBluelensMusicCollection(resp *http.Response) (BluelensMusicCollection, error)
DecodeBluelensMusicCollection decodes the BluelensMusicCollection instance encoded in resp body.
func (*Client) DecodeBluelensMusicFull ¶
func (c *Client) DecodeBluelensMusicFull(resp *http.Response) (*BluelensMusicFull, error)
DecodeBluelensMusicFull decodes the BluelensMusicFull instance encoded in resp body.
func (*Client) DecodeBluelensMusicFullCollection ¶
func (c *Client) DecodeBluelensMusicFullCollection(resp *http.Response) (BluelensMusicFullCollection, error)
DecodeBluelensMusicFullCollection decodes the BluelensMusicFullCollection instance encoded in resp body.
func (*Client) DecodeBluelensMusicLink ¶
func (c *Client) DecodeBluelensMusicLink(resp *http.Response) (*BluelensMusicLink, error)
DecodeBluelensMusicLink decodes the BluelensMusicLink instance encoded in resp body.
func (*Client) DecodeBluelensMusicLinkCollection ¶
func (c *Client) DecodeBluelensMusicLinkCollection(resp *http.Response) (BluelensMusicLinkCollection, error)
DecodeBluelensMusicLinkCollection decodes the BluelensMusicLinkCollection instance encoded in resp body.
func (*Client) DecodeBluelensRecommendations ¶
func (c *Client) DecodeBluelensRecommendations(resp *http.Response) (*BluelensRecommendations, error)
DecodeBluelensRecommendations decodes the BluelensRecommendations instance encoded in resp body.
func (*Client) DecodeBluelensRecommendationsAll ¶
func (c *Client) DecodeBluelensRecommendationsAll(resp *http.Response) (*BluelensRecommendationsAll, error)
DecodeBluelensRecommendationsAll decodes the BluelensRecommendationsAll instance encoded in resp body.
func (*Client) DecodeBluelensUser ¶
func (c *Client) DecodeBluelensUser(resp *http.Response) (*BluelensUser, error)
DecodeBluelensUser decodes the BluelensUser instance encoded in resp body.
func (*Client) DecodeBluelensUserCollection ¶
func (c *Client) DecodeBluelensUserCollection(resp *http.Response) (BluelensUserCollection, error)
DecodeBluelensUserCollection decodes the BluelensUserCollection instance encoded in resp body.
func (*Client) DecodeBluelensUserFull ¶
func (c *Client) DecodeBluelensUserFull(resp *http.Response) (*BluelensUserFull, error)
DecodeBluelensUserFull decodes the BluelensUserFull instance encoded in resp body.
func (*Client) DecodeBluelensUserFullCollection ¶
func (c *Client) DecodeBluelensUserFullCollection(resp *http.Response) (BluelensUserFullCollection, error)
DecodeBluelensUserFullCollection decodes the BluelensUserFullCollection instance encoded in resp body.
func (*Client) DecodeBluelensUserLink ¶
func (c *Client) DecodeBluelensUserLink(resp *http.Response) (*BluelensUserLink, error)
DecodeBluelensUserLink decodes the BluelensUserLink instance encoded in resp body.
func (*Client) DecodeBluelensUserLinkCollection ¶
func (c *Client) DecodeBluelensUserLinkCollection(resp *http.Response) (BluelensUserLinkCollection, error)
DecodeBluelensUserLinkCollection decodes the BluelensUserLinkCollection instance encoded in resp body.
func (*Client) DecodeErrorResponse ¶
DecodeErrorResponse decodes the ErrorResponse instance encoded in resp body.
func (*Client) DownloadSwaggerJSON ¶
DownloadSwaggerJSON downloads swagger.json and writes it to the file dest. It returns the number of bytes downloaded in case of success.
func (*Client) DownloadSwaggerYaml ¶
DownloadSwaggerYaml downloads swagger.yaml and writes it to the file dest. It returns the number of bytes downloaded in case of success.
func (*Client) FollowUser ¶
func (c *Client) FollowUser(ctx context.Context, path string, payload *FollowUserPayload) (*http.Response, error)
Update a user's followees list with a new followee.
func (*Client) ListMusic ¶
func (c *Client) ListMusic(ctx context.Context, path string, limit *int, offset *int) (*http.Response, error)
List up to N music resources. N can be adjusted using the 'limit' and 'offset' parameters.
func (*Client) ListUser ¶
func (c *Client) ListUser(ctx context.Context, path string, limit *int, offset *int) (*http.Response, error)
List up to N user resources. N can be adjusted using the 'limit' and 'offset' parameters.
func (*Client) ListenUser ¶
func (c *Client) ListenUser(ctx context.Context, path string, payload *ListenUserPayload) (*http.Response, error)
Add a music to a user's history.
func (*Client) NewCreateMusicRequest ¶
func (c *Client) NewCreateMusicRequest(ctx context.Context, path string, payload *Music) (*http.Request, error)
NewCreateMusicRequest create the request corresponding to the create action endpoint of the music resource.
func (*Client) NewCreateUserRequest ¶
func (c *Client) NewCreateUserRequest(ctx context.Context, path string, payload *User) (*http.Request, error)
NewCreateUserRequest create the request corresponding to the create action endpoint of the user resource.
func (*Client) NewFollowUserRequest ¶
func (c *Client) NewFollowUserRequest(ctx context.Context, path string, payload *FollowUserPayload) (*http.Request, error)
NewFollowUserRequest create the request corresponding to the follow action endpoint of the user resource.
func (*Client) NewListMusicRequest ¶
func (c *Client) NewListMusicRequest(ctx context.Context, path string, limit *int, offset *int) (*http.Request, error)
NewListMusicRequest create the request corresponding to the list action endpoint of the music resource.
func (*Client) NewListUserRequest ¶
func (c *Client) NewListUserRequest(ctx context.Context, path string, limit *int, offset *int) (*http.Request, error)
NewListUserRequest create the request corresponding to the list action endpoint of the user resource.
func (*Client) NewListenUserRequest ¶
func (c *Client) NewListenUserRequest(ctx context.Context, path string, payload *ListenUserPayload) (*http.Request, error)
NewListenUserRequest create the request corresponding to the listen action endpoint of the user resource.
func (*Client) NewRecommendRecommendationsRequest ¶
func (c *Client) NewRecommendRecommendationsRequest(ctx context.Context, path string) (*http.Request, error)
NewRecommendRecommendationsRequest create the request corresponding to the recommend action endpoint of the recommendations resource.
func (*Client) NewShowMusicRequest ¶
NewShowMusicRequest create the request corresponding to the show action endpoint of the music resource.
func (*Client) NewShowUserRequest ¶
NewShowUserRequest create the request corresponding to the show action endpoint of the user resource.
func (*Client) RecommendRecommendations ¶
Make music recommendations for a user.
func (*Client) SetAPIKeySigner ¶
SetAPIKeySigner sets the request signer for the APIKey security scheme.
func (*Client) SetBasicAuthSigner ¶
SetBasicAuthSigner sets the request signer for the BasicAuth security scheme.
type FollowUserPayload ¶
type FollowUserPayload struct { // ID of the followee. FolloweeID *string `form:"followeeID,omitempty" json:"followeeID,omitempty" xml:"followeeID,omitempty"` }
FollowUserPayload is the user follow action payload.
type ListenUserPayload ¶
type ListenUserPayload struct { // ID of the music. MusicID *string `form:"musicID,omitempty" json:"musicID,omitempty" xml:"musicID,omitempty"` }
ListenUserPayload is the user listen action payload.
type Music ¶
type Music struct { ID string `form:"id" json:"id" xml:"id"` Tags []string `form:"tags,omitempty" json:"tags,omitempty" xml:"tags,omitempty"` }
A music resource