Documentation ¶
Index ¶
- Constants
- Variables
- func InitTypeRegistries(exec boil.Executor) error
- func StdLang(lang string) string
- type AuthorRegistry
- type CollectionWName
- type ContentRoleTypeRegistry
- type ContentTypeRegistry
- type MediaType
- type MediaTypeRegistry
- type OperationTypeRegistry
- type PersonRegistry
- type SourceTypeRegistry
- type TwitterUsersRegistry
- type TypeRegistry
- type UnitWName
Constants ¶
View Source
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" CT_LESSONS_SERIES = "LESSONS_SERIES" CT_SONGS = "SONGS" CT_BOOKS = "BOOKS" // 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" CT_LELO_MIKUD = "LELO_MIKUD" CT_SONG = "SONG" CT_BOOK = "BOOK" CT_BLOG_POST = "BLOG_POST" CT_RESEARCH_MATERIAL = "RESEARCH_MATERIAL" CT_KTAIM_NIVCHARIM = "KTAIM_NIVCHARIM" // 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" OP_JOIN = "join" // 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) // Permissions PERM_READ = "read" PERM_WRITE = "write" PERM_I18N_WRITE = "i18n_write" PERM_METADATA_WRITE = "metadata_write" // 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_AMHARIC = "am" LANG_MULTI = "zz" LANG_UNKNOWN = "xx" )
Variables ¶
View Source
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{} TWITTER_USERS_REGISTRY = &TwitterUsersRegistry{} 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, LANG_AMHARIC, } 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, "PER": 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, "AMH": LANG_AMHARIC, } 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_LESSONS_SERIES, CT_SONGS, CT_BOOKS, 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, CT_LELO_MIKUD, CT_SONG, CT_BOOK, CT_BLOG_POST, CT_RESEARCH_MATERIAL, CT_KTAIM_NIVCHARIM, } 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, OP_JOIN, } // 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: "mp3", Type: "audio", SubType: "", MimeType: "audio/mp3"}, {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: "zip", Type: "image", SubType: "", MimeType: "application/x-zip-compressed"}, {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"}, } )
Functions ¶
func InitTypeRegistries ¶
Types ¶
type AuthorRegistry ¶
type CollectionWName ¶
type CollectionWName struct { *models.Collection // contains filtered or unexported fields }
func (*CollectionWName) Name ¶
func (c *CollectionWName) Name() string
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 MediaTypeRegistry ¶
type OperationTypeRegistry ¶
type OperationTypeRegistry struct {
ByName map[string]*models.OperationType
}
type PersonRegistry ¶
type SourceTypeRegistry ¶
type SourceTypeRegistry struct { ByName map[string]*models.SourceType ByID map[int64]*models.SourceType }
type TwitterUsersRegistry ¶
type TwitterUsersRegistry struct { ByUsername map[string]*models.TwitterUser ByID map[int64]*models.TwitterUser }
type TypeRegistry ¶
Click to show internal directories.
Click to hide internal directories.