Documentation ¶
Index ¶
- func DBmongoCheckPostExists(p_post_title_str string, pRuntimeSys *gf_core.RuntimeSys) (bool, *gf_core.GFerror)
- func DBmongoCreatePost(p_post *GFpost, pRuntimeSys *gf_core.RuntimeSys) *gf_core.GFerror
- func DBmongoDeletePost(p_post_title_str string, pRuntimeSys *gf_core.RuntimeSys) *gf_core.GFerror
- func DBmongoMarkAsDeletedPost(p_post_title_str string, pRuntimeSys *gf_core.RuntimeSys) *gf_core.GFerror
- func DBmongoUpdatePost(pPost *GFpost, pRuntimeSys *gf_core.RuntimeSys) *gf_core.GFerror
- func GetPostURL(pPostTitleStr string) string
- func Verify_external_post_info(p_post_info_map map[string]interface{}, p_max_title_chars_int int, ...) (map[string]interface{}, *gf_core.GFerror)
- func Verify_post_element_type(p_type_str string, pRuntimeSys *gf_core.RuntimeSys) *gf_core.GFerror
- type GFpost
- func CreateNewPost(pPostInfoMap map[string]interface{}, pRuntimeSys *gf_core.RuntimeSys) (*GFpost, *gf_core.GFerror)
- func DBmongoGetPost(p_post_title_str string, pRuntimeSys *gf_core.RuntimeSys) (*GFpost, *gf_core.GFerror)
- func DBmongoGetPostsFromOffset(p_cursor_position_int int, p_posts_num_to_get_int int, ...) ([]*GFpost, *gf_core.GFerror)
- func DBmongoGetPostsPage(p_cursor_start_position_int int, p_elements_num_int int, ...) ([]*GFpost, *gf_core.GFerror)
- func DBmongoGetRandomPostsRange(p_posts_num_to_get_int int, p_max_random_cursor_position_int int, ...) ([]*GFpost, *gf_core.GFerror)
- type GFpostElement
- type GFpostNote
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DBmongoCheckPostExists ¶
func DBmongoCreatePost ¶
func DBmongoCreatePost(p_post *GFpost, pRuntimeSys *gf_core.RuntimeSys) *gf_core.GFerror
func DBmongoDeletePost ¶
func DBmongoDeletePost(p_post_title_str string, pRuntimeSys *gf_core.RuntimeSys) *gf_core.GFerror
func DBmongoMarkAsDeletedPost ¶
func DBmongoMarkAsDeletedPost(p_post_title_str string, pRuntimeSys *gf_core.RuntimeSys) *gf_core.GFerror
func DBmongoUpdatePost ¶
func DBmongoUpdatePost(pPost *GFpost, pRuntimeSys *gf_core.RuntimeSys) *gf_core.GFerror
func GetPostURL ¶
------------------------------------------------
func Verify_post_element_type ¶
func Verify_post_element_type(p_type_str string, pRuntimeSys *gf_core.RuntimeSys) *gf_core.GFerror
Types ¶
type GFpost ¶
type GFpost struct { Id primitive.ObjectID `bson:"_id,omitempty"` IDstr string `bson:"id_str"` Tstr string `bson:"t"` // "post" DeletedBool bool `bson:"deleted_bool"` ClientTypeStr string `bson:"client_type_str"` // "gchrome_ext" //type of the client that created the post TitleStr string `bson:"title_str"` DescriptionStr string `bson:"description_str"` CreationDatetimeStr string `bson:"creation_datetime_str"` PosterUserNameStr string `bson:"poster_user_name_str"` // user-name of the user that posted this post //------------ // GF_IMAGES ThumbnailURLstr string `bson:"thumbnail_url_str"` // SYMPHONY 0.3 ImagesIDsLst []gf_images_core.GFimageID `bson:"images_ids_lst"` //------------ PostElementsLst []*GFpostElement `bson:"post_elements_lst"` TagsLst []string `bson:"tags_lst"` NotesLst []*GFpostNote `bson:"notes_lst"` // SYMPHONY 0.3 - notes are chunks of text (for now) that can be attached to a post // every event can have multiple colors assigned to it ColorsLst []string `bson:"colors_lst"` }
func CreateNewPost ¶
func DBmongoGetPost ¶
func DBmongoGetPostsPage ¶
type GFpostElement ¶
type GFpostElement struct { IDstr string `bson:"id_str"` // type_str - "link"|"image"|"video"|"iframe"|"text" TypeStr string `bson:"type_str"` DescriptionStr string `bson:"description_str"` // post_elements can be created after/before their hosting post has been created // so their creation datetimes might be different then the post creation datetime CreationDatetimeStr string `bson:"creation_datetime_str"` // FIX!! - if type_str == "image" this url_str should be the external source link if // the PostElement_ADT is a composite of external stuff //---------------------- // if type_str == "link"|"image"|"video"|"iframe" then PostElement_ADT has // a external url associated with it ExternURLstr string `bson:"extern_url_str"` //---------------------- // if type_str == "image"|"video" then source_page_url_str represents the URL of // the page from which this post_element was extracted from (if it wasnt uploaded directly) OriginPageURLstr string `bson:"origin_page_url_str"` // this is the index unique for the element, in a maximum of 3d space // lower orders (1d,2d) are done in the 3d tuple (x,y,0) // this is used for graphical/positioning ops // FIX!! - postfix is "_tpl" for legacy reasons. should be "_lst" PostIndex3lst []int `bson:"post_index_3_lst"` WidthInt int `bson:"width_int"` //in pixels HeightInt int `bson:"height_int"` //in pixels ImageIDstr gf_images_core.Gf_image_id // only thumbnail urls are tracked here in the Post_ADT, not the full-size (which is tracked // in Image_ADT), since the fullsize internal url is never used (that would be copyright infringement). // using thumbnails falls into fair-use ImgThumbnailSmallURLstr string `bson:"img_thumbnail_small_url_str"` ImgThumbnailMediumURLstr string `bson:"img_thumbnail_medium_url_str"` ImgThumbnailLargeURLstr string `bson:"img_thumbnail_large_url_str"` TagsLst []string `bson:"tags_lst"` ColorsLst []string `bson:"colors_lst"` MetaMap map[string]interface{} `bson:"meta_map"` }
func Get_post_elements_of_type ¶
func Get_post_elements_of_type(pPost *GFpost, pTypeStr string, pRuntimeSys *gf_core.RuntimeSys) ([]*GFpostElement, *gf_core.GFerror)
type GFpostNote ¶
Click to show internal directories.
Click to hide internal directories.