Skip to content
Snippets Groups Projects
types.go 1.62 KiB
Newer Older
Christian Pointner's avatar
Christian Pointner committed
//  tank, Import and Playlist Daemon for Aura project
//  Copyright (C) 2017-2020 Christian Pointner <equinox@helsinki.at>
Christian Pointner's avatar
Christian Pointner committed
//  This program is free software: you can redistribute it and/or modify
//  it under the terms of the GNU Affero General Public License as
//  published by the Free Software Foundation, either version 3 of the
//  License, or (at your option) any later version.
Christian Pointner's avatar
Christian Pointner committed
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Christian Pointner's avatar
Christian Pointner committed
//  GNU Affero General Public License for more details.
	"gitlab.servus.at/autoradio/tank/importer"
	"gitlab.servus.at/autoradio/tank/store"
)

var (
	ErrNotFlowJSUpload            = errors.New("this is not a flow.js upload")
	ErrFlowJSChunkAlreadUploading = errors.New("chunk is already uploading or done")
	ErrFileVanished               = errors.New("the file vanished from the store while preparing the import")
type ErrorResponse struct {
	Error  string      `json:"error,omitempty"`
	Detail interface{} `json:"detail,omitempty"`
// Shows
type ShowsListing struct {
	Shows []store.Show `json:"results"`
type JobsListing struct {
	Jobs []*importer.Job `json:"results"`
type FilesListing struct {
	Files []store.File `json:"results"`
type FileCreateRequest struct {
	ShowId    uint64 `json:"showId"`
	SourceURI string `json:"sourceURI" enums:"upload://<filename>,https://<host>/<path>,file:///<path>"`
type FileImportLogs struct {
	Logs store.ImportLogs `json:"results"`
}