Versions in this module Expand all Collapse all v1 v1.0.0 Jan 13, 2020 Changes in this version + const MediaTypeImage + const MediaTypeThumb + const MediaTypeVideo + const MediaTypeVoice + type Article struct + Author string + Content string + ContentSourceURL string + Digest string + ShowCoverPic int + ThumbMediaID string + Title string + type Material struct + func NewMaterial(context *context.Context) *Material + func (material *Material) AddMaterial(mediaType MediaType, filename string) (mediaID string, url string, err error) + func (material *Material) AddNews(articles []*Article) (mediaID string, err error) + func (material *Material) AddVideo(filename, title, introduction string) (mediaID string, url string, err error) + func (material *Material) DeleteMaterial(mediaID string) error + func (material *Material) GetMediaURL(mediaID string) (mediaURL string, err error) + func (material *Material) ImageUpload(filename string) (url string, err error) + func (material *Material) MediaUpload(mediaType MediaType, filename string) (media Media, err error) + type Media struct + CreatedAt int64 + MediaID string + ThumbMediaID string + Type MediaType + type MediaType string