mirror of
https://github.com/grafana/grafana.git
synced 2025-07-29 00:52:17 +08:00
178 lines
3.7 KiB
Go
178 lines
3.7 KiB
Go
package definitions
|
|
|
|
import (
|
|
"github.com/grafana/grafana/pkg/api/dtos"
|
|
"github.com/grafana/grafana/pkg/services/playlist"
|
|
)
|
|
|
|
// swagger:route GET /playlists playlists searchPlaylists
|
|
//
|
|
// Get playlists.
|
|
//
|
|
// Responses:
|
|
// 200: searchPlaylistsResponse
|
|
// 500: internalServerError
|
|
|
|
// swagger:route GET /playlists/{uid} playlists getPlaylist
|
|
//
|
|
// Get playlist by UID.
|
|
//
|
|
// Responses:
|
|
// 200: getPlaylistResponse
|
|
// 401: unauthorisedError
|
|
// 403: forbiddenError
|
|
// 404: notFoundError
|
|
// 500: internalServerError
|
|
|
|
// swagger:route GET /playlists/{uid}/items playlists getPlaylistItems
|
|
//
|
|
// Get playlist items.
|
|
//
|
|
// Responses:
|
|
// 200: getPlaylistItemsResponse
|
|
// 401: unauthorisedError
|
|
// 403: forbiddenError
|
|
// 404: notFoundError
|
|
// 500: internalServerError
|
|
|
|
// swagger:route GET /playlists/{uid}/dashboards playlists getPlaylistDashboards
|
|
//
|
|
// Get playlist dashboards.
|
|
//
|
|
// Responses:
|
|
// 200: getPlaylistDashboardsResponse
|
|
// 401: unauthorisedError
|
|
// 403: forbiddenError
|
|
// 404: notFoundError
|
|
// 500: internalServerError
|
|
|
|
// swagger:route DELETE /playlists/{uid} playlists deletePlaylist
|
|
//
|
|
// Delete pllaylist.
|
|
//
|
|
// Responses:
|
|
// 200: okResponse
|
|
// 401: unauthorisedError
|
|
// 403: forbiddenError
|
|
// 404: notFoundError
|
|
// 500: internalServerError
|
|
|
|
// swagger:route PUT /playlists/{uid} playlists updatePlaylist
|
|
//
|
|
// Update playlist.
|
|
//
|
|
// Responses:
|
|
// 200: updatePlaylistResponse
|
|
// 401: unauthorisedError
|
|
// 403: forbiddenError
|
|
// 404: notFoundError
|
|
// 500: internalServerError
|
|
|
|
// swagger:route POST /playlists playlists createPlaylist
|
|
//
|
|
// Create playlist.
|
|
//
|
|
// Responses:
|
|
// 200: createPlaylistResponse
|
|
// 401: unauthorisedError
|
|
// 403: forbiddenError
|
|
// 404: notFoundError
|
|
// 500: internalServerError
|
|
|
|
// swagger:parameters searchPlaylists
|
|
type SearchPlaylistsParams struct {
|
|
// in:query
|
|
// required:false
|
|
Query string `json:"query"`
|
|
// in:limit
|
|
// required:false
|
|
Limit int `json:"limit"`
|
|
}
|
|
|
|
// swagger:parameters getPlaylist
|
|
type GetPlaylistParams struct {
|
|
// in:path
|
|
// required:true
|
|
UID string `json:"uid"`
|
|
}
|
|
|
|
// swagger:parameters getPlaylistItems
|
|
type GetPlaylistItemsParams struct {
|
|
// in:path
|
|
// required:true
|
|
UID string `json:"uid"`
|
|
}
|
|
|
|
// swagger:parameters getPlaylistDashboards
|
|
type GetPlaylistDashboardsParams struct {
|
|
// in:path
|
|
// required:true
|
|
UID string `json:"uid"`
|
|
}
|
|
|
|
// swagger:parameters deletePlaylist
|
|
type DeletePlaylistParams struct {
|
|
// in:path
|
|
// required:true
|
|
UID string `json:"uid"`
|
|
}
|
|
|
|
// swagger:parameters updatePlaylist
|
|
type UpdatePlaylistParams struct {
|
|
// in:body
|
|
// required:true
|
|
Body playlist.UpdatePlaylistCommand
|
|
// in:path
|
|
// required:true
|
|
UID string `json:"uid"`
|
|
}
|
|
|
|
// swagger:parameters createPlaylist
|
|
type CreatePlaylistParams struct {
|
|
// in:body
|
|
// required:true
|
|
Body playlist.CreatePlaylistCommand
|
|
}
|
|
|
|
// swagger:response searchPlaylistsResponse
|
|
type SearchPlaylistsResponse struct {
|
|
// The response message
|
|
// in: body
|
|
Body playlist.Playlists `json:"body"`
|
|
}
|
|
|
|
// swagger:response getPlaylistResponse
|
|
type GetPlaylistResponse struct {
|
|
// The response message
|
|
// in: body
|
|
Body *playlist.PlaylistDTO `json:"body"`
|
|
}
|
|
|
|
// swagger:response getPlaylistItemsResponse
|
|
type GetPlaylistItemsResponse struct {
|
|
// The response message
|
|
// in: body
|
|
Body []playlist.PlaylistItemDTO `json:"body"`
|
|
}
|
|
|
|
// swagger:response getPlaylistDashboardsResponse
|
|
type GetPlaylistDashboardsResponse struct {
|
|
// The response message
|
|
// in: body
|
|
Body dtos.PlaylistDashboardsSlice `json:"body"`
|
|
}
|
|
|
|
// swagger:response updatePlaylistResponse
|
|
type UpdatePlaylistResponseResponse struct {
|
|
// The response message
|
|
// in: body
|
|
Body *playlist.PlaylistDTO `json:"body"`
|
|
}
|
|
|
|
// swagger:response createPlaylistResponse
|
|
type CreatePlaylistResponse struct {
|
|
// The response message
|
|
// in: body
|
|
Body *playlist.Playlist `json:"body"`
|
|
}
|