consts

package
v1.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2018 License: MIT Imports: 0 Imported by: 0

Documentation

Index

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"

	// 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"
)
View Source
const (
	API_DEFAULT_PAGE_SIZE = 50
	API_MAX_PAGE_SIZE     = 1000
)
View Source
const (
	SORT_BY_RELEVANCE      = "relevance"
	SORT_BY_NEWER_TO_OLDER = "newertoolder"
	SORT_BY_OLDER_TO_NEWER = "oldertonewer"
	SORT_BY_SOURCE_FIRST   = "sourcefirst"
)
View Source
const (
	FILTER_TAG                       = "tag"
	FILTER_START_DATE                = "start_date"
	FILTER_END_DATE                  = "end_date"
	FILTER_SOURCE                    = "source"
	FILTER_AUTHOR                    = "author"
	FILTER_UNITS_CONTENT_TYPES       = "units_content_types"
	FILTER_COLLECTIONS_CONTENT_TYPES = "collections_content_types"
	FILTER_SECTION_SOURCES           = "filter_section_sources"
)
View Source
const (
	MEDIA_MP4  = "video/mp4"
	MEDIA_MP3  = "audio/mpeg"
	MEDIA_MP3a = "audio/mpeg"
	MEDIA_MP3b = "audio/mp3"
)
View Source
const (
	INTENT_TYPE_TAG    = "tag"
	INTENT_TYPE_SOURCE = "source"

	INTENT_INDEX_TAG         = "intent-tag"
	INTENT_INDEX_SOURCE      = "intent-source"
	INTENT_HIT_TYPE_PROGRAMS = "programs"
	INTENT_HIT_TYPE_LESSONS  = "lessons"
)

Search intents

View Source
const CDN = "https://cdn.kabbalahmedia.info/"
View Source
const ES_RESULTS_INDEX = "results"

ElasticSearch 'es'

View Source
const ES_RESULT_TYPE = "result_type"

Result type

View Source
const ES_RESULT_TYPE_COLLECTIONS = "collections"
View Source
const ES_RESULT_TYPE_SOURCES = "sources"
View Source
const ES_RESULT_TYPE_TAGS = "tags"
View Source
const ES_RESULT_TYPE_UNITS = "units"
View Source
const ES_SOURCES_INDEX = "sources"

Variables

View Source
var CODE2LANG = map[string]string{
	"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,
	"UKR": LANG_UKRAINIAN,
	"MKD": LANG_MACEDONIAN,
	"SLV": LANG_SLOVENIAN,
	"LAV": LANG_LATVIAN,
	"SLK": LANG_SLOVAK,
	"CZE": LANG_CZECH,
}
View Source
var FILTERS = map[string]string{
	FILTER_TAG:                       "tag",
	FILTER_START_DATE:                "start_date",
	FILTER_END_DATE:                  "end_date",
	FILTER_SOURCE:                    "source",
	FILTER_AUTHOR:                    "source",
	FILTER_UNITS_CONTENT_TYPES:       "content_type",
	FILTER_COLLECTIONS_CONTENT_TYPES: "collection_content_type",
	FILTER_SECTION_SOURCES:           "filter_section_sources",
}

Use to identify and map request filters Maps request filter name to index field name.

Fake index for intents.

View Source
var LANG2CODE = map[string]string{
	LANG_ENGLISH:    "ENG",
	LANG_HEBREW:     "HEB",
	LANG_RUSSIAN:    "RUS",
	LANG_SPANISH:    "SPA",
	LANG_ITALIAN:    "ITA",
	LANG_GERMAN:     "GER",
	LANG_DUTCH:      "DUT",
	LANG_FRENCH:     "FRE",
	LANG_PORTUGUESE: "POR",
	LANG_TURKISH:    "TRK",
	LANG_POLISH:     "POL",
	LANG_ARABIC:     "ARB",
	LANG_HUNGARIAN:  "HUN",
	LANG_FINNISH:    "FIN",
	LANG_LITHUANIAN: "LIT",
	LANG_JAPANESE:   "JPN",
	LANG_BULGARIAN:  "BUL",
	LANG_GEORGIAN:   "GEO",
	LANG_NORWEGIAN:  "NOR",
	LANG_SWEDISH:    "SWE",
	LANG_CROATIAN:   "HRV",
	LANG_CHINESE:    "CHN",
	LANG_PERSIAN:    "FAR",
	LANG_ROMANIAN:   "RON",
	LANG_HINDI:      "HIN",
	LANG_UKRAINIAN:  "UKR",
	LANG_MACEDONIAN: "MKD",
	LANG_SLOVENIAN:  "SLV",
	LANG_LATVIAN:    "LAV",
	LANG_SLOVAK:     "SLK",
	LANG_CZECH:      "CZE",
}

Functions

This section is empty.

Types

type SearchFilterType added in v0.9.5

type SearchFilterType int

Search filter.

const (
	SEARCH_NO_FILTER              SearchFilterType = iota
	SEARCH_FILTER_ONLY_SOURCES    SearchFilterType = iota
	SEARCH_FILTER_WITHOUT_SOURCES SearchFilterType = iota
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL