Documentation ¶
Index ¶
- Variables
- func PlaylistToResource(p PlaylistDTO) playlist.K8sResource
- type CreatePlaylistCommand
- type DeletePlaylistCommand
- type GetPlaylistByUidQuery
- type GetPlaylistItemsByUidQuery
- type GetPlaylistsQuery
- type Playlist
- type PlaylistDTO
- type PlaylistItem
- type PlaylistItemDTO
- type PlaylistItemType
- type Playlists
- type Service
- type UpdatePlaylistCommand
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrPlaylistNotFound = errors.New("Playlist not found") ErrPlaylistFailedGenerateUniqueUid = errors.New("failed to generate unique playlist UID") ErrCommandValidationFailed = errors.New("command missing required fields") )
Typed errors
Functions ¶
func PlaylistToResource ¶
func PlaylistToResource(p PlaylistDTO) playlist.K8sResource
Types ¶
type CreatePlaylistCommand ¶
type CreatePlaylistCommand struct { Name string `json:"name" binding:"Required"` Interval string `json:"interval"` Items []PlaylistItem `json:"items"` OrgId int64 `json:"-"` }
type DeletePlaylistCommand ¶
type GetPlaylistByUidQuery ¶
type GetPlaylistsQuery ¶
type Playlist ¶
type Playlist struct { Id int64 `json:"id,omitempty" db:"id"` UID string `json:"uid" xorm:"uid" db:"uid"` Name string `json:"name" db:"name"` Interval string `json:"interval" db:"interval"` OrgId int64 `json:"-" db:"org_id"` }
Playlist model
type PlaylistDTO ¶
type PlaylistItem ¶
type PlaylistItemDTO ¶
type PlaylistItemType ¶
type Service ¶
type Service interface { Create(context.Context, *CreatePlaylistCommand) (*Playlist, error) Update(context.Context, *UpdatePlaylistCommand) (*PlaylistDTO, error) GetWithoutItems(context.Context, *GetPlaylistByUidQuery) (*Playlist, error) Get(context.Context, *GetPlaylistByUidQuery) (*PlaylistDTO, error) Search(context.Context, *GetPlaylistsQuery) (Playlists, error) Delete(ctx context.Context, cmd *DeletePlaylistCommand) error }
type UpdatePlaylistCommand ¶
type UpdatePlaylistCommand struct { OrgId int64 `json:"-"` UID string `json:"uid"` Name string `json:"name" binding:"Required"` Interval string `json:"interval"` Items []PlaylistItem `json:"items"` }
Click to show internal directories.
Click to hide internal directories.