Documentation ¶
Index ¶
- Constants
- Variables
- func AuthorsHandler(c *gin.Context)
- func CaptureStartHandler(c *gin.Context)
- func CaptureStopHandler(c *gin.Context)
- func CollectionActivateHandler(c *gin.Context)
- func CollectionContentUnitsHandler(c *gin.Context)
- func CollectionHandler(c *gin.Context)
- func CollectionI18nHandler(c *gin.Context)
- func CollectionsListHandler(c *gin.Context)
- func ContentUnitCollectionsHandler(c *gin.Context)
- func ContentUnitDerivativesHandler(c *gin.Context)
- func ContentUnitFilesHandler(c *gin.Context)
- func ContentUnitHandler(c *gin.Context)
- func ContentUnitI18nHandler(c *gin.Context)
- func ContentUnitOriginsHandler(c *gin.Context)
- func ContentUnitPersonsHandler(c *gin.Context)
- func ContentUnitPublishersHandler(c *gin.Context)
- func ContentUnitSourcesHandler(c *gin.Context)
- func ContentUnitTagsHandler(c *gin.Context)
- func ContentUnitsListHandler(c *gin.Context)
- func ConvertHandler(c *gin.Context)
- func CreateCollection(exec boil.Executor, contentType string, properties map[string]interface{}) (*models.Collection, error)
- func CreateContentUnit(exec boil.Executor, contentType string, properties map[string]interface{}) (*models.ContentUnit, error)
- func CreateFile(exec boil.Executor, parent *models.File, f File, ...) (*models.File, error)
- func CreateOperation(exec boil.Executor, name string, o Operation, ...) (*models.Operation, error)
- func DemuxHandler(c *gin.Context)
- func DescribeCollection(exec boil.Executor, c *models.Collection) error
- func DescribeContentUnit(exec boil.Executor, cu *models.ContentUnit, metadata CITMetadata) error
- func FileHandler(c *gin.Context)
- func FileStoragesHandler(c *gin.Context)
- func FilesListHandler(c *gin.Context)
- func FilesWithOperationsTreeHandler(c *gin.Context)
- func FindAuthorBySourceID(exec boil.Executor, id int64) (*models.Author, error)
- func FindCollectionByCaptureID(exec boil.Executor, cid interface{}) (*models.Collection, error)
- func FindFileAncestors(exec boil.Executor, id int64) ([]*models.File, error)
- func FindFileBySHA1(exec boil.Executor, sha1 string) (*models.File, []byte, error)
- func FindSourceByUID(exec boil.Executor, uid string) (*models.Source, error)
- func FindSourcePath(exec boil.Executor, id int64) ([]*models.Source, error)
- func FindTagByUID(exec boil.Executor, uid string) (*models.Tag, error)
- func FindTagPath(exec boil.Executor, id int64) ([]*models.Tag, error)
- func FindUpChainOperation(exec boil.Executor, fileID int64, opType string) (*models.Operation, error)
- func GetFreeUID(exec boil.Executor, checker UIDChecker) (uid string, err error)
- func GetI18ns(key string) (map[string]string, error)
- func GetNextPositionInCollection(exec boil.Executor, id int64) (position int, err error)
- func InitTypeRegistries(exec boil.Executor) error
- func InsertHandler(c *gin.Context)
- func OperationFilesHandler(c *gin.Context)
- func OperationItemHandler(c *gin.Context)
- func OperationsListHandler(c *gin.Context)
- func PersonHandler(c *gin.Context)
- func PersonI18nHandler(c *gin.Context)
- func PersonsListHandler(c *gin.Context)
- func ProcessCITMetadata(exec boil.Executor, metadata CITMetadata, original, proxy *models.File) ([]events.Event, error)
- func PublisherHandler(c *gin.Context)
- func PublisherI18nHandler(c *gin.Context)
- func PublishersHandler(c *gin.Context)
- func SendHandler(c *gin.Context)
- func SetupRoutes(router *gin.Engine)
- func SirtutimHandler(c *gin.Context)
- func SourceHandler(c *gin.Context)
- func SourceI18nHandler(c *gin.Context)
- func SourcesHandler(c *gin.Context)
- func SourcesHierarchyHandler(c *gin.Context)
- func StdLang(lang string) string
- func StoragesHandler(c *gin.Context)
- func T(key, language string) (string, error)
- func TagHandler(c *gin.Context)
- func TagI18nHandler(c *gin.Context)
- func TagsHandler(c *gin.Context)
- func TagsHierarchyHandler(c *gin.Context)
- func TranscodeHandler(c *gin.Context)
- func TrimHandler(c *gin.Context)
- func UpdateCollectionProperties(exec boil.Executor, collection *models.Collection, ...) error
- func UpdateContentUnitProperties(exec boil.Executor, unit *models.ContentUnit, props map[string]interface{}) error
- func UpdateFile(exec boil.Executor, obj *models.File, parent *models.File, f File, ...) error
- func UpdateFileProperties(exec boil.Executor, file *models.File, props map[string]interface{}) error
- func UploadHandler(c *gin.Context)
- type AVFile
- type Author
- type AuthorH
- type AuthorRegistry
- type AuthorsResponse
- type CITMetadata
- type CITMetadataMajor
- type CaptureStartRequest
- type CaptureStopRequest
- type Collection
- type CollectionContentUnit
- type CollectionDescriber
- type CollectionNotFound
- type CollectionUIDChecker
- type CollectionsRequest
- type CollectionsResponse
- type ContentRoleTypeRegistry
- type ContentTypeRegistry
- type ContentTypesFilter
- type ContentUnit
- type ContentUnitDerivation
- type ContentUnitDescriber
- type ContentUnitPerson
- type ContentUnitUIDChecker
- type ContentUnitsRequest
- type ContentUnitsResponse
- type ConvertRequest
- type CreateSourceRequest
- type Date
- type DateRangeFilter
- type DemuxRequest
- type EventPartDescriber
- type File
- type FileNotFound
- type FilePublishedChangeImpact
- type FileUIDChecker
- type FilesRequest
- type FilesResponse
- type GenericDescriber
- type HierarchyRequest
- type HttpError
- type IDsFilter
- type InsertRequest
- type LessonPartDescriber
- type LettersNamer
- type ListRequest
- type ListResponse
- type MFile
- type MaybeFile
- type MealDescriber
- type MediaType
- type MediaTypeRegistry
- type MissingI18n
- type Operation
- type OperationHandler
- type OperationTypeRegistry
- type OperationTypesFilter
- type OperationUIDChecker
- type OperationsRequest
- type OperationsResponse
- type PartialCollection
- type PartialContentUnit
- type PartialFile
- type PatternsFilter
- type Person
- type PersonRegistry
- type PersonUIDChecker
- type PersonsRequest
- type PersonsResponse
- type PlainNamer
- type PrefaceNamer
- type PublishedFilter
- type Publisher
- type PublisherUIDChecker
- type PublishersRequest
- type PublishersResponse
- type RBArticlesNamer
- type RBRecordsNamer
- type Rename
- type SHA1sFilter
- type SearchTermFilter
- type SecureFilter
- type SendRequest
- type ShamatiNamer
- type SirtutimRequest
- type Source
- type SourceH
- type SourceTypeRegistry
- type SourceUIDChecker
- type SourcesFilter
- type SourcesHierarchyRequest
- type SourcesRequest
- type SourcesResponse
- type Storage
- type StoragesRequest
- type StoragesResponse
- type Tag
- type TagH
- type TagUIDChecker
- type TagsFilter
- type TagsHierarchyRequest
- type TagsRequest
- type TagsResponse
- type Timestamp
- type TranscodeRequest
- type TrimRequest
- type TypeRegistry
- type UIDChecker
- type UIDsFilter
- type UpChainOperationNotFound
- type UploadRequest
- type VideoProgramChapterDescriber
- type ZoharNamer
Constants ¶
const ( // Collection Types CT_DAILY_LESSON = "DAILY_LESSON" CT_SPECIAL_LESSON = "SPECIAL_LESSON" CT_FRIENDS_GATHERINGS = "FRIENDS_GATHERINGS" CT_CONGRESS = "CONGRESS" CT_VIDEO_PROGRAM = "VIDEO_PROGRAM" CT_LECTURE_SERIES = "LECTURE_SERIES" CT_VIRTUAL_LESSONS = "VIRTUAL_LESSONS" CT_CHILDREN_LESSONS = "CHILDREN_LESSONS" CT_WOMEN_LESSONS = "WOMEN_LESSONS" CT_MEALS = "MEALS" CT_HOLIDAY = "HOLIDAY" CT_PICNIC = "PICNIC" CT_UNITY_DAY = "UNITY_DAY" CT_CLIPS = "CLIPS" CT_ARTICLES = "ARTICLES" // Content Unit Types CT_LESSON_PART = "LESSON_PART" CT_LECTURE = "LECTURE" CT_VIRTUAL_LESSON = "VIRTUAL_LESSON" CT_CHILDREN_LESSON = "CHILDREN_LESSON" CT_WOMEN_LESSON = "WOMEN_LESSON" CT_FRIENDS_GATHERING = "FRIENDS_GATHERING" CT_MEAL = "MEAL" CT_VIDEO_PROGRAM_CHAPTER = "VIDEO_PROGRAM_CHAPTER" CT_FULL_LESSON = "FULL_LESSON" CT_ARTICLE = "ARTICLE" CT_EVENT_PART = "EVENT_PART" CT_UNKNOWN = "UNKNOWN" CT_CLIP = "CLIP" CT_TRAINING = "TRAINING" CT_KITEI_MAKOR = "KITEI_MAKOR" CT_PUBLICATION = "PUBLICATION" // Operation Types OP_CAPTURE_START = "capture_start" OP_CAPTURE_STOP = "capture_stop" OP_DEMUX = "demux" OP_TRIM = "trim" OP_SEND = "send" OP_CONVERT = "convert" OP_UPLOAD = "upload" OP_IMPORT_KMEDIA = "import_kmedia" OP_SIRTUTIM = "sirtutim" OP_INSERT = "insert" OP_TRANSCODE = "transcode" // Source Types SRC_COLLECTION = "COLLECTION" SRC_BOOK = "BOOK" SRC_VOLUME = "VOLUME" SRC_PART = "PART" SRC_PARASHA = "PARASHA" SRC_CHAPTER = "CHAPTER" SRC_ARTICLE = "ARTICLE" SRC_TITLE = "TITLE" SRC_LETTER = "LETTER" SRC_ITEM = "ITEM" // Content Role types CR_LECTURER = "LECTURER" // Persons patterns P_RAV = "rav" // Security levels SEC_PUBLIC = int16(0) SEC_SENSITIVE = int16(1) SEC_PRIVATE = int16(2) // Languages LANG_ENGLISH = "en" LANG_HEBREW = "he" LANG_RUSSIAN = "ru" LANG_SPANISH = "es" LANG_ITALIAN = "it" LANG_GERMAN = "de" LANG_DUTCH = "nl" LANG_FRENCH = "fr" LANG_PORTUGUESE = "pt" LANG_TURKISH = "tr" LANG_POLISH = "pl" LANG_ARABIC = "ar" LANG_HUNGARIAN = "hu" LANG_FINNISH = "fi" LANG_LITHUANIAN = "lt" LANG_JAPANESE = "ja" LANG_BULGARIAN = "bg" LANG_GEORGIAN = "ka" LANG_NORWEGIAN = "no" LANG_SWEDISH = "sv" LANG_CROATIAN = "hr" LANG_CHINESE = "zh" LANG_PERSIAN = "fa" LANG_ROMANIAN = "ro" LANG_HINDI = "hi" LANG_UKRAINIAN = "ua" LANG_MACEDONIAN = "mk" LANG_SLOVENIAN = "sl" LANG_LATVIAN = "lv" LANG_SLOVAK = "sk" LANG_CZECH = "cs" LANG_MULTI = "zz" LANG_UNKNOWN = "xx" )
const ( DEFAULT_PAGE_SIZE = 50 MAX_PAGE_SIZE = 1000 SEARCH_IN_FILES = 1 SEARCH_IN_CONTENT_UNITS = 2 SEARCH_IN_COLLECTIONS = 3 )
const AUTHORS_SOURCES_SQL = `` /* 514-byte string literal not displayed */
const FILES_TREE_WITH_OPERATIONS = `` /* 751-byte string literal not displayed */
const FILE_ANCESTORS_SQL = `` /* 181-byte string literal not displayed */
const SOURCE_HIERARCHY_SQL = `` /* 1182-byte string literal not displayed */
args: 0,1,3,4 language 2 roots clause, "parent_id is NULL", "id = 8392", etc... 5 depth (int)
const SOURCE_PATH_SQL = `` /* 169-byte string literal not displayed */
const TAG_HIERARCHY_SQL = `` /* 684-byte string literal not displayed */
args: 0,2 language 1 roots clause, "parent_id is NULL", "id = 8392", etc... 3 depth (int)
const TAG_PATH_SQL = `` /* 163-byte string literal not displayed */
const UPCHAIN_OPERATION_SQL = `` /* 592-byte string literal not displayed */
Variables ¶
var ( CONTENT_TYPE_REGISTRY = &ContentTypeRegistry{} OPERATION_TYPE_REGISTRY = &OperationTypeRegistry{} CONTENT_ROLE_TYPE_REGISTRY = &ContentRoleTypeRegistry{} PERSON_REGISTRY = &PersonRegistry{} AUTHOR_REGISTRY = &AuthorRegistry{} SOURCE_TYPE_REGISTRY = &SourceTypeRegistry{} MEDIA_TYPE_REGISTRY = &MediaTypeRegistry{} ALL_LANGS = []string{ LANG_UNKNOWN, LANG_MULTI, LANG_ENGLISH, LANG_HEBREW, LANG_RUSSIAN, LANG_SPANISH, LANG_ITALIAN, LANG_GERMAN, LANG_DUTCH, LANG_FRENCH, LANG_PORTUGUESE, LANG_TURKISH, LANG_POLISH, LANG_ARABIC, LANG_HUNGARIAN, LANG_FINNISH, LANG_LITHUANIAN, LANG_JAPANESE, LANG_BULGARIAN, LANG_GEORGIAN, LANG_NORWEGIAN, LANG_SWEDISH, LANG_CROATIAN, LANG_CHINESE, LANG_PERSIAN, LANG_ROMANIAN, LANG_HINDI, LANG_MACEDONIAN, LANG_SLOVENIAN, LANG_LATVIAN, LANG_SLOVAK, LANG_CZECH, LANG_UKRAINIAN, } KNOWN_LANGS = regexp.MustCompile(strings.Join(ALL_LANGS, "|")) // kmedia - select concat('"',code3,'": "',locale,'",') from languages; LANG_MAP = map[string]string{ "": LANG_UNKNOWN, "MLT": LANG_MULTI, "ENG": LANG_ENGLISH, "HEB": LANG_HEBREW, "RUS": LANG_RUSSIAN, "SPA": LANG_SPANISH, "ITA": LANG_ITALIAN, "GER": LANG_GERMAN, "DUT": LANG_DUTCH, "FRE": LANG_FRENCH, "POR": LANG_PORTUGUESE, "TRK": LANG_TURKISH, "POL": LANG_POLISH, "ARB": LANG_ARABIC, "HUN": LANG_HUNGARIAN, "FIN": LANG_FINNISH, "LIT": LANG_LITHUANIAN, "JPN": LANG_JAPANESE, "BUL": LANG_BULGARIAN, "GEO": LANG_GEORGIAN, "NOR": LANG_NORWEGIAN, "SWE": LANG_SWEDISH, "HRV": LANG_CROATIAN, "CHN": LANG_CHINESE, "FAR": LANG_PERSIAN, "RON": LANG_ROMANIAN, "HIN": LANG_HINDI, "MKD": LANG_MACEDONIAN, "SLV": LANG_SLOVENIAN, "LAV": LANG_LATVIAN, "SLK": LANG_SLOVAK, "CZE": LANG_CZECH, "UKR": LANG_UKRAINIAN, } ALL_CONTENT_TYPES = []string{ CT_DAILY_LESSON, CT_SPECIAL_LESSON, CT_FRIENDS_GATHERINGS, CT_CONGRESS, CT_VIDEO_PROGRAM, CT_LECTURE_SERIES, CT_VIRTUAL_LESSONS, CT_CHILDREN_LESSONS, CT_WOMEN_LESSONS, CT_MEALS, CT_HOLIDAY, CT_PICNIC, CT_UNITY_DAY, CT_CLIPS, CT_ARTICLES, CT_LESSON_PART, CT_LECTURE, CT_CHILDREN_LESSON, CT_WOMEN_LESSON, CT_VIRTUAL_LESSON, CT_FRIENDS_GATHERING, CT_MEAL, CT_VIDEO_PROGRAM_CHAPTER, CT_FULL_LESSON, CT_ARTICLE, CT_EVENT_PART, CT_UNKNOWN, CT_CLIP, CT_TRAINING, CT_KITEI_MAKOR, CT_PUBLICATION, } ALL_OPERATION_TYPES = []string{ OP_CAPTURE_START, OP_CAPTURE_STOP, OP_DEMUX, OP_TRIM, OP_SEND, OP_CONVERT, OP_UPLOAD, OP_IMPORT_KMEDIA, OP_SIRTUTIM, OP_INSERT, OP_TRANSCODE, } // Types of various, secondary, content slots in big events like congress, unity day, etc... // This list is not part of content_types to prevent explosion of that list. // This came to life for mdb-cit UI only Ease of Use. (prevent typing errors and keep consistency) // We keep it here so CCU's would have some information. // This list should be kept in sync with mdb-cit (consts.js) MISC_EVENT_PART_TYPES = [8]string{ "TEKES_PTIHA", "TEKES_SIYUM", "EREV_PATUAH", "EREV_TARBUT", "ATZAGAT_PROEKT", "HAANAKAT_TEUDOT", "HATIMAT_SFARIM", "EVENT", } // kmedia - select asset_type, count(*) from file_assets group by asset_type order by count(*) desc; ALL_MEDIA_TYPES = []*MediaType{ {Extension: "mp4", Type: "video", SubType: "", MimeType: "video/mp4"}, {Extension: "wmv", Type: "video", SubType: "", MimeType: "video/x-ms-wmv"}, {Extension: "flv", Type: "video", SubType: "", MimeType: "video/x-flv"}, {Extension: "mov", Type: "video", SubType: "", MimeType: "video/quicktime"}, {Extension: "asf", Type: "video", SubType: "", MimeType: "video/x-ms-asf"}, {Extension: "mpg", Type: "video", SubType: "", MimeType: "video/mpeg"}, {Extension: "avi", Type: "video", SubType: "", MimeType: "video/x-msvideo"}, {Extension: "mp3", Type: "audio", SubType: "", MimeType: "audio/mpeg"}, {Extension: "wma", Type: "audio", SubType: "", MimeType: "audio/x-ms-wma"}, {Extension: "mid", Type: "audio", SubType: "", MimeType: "audio/midi"}, {Extension: "wav", Type: "audio", SubType: "", MimeType: "audio/x-wav"}, {Extension: "aac", Type: "audio", SubType: "", MimeType: "audio/aac"}, {Extension: "jpg", Type: "image", SubType: "", MimeType: "image/jpeg"}, {Extension: "png", Type: "image", SubType: "", MimeType: "image/png"}, {Extension: "gif", Type: "image", SubType: "", MimeType: "image/gif"}, {Extension: "bmp", Type: "image", SubType: "", MimeType: "image/bmp"}, {Extension: "tif", Type: "image", SubType: "", MimeType: "image/tiff"}, {Extension: "zip", Type: "image", SubType: "", MimeType: "application/zip"}, {Extension: "7z", Type: "image", SubType: "", MimeType: "application/x-7z-compressed"}, {Extension: "rar", Type: "image", SubType: "", MimeType: "application/x-rar-compressed"}, {Extension: "sfk", Type: "image", SubType: "", MimeType: ""}, {Extension: "doc", Type: "text", SubType: "", MimeType: "application/msword"}, {Extension: "docx", Type: "text", SubType: "", MimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document"}, {Extension: "htm", Type: "text", SubType: "", MimeType: "text/html"}, {Extension: "html", Type: "text", SubType: "", MimeType: "text/html"}, {Extension: "pdf", Type: "text", SubType: "", MimeType: "application/pdf"}, {Extension: "epub", Type: "text", SubType: "", MimeType: "application/epub+zip"}, {Extension: "rtf", Type: "text", SubType: "", MimeType: "text/rtf"}, {Extension: "txt", Type: "text", SubType: "", MimeType: "text/plain"}, {Extension: "fb2", Type: "text", SubType: "", MimeType: "text/xml"}, {Extension: "rb", Type: "text", SubType: "", MimeType: "application/x-rocketbook"}, {Extension: "xls", Type: "sheet", SubType: "", MimeType: "application/vnd.ms-excel"}, {Extension: "swf", Type: "banner", SubType: "", MimeType: "application/x-shockwave-flash"}, {Extension: "ppt", Type: "presentation", SubType: "", MimeType: "application/vnd.ms-powerpoint"}, {Extension: "pptx", Type: "presentation", SubType: "", MimeType: "application/vnd.openxmlformats-officedocument.presentationml.presentation"}, {Extension: "pps", Type: "presentation", SubType: "", MimeType: "application/vnd.ms-powerpoint"}, } )
var CDescribers = map[string]CollectionDescriber{}
var CUDescribers = map[string]ContentUnitDescriber{ CT_LESSON_PART: new(LessonPartDescriber), CT_VIDEO_PROGRAM_CHAPTER: new(VideoProgramChapterDescriber), CT_MEAL: new(MealDescriber), }
var I18n map[string]map[string]string
var TAGS_WITH_CONST_NAMES = [...]string{"lfq8P1du", "iWPWpSNy"}
Functions ¶
func AuthorsHandler ¶
func AuthorsHandler(c *gin.Context)
func CaptureStartHandler ¶
func CaptureStartHandler(c *gin.Context)
Start capture of AV file, i.e. morning lesson, tv program, etc...
func CaptureStopHandler ¶
func CaptureStopHandler(c *gin.Context)
Stop capture of AV file, ending a matching capture_start event. This is the first time a physical file is created in the studio.
func CollectionActivateHandler ¶
func CollectionActivateHandler(c *gin.Context)
Toggle the active flag of a single container
func CollectionContentUnitsHandler ¶
func CollectionContentUnitsHandler(c *gin.Context)
func CollectionHandler ¶
func CollectionHandler(c *gin.Context)
func CollectionI18nHandler ¶
func CollectionI18nHandler(c *gin.Context)
func CollectionsListHandler ¶
func CollectionsListHandler(c *gin.Context)
func ContentUnitCollectionsHandler ¶
func ContentUnitCollectionsHandler(c *gin.Context)
func ContentUnitDerivativesHandler ¶
func ContentUnitDerivativesHandler(c *gin.Context)
func ContentUnitFilesHandler ¶
func ContentUnitFilesHandler(c *gin.Context)
func ContentUnitHandler ¶
func ContentUnitHandler(c *gin.Context)
func ContentUnitI18nHandler ¶
func ContentUnitI18nHandler(c *gin.Context)
func ContentUnitOriginsHandler ¶
func ContentUnitOriginsHandler(c *gin.Context)
func ContentUnitPersonsHandler ¶
func ContentUnitPersonsHandler(c *gin.Context)
func ContentUnitPublishersHandler ¶ added in v0.9.2
func ContentUnitPublishersHandler(c *gin.Context)
func ContentUnitSourcesHandler ¶
func ContentUnitSourcesHandler(c *gin.Context)
func ContentUnitTagsHandler ¶
func ContentUnitTagsHandler(c *gin.Context)
func ContentUnitsListHandler ¶
func ContentUnitsListHandler(c *gin.Context)
func ConvertHandler ¶
func ConvertHandler(c *gin.Context)
Files converted to low resolution web formats, language splitting, etc...
func CreateCollection ¶
func CreateContentUnit ¶
func CreateFile ¶
func CreateOperation ¶
func DemuxHandler ¶
func DemuxHandler(c *gin.Context)
Demux manifest file to original and low resolution proxy
func DescribeCollection ¶
func DescribeCollection(exec boil.Executor, c *models.Collection) error
func DescribeContentUnit ¶
func DescribeContentUnit(exec boil.Executor, cu *models.ContentUnit, metadata CITMetadata) error
func FileHandler ¶
func FileHandler(c *gin.Context)
func FileStoragesHandler ¶
func FileStoragesHandler(c *gin.Context)
func FilesListHandler ¶
func FilesListHandler(c *gin.Context)
func FilesWithOperationsTreeHandler ¶
func FilesWithOperationsTreeHandler(c *gin.Context)
func FindAuthorBySourceID ¶
func FindCollectionByCaptureID ¶
func FindCollectionByCaptureID(exec boil.Executor, cid interface{}) (*models.Collection, error)
func FindFileAncestors ¶
func FindFileBySHA1 ¶
func FindUpChainOperation ¶
func GetFreeUID ¶
func GetFreeUID(exec boil.Executor, checker UIDChecker) (uid string, err error)
func InitTypeRegistries ¶
func OperationFilesHandler ¶
func OperationFilesHandler(c *gin.Context)
func OperationItemHandler ¶
func OperationItemHandler(c *gin.Context)
func OperationsListHandler ¶
func OperationsListHandler(c *gin.Context)
func PersonHandler ¶
func PersonHandler(c *gin.Context)
func PersonI18nHandler ¶
func PersonI18nHandler(c *gin.Context)
func PersonsListHandler ¶
func PersonsListHandler(c *gin.Context)
func ProcessCITMetadata ¶
func ProcessCITMetadata(exec boil.Executor, metadata CITMetadata, original, proxy *models.File) ([]events.Event, error)
Do all stuff for processing metadata coming from Content Identification Tool.
- Update properties for original and proxy (film_date, capture_date)
- Update language of original
- Create content_unit (content_type, dates)
- Describe content unit (i18ns)
- Add files to new unit
- Add ancestor files to unit
- Associate unit with sources, tags, and persons
- Get or create collection
- Update collection (content_type, dates, number) if full lesson or new lesson
- Associate collection and unit
- Associate unit and derived units
- Set default permissions ?!
func PublisherHandler ¶ added in v0.9.2
func PublisherHandler(c *gin.Context)
func PublisherI18nHandler ¶ added in v0.9.2
func PublisherI18nHandler(c *gin.Context)
func PublishersHandler ¶
func PublishersHandler(c *gin.Context)
func SetupRoutes ¶
func SetupRoutes(router *gin.Engine)
func SourceHandler ¶
func SourceHandler(c *gin.Context)
func SourceI18nHandler ¶
func SourceI18nHandler(c *gin.Context)
func SourcesHandler ¶
func SourcesHandler(c *gin.Context)
func SourcesHierarchyHandler ¶
func SourcesHierarchyHandler(c *gin.Context)
func StdLang ¶
Return standard language or LANG_UNKNOWN
if len(lang) = 2 we assume it's an MDB language code and check KNOWN_LANGS. if len(lang) = 3 we assume it's a workflow / kmedia lang code and check LANG_MAP.
func StoragesHandler ¶
func StoragesHandler(c *gin.Context)
func TagHandler ¶
func TagHandler(c *gin.Context)
func TagI18nHandler ¶
func TagI18nHandler(c *gin.Context)
func TagsHandler ¶
func TagsHandler(c *gin.Context)
func TagsHierarchyHandler ¶
func TagsHierarchyHandler(c *gin.Context)
func UpdateFile ¶
func UpdateFileProperties ¶
Types ¶
type AuthorRegistry ¶
type AuthorsResponse ¶
type AuthorsResponse struct { ListResponse Authors []*Author `json:"data"` }
type CITMetadata ¶
type CITMetadata struct { ContentType string `json:"content_type" binding:"required"` CaptureDate Date `json:"capture_date" binding:"required"` FinalName string `json:"final_name" binding:"required,max=255"` Language string `json:"language" binding:"required,min=2,max=3"` Lecturer string `json:"lecturer" binding:"required"` AutoName string `json:"auto_name"` ManualName string `json:"manual_name"` WeekDate *Date `json:"week_date"` Number null.Int `json:"number"` Part null.Int `json:"part"` Sources []string `json:"sources" binding:"omitempty,dive,len=8"` Tags []string `json:"tags" binding:"omitempty,dive,len=8"` ArtifactType null.String `json:"artifact_type"` HasTranslation bool `json:"has_translation"` RequireTest bool `json:"require_test"` CollectionUID null.String `json:"collection_uid" binding:"omitempty,len=8"` Episode null.String `json:"episode"` PartType null.Int `json:"part_type"` Major *CITMetadataMajor `json:"major" binding:"omitempty"` LabelID null.String `json:"label_id"` FilmDate *Date `json:"film_date"` }
type CITMetadataMajor ¶
type CaptureStartRequest ¶
type CaptureStopRequest ¶
type Collection ¶
type Collection struct { models.Collection I18n map[string]*models.CollectionI18n `json:"i18n"` }
type CollectionContentUnit ¶
type CollectionContentUnit struct { Collection *Collection `json:"collection,omitempty"` ContentUnit *ContentUnit `json:"content_unit,omitempty"` Name string `json:"name"` Position int `json:"position"` }
type CollectionDescriber ¶
type CollectionDescriber interface {
DescribeCollection(*models.Collection) ([]*models.CollectionI18n, error)
}
type CollectionNotFound ¶
type CollectionNotFound struct {
CaptureID interface{}
}
func (CollectionNotFound) Error ¶
func (x CollectionNotFound) Error() string
type CollectionUIDChecker ¶
type CollectionUIDChecker struct{}
type CollectionsRequest ¶
type CollectionsRequest struct { ListRequest IDsFilter UIDsFilter ContentTypesFilter DateRangeFilter SecureFilter PublishedFilter SearchTermFilter }
type CollectionsResponse ¶
type CollectionsResponse struct { ListResponse Collections []*Collection `json:"data"` }
func NewCollectionsResponse ¶
func NewCollectionsResponse() *CollectionsResponse
type ContentRoleTypeRegistry ¶
type ContentRoleTypeRegistry struct {
ByName map[string]*models.ContentRoleType
}
type ContentTypeRegistry ¶
type ContentTypeRegistry struct { ByName map[string]*models.ContentType ByID map[int64]*models.ContentType }
type ContentTypesFilter ¶
type ContentTypesFilter struct {
ContentTypes []string `json:"content_types" form:"content_type" binding:"omitempty"`
}
type ContentUnit ¶
type ContentUnit struct { models.ContentUnit I18n map[string]*models.ContentUnitI18n `json:"i18n"` }
type ContentUnitDerivation ¶
type ContentUnitDerivation struct { Source *ContentUnit `json:"source,omitempty"` Derived *ContentUnit `json:"derived,omitempty"` Name string `json:"name"` }
type ContentUnitDescriber ¶
type ContentUnitDescriber interface {
DescribeContentUnit(boil.Executor, *models.ContentUnit, CITMetadata) ([]*models.ContentUnitI18n, error)
}
func GetCUDescriber ¶
func GetCUDescriber(exec boil.Executor, cu *models.ContentUnit, metadata CITMetadata) (ContentUnitDescriber, error)
type ContentUnitPerson ¶
type ContentUnitPerson struct { ContentUnit *ContentUnit `json:"content_unit,omitempty"` Person *Person `json:"person,omitempty"` RoleID int64 `json:"role_id,omitempty"` }
type ContentUnitUIDChecker ¶
type ContentUnitUIDChecker struct{}
type ContentUnitsRequest ¶
type ContentUnitsRequest struct { ListRequest IDsFilter UIDsFilter ContentTypesFilter DateRangeFilter SecureFilter PublishedFilter SourcesFilter TagsFilter SearchTermFilter }
type ContentUnitsResponse ¶
type ContentUnitsResponse struct { ListResponse ContentUnits []*ContentUnit `json:"data"` }
func NewContentUnitsResponse ¶
func NewContentUnitsResponse() *ContentUnitsResponse
type ConvertRequest ¶
type CreateSourceRequest ¶
type CreateSourceRequest struct { Source AuthorID null.Int64 `json:"author"` }
type Date ¶
A time.Time like structure with date part only JSON marshalling
func (Date) MarshalJSON ¶
func (*Date) UnmarshalJSON ¶
type DateRangeFilter ¶
type DemuxRequest ¶
type EventPartDescriber ¶
type EventPartDescriber struct{}
func (EventPartDescriber) DescribeContentUnit ¶
func (d EventPartDescriber) DescribeContentUnit(exec boil.Executor, cu *models.ContentUnit, metadata CITMetadata) ([]*models.ContentUnitI18n, error)
type File ¶
type File struct { FileName string `json:"file_name" binding:"required,max=255"` Sha1 string `json:"sha1" binding:"required,len=40,hexadecimal"` Size int64 `json:"size" binding:"required"` CreatedAt *Timestamp `json:"created_at" binding:"required"` Type string `json:"type" binding:"max=16"` SubType string `json:"sub_type" binding:"max=16"` MimeType string `json:"mime_type" binding:"max=255"` Language string `json:"language" binding:"omitempty,min=2,max=3"` }
type FileNotFound ¶
type FileNotFound struct {
Sha1 string
}
func (FileNotFound) Error ¶
func (x FileNotFound) Error() string
type FilePublishedChangeImpact ¶
type FilePublishedChangeImpact struct { ChangedContentUnit *models.ContentUnit ChangedCollections []*models.Collection }
func PublishFile ¶
func RemoveFile ¶
type FileUIDChecker ¶
type FileUIDChecker struct{}
type FilesRequest ¶
type FilesRequest struct { ListRequest IDsFilter UIDsFilter SHA1sFilter DateRangeFilter SecureFilter PublishedFilter SearchTermFilter }
type FilesResponse ¶
type FilesResponse struct { ListResponse Files []*MFile `json:"data"` }
func NewFilesResponse ¶
func NewFilesResponse() *FilesResponse
type GenericDescriber ¶
type GenericDescriber struct{}
func (GenericDescriber) DescribeCollection ¶
func (d GenericDescriber) DescribeCollection(c *models.Collection) ([]*models.CollectionI18n, error)
func (GenericDescriber) DescribeContentUnit ¶
func (d GenericDescriber) DescribeContentUnit(exec boil.Executor, cu *models.ContentUnit, metadata CITMetadata) ([]*models.ContentUnitI18n, error)
type HierarchyRequest ¶
type HttpError ¶
func NewBadRequestError ¶
func NewHttpError ¶
func NewInternalError ¶
func NewNotFoundError ¶
func NewNotFoundError() *HttpError
type InsertRequest ¶
type InsertRequest struct { Operation AVFile InsertType string `json:"insert_type" binding:"required"` ContentUnitUID string `json:"content_unit_uid" binding:"required,len=8"` ParentSha1 string `json:"parent_sha1" binding:"omitempty,len=40,hexadecimal"` Mode string `json:"mode" binding:"required"` OldSha1 string `json:"old_sha1" binding:"omitempty,len=40,hexadecimal"` PublisherUID string `json:"publisher_uid" binding:"omitempty,len=8"` }
type LessonPartDescriber ¶
type LessonPartDescriber struct{}
func (LessonPartDescriber) DescribeContentUnit ¶
func (d LessonPartDescriber) DescribeContentUnit(exec boil.Executor, cu *models.ContentUnit, metadata CITMetadata) ([]*models.ContentUnitI18n, error)
type LettersNamer ¶
type LettersNamer struct {
PrefaceNamer
}
type ListRequest ¶
type ListRequest struct { PageNumber int `json:"page_no" form:"page_no" binding:"omitempty,min=1"` PageSize int `json:"page_size" form:"page_size" binding:"omitempty,min=1"` StartIndex int `json:"start_index" form:"start_index" binding:"omitempty,min=1"` StopIndex int `json:"stop_index" form:"stop_index" binding:"omitempty,min=1"` OrderBy string `json:"order_by" form:"order_by" binding:"omitempty"` }
type ListResponse ¶
type ListResponse struct {
Total int64 `json:"total"`
}
type MFile ¶
type MFile struct { models.File Sha1Str string `json:"sha1"` OperationIds types.Int64Array `json:"operations"` }
Marshalable File
type MaybeFile ¶
type MaybeFile struct { FileName string `json:"file_name" binding:"omitempty,max=255"` Sha1 string `json:"sha1" binding:"omitempty,len=40,hexadecimal"` Size int64 `json:"size" binding:"omitempty"` CreatedAt *Timestamp `json:"created_at" binding:"omitempty"` Type string `json:"type" binding:"max=16"` SubType string `json:"sub_type" binding:"max=16"` MimeType string `json:"mime_type" binding:"max=255"` Language string `json:"language" binding:"omitempty,min=2,max=3"` }
same as File but all fields are optional
type MealDescriber ¶
type MealDescriber struct{}
func (MealDescriber) DescribeContentUnit ¶
func (d MealDescriber) DescribeContentUnit(exec boil.Executor, cu *models.ContentUnit, metadata CITMetadata) ([]*models.ContentUnitI18n, error)
type MediaTypeRegistry ¶
type MissingI18n ¶
func (MissingI18n) Error ¶
func (e MissingI18n) Error() string
type OperationHandler ¶
type OperationTypeRegistry ¶
type OperationTypeRegistry struct {
ByName map[string]*models.OperationType
}
type OperationTypesFilter ¶
type OperationTypesFilter struct {
OperationTypes []string `json:"operation_types" form:"operation_type" binding:"omitempty"`
}
type OperationUIDChecker ¶
type OperationUIDChecker struct{}
type OperationsRequest ¶
type OperationsRequest struct { ListRequest DateRangeFilter OperationTypesFilter }
type OperationsResponse ¶
type OperationsResponse struct { ListResponse Operations []*models.Operation `json:"data"` }
func NewOperationsResponse ¶
func NewOperationsResponse() *OperationsResponse
type PartialCollection ¶
type PartialCollection struct { models.Collection Secure null.Int16 `json:"secure"` }
type PartialContentUnit ¶
type PartialContentUnit struct { models.ContentUnit Secure null.Int16 `json:"secure"` }
type PartialFile ¶
type PatternsFilter ¶
type PatternsFilter struct {
Patterns []string `json:"patterns" form:"pattern" binding:"omitempty"`
}
type PersonRegistry ¶
type PersonUIDChecker ¶
type PersonUIDChecker struct{}
type PersonsRequest ¶
type PersonsRequest struct { ListRequest IDsFilter UIDsFilter PatternsFilter }
type PersonsResponse ¶
type PersonsResponse struct { ListResponse Persons []*Person `json:"data"` }
func NewPersonsResponse ¶
func NewPersonsResponse() *PersonsResponse
type PlainNamer ¶
type PlainNamer struct{}
type PrefaceNamer ¶
type PrefaceNamer struct{}
type PublishedFilter ¶
type PublishedFilter struct {
Published string `json:"published" form:"published" binding:"omitempty"`
}
type Publisher ¶
type Publisher struct { models.Publisher I18n map[string]*models.PublisherI18n `json:"i18n"` }
type PublisherUIDChecker ¶
type PublisherUIDChecker struct{}
type PublishersRequest ¶
type PublishersRequest struct { ListRequest IDsFilter UIDsFilter PatternsFilter }
type PublishersResponse ¶
type PublishersResponse struct { ListResponse Publishers []*Publisher `json:"data"` }
func NewPublishersResponse ¶
func NewPublishersResponse() *PublishersResponse
type RBArticlesNamer ¶
type RBArticlesNamer struct{}
type RBRecordsNamer ¶
type RBRecordsNamer struct{}
type SHA1sFilter ¶
type SHA1sFilter struct {
SHA1s []string `json:"sha1s" form:"sha1" binding:"omitempty"`
}
type SearchTermFilter ¶
type SearchTermFilter struct {
Query string `json:"query" form:"query" binding:"omitempty"`
}
type SecureFilter ¶
type SecureFilter struct {
Levels []int16 `json:"security_levels" form:"secure" binding:"omitempty"`
}
type SendRequest ¶
type SendRequest struct { Operation Original Rename `json:"original"` Proxy Rename `json:"proxy"` Metadata CITMetadata `json:"metadata"` }
type ShamatiNamer ¶
type ShamatiNamer struct{}
type SirtutimRequest ¶
type SourceH ¶
type SourceH struct { ID int64 `json:"id"` UID string `json:"uid"` ParentID null.Int64 `json:"parent_id"` Type string `json:"type"` Position null.Int `json:"position"` Pattern null.String `json:"pattern,omitempty"` Name null.String `json:"name"` Description null.String `json:"description,omitempty"` Children []*SourceH `json:"children,omitempty"` }
type SourceTypeRegistry ¶
type SourceTypeRegistry struct { ByName map[string]*models.SourceType ByID map[int64]*models.SourceType }
type SourceUIDChecker ¶
type SourceUIDChecker struct{}
type SourcesFilter ¶
type SourcesHierarchyRequest ¶
type SourcesHierarchyRequest struct {
HierarchyRequest
}
type SourcesRequest ¶
type SourcesRequest struct {
ListRequest
}
type SourcesResponse ¶
type SourcesResponse struct { ListResponse Sources []*Source `json:"data"` }
func NewSourcesResponse ¶
func NewSourcesResponse() *SourcesResponse
type StoragesRequest ¶
type StoragesRequest struct {
ListRequest
}
type StoragesResponse ¶
type StoragesResponse struct { ListResponse Storages []*models.Storage `json:"data"` }
func NewStoragesResponse ¶
func NewStoragesResponse() *StoragesResponse
type TagUIDChecker ¶
type TagUIDChecker struct{}
type TagsFilter ¶
type TagsFilter struct {
Tags []int64 `json:"tags" form:"tag" binding:"omitempty"`
}
type TagsHierarchyRequest ¶
type TagsHierarchyRequest struct {
HierarchyRequest
}
type TagsRequest ¶
type TagsRequest struct {
ListRequest
}
type TagsResponse ¶
type TagsResponse struct { ListResponse Tags []*Tag `json:"data"` }
func NewTagsResponse ¶
func NewTagsResponse() *TagsResponse
type Timestamp ¶
A time.Time like structure with Unix timestamp JSON marshalling
func (Timestamp) MarshalJSON ¶
func (*Timestamp) UnmarshalJSON ¶
type TranscodeRequest ¶
type TrimRequest ¶
type TrimRequest struct { Operation OriginalSha1 string `json:"original_sha1" binding:"required,len=40,hexadecimal"` ProxySha1 string `json:"proxy_sha1" binding:"required,len=40,hexadecimal"` Original AVFile `json:"original"` Proxy AVFile `json:"proxy"` In []float64 `json:"in"` Out []float64 `json:"out"` CaptureSource string `json:"capture_source"` }
type TypeRegistry ¶
type UIDChecker ¶
type UIDsFilter ¶
type UIDsFilter struct {
UIDs []string `json:"uids" form:"uid" binding:"omitempty"`
}
type UpChainOperationNotFound ¶
type UpChainOperationNotFound struct { FileID int64 // contains filtered or unexported fields }
func (UpChainOperationNotFound) Error ¶
func (x UpChainOperationNotFound) Error() string
type UploadRequest ¶
type VideoProgramChapterDescriber ¶
type VideoProgramChapterDescriber struct{}
func (VideoProgramChapterDescriber) DescribeContentUnit ¶
func (d VideoProgramChapterDescriber) DescribeContentUnit(exec boil.Executor, cu *models.ContentUnit, metadata CITMetadata) ([]*models.ContentUnitI18n, error)