Documentation ¶
Index ¶
- func ChangePublic(momentID string, public bool) error
- func CommentMoment(wechatAppID string, appSecret string, openID string, momentID string, ...) error
- func CreateAd(params CreateAdParams) error
- func CreateMoment(params *CreateMomentParams) (string, error)
- func CreatePlatform(params CreatePlatformParams) error
- func DeleteMoment(momentID string, userID string) error
- func DeleteMomentComment(commentID string, commentatorID string) error
- func Destroy()
- func Init(baseUrl string, timeoutSec time.Duration)
- func LikeDislike(momentID string, likesID string, likesName string) error
- func OriginalPic(objNames string) ([]string, error)
- func UpdateAdConfig(id string, retreat bool) error
- func UpdateMoment(momentID string, content string, senderName string, regionName string, ...) error
- type AdInfo
- type ChangePublicRequest
- type CommentInfo
- type CommentMomentRequest
- type CreateAdParams
- type CreateAdRequest
- type CreateMomentParams
- type CreateMomentRequest
- type CreateMomentResponse
- type CreatePlatformParams
- type CreatePlatformRequest
- type GetAdResponse
- type GetMomentByIDResponse
- type GetMomentParams
- type GetMomentResponse
- type GetOriginalPicResponse
- type GetPlatformMomentsResponse
- type LikeDislikeMomentRequest
- type LikeInfo
- type MomentInfo
- type PicInfo
- type UpdateAdConfigRequest
- type UpdateMomentRequest
- type UploadMomentPicResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangePublic ¶
func CommentMoment ¶
func CreateAd ¶
func CreateAd(params CreateAdParams) error
func CreateMoment ¶
func CreateMoment(params *CreateMomentParams) (string, error)
func CreatePlatform ¶
func CreatePlatform(params CreatePlatformParams) error
func DeleteMoment ¶
func DeleteMomentComment ¶
func OriginalPic ¶
func UpdateAdConfig ¶
Types ¶
type AdInfo ¶
type AdInfo struct { ID string `json:"id"` Content string `json:"content"` RegionName string `json:"regionName"` Longitude float64 `json:"longitude"` Latitude float64 `json:"latitude"` Avatar string `json:"avatar"` Urls []PicInfo `json:"urls"` PushTime string `json:"pushTime"` SenderName string `json:"senderName"` }
type ChangePublicRequest ¶
type CommentInfo ¶
type CommentMomentRequest ¶
type CommentMomentRequest struct { AppID string `json:"appId" binding:"required"` AppSecret string `json:"appSecret" binding:"required"` OpenID string `json:"openId" binding:"required"` MomentID string `json:"momentId"` CommentatorID string `json:"commentatorId"` RespondentID string `json:"respondentId"` Content string `json:"content"` }
type CreateAdParams ¶
type CreateAdRequest ¶
type CreateMomentParams ¶
type CreateMomentParams struct { AppID string `json:"appId" binding:"required"` AppSecret string `json:"appSecret" binding:"required"` OpenID string `json:"openId" binding:"required"` Content string SenderID string SenderName string IsPublic bool RegionName string Longitude float64 Latitude float64 Urls []string }
type CreateMomentRequest ¶
type CreateMomentRequest struct { AppID string `json:"appId" binding:"required"` AppSecret string `json:"appSecret" binding:"required"` OpenID string `json:"openId" binding:"required"` Content string `json:"content" binding:"required"` SenderID string `json:"senderId" binding:"required"` SenderName string `json:"senderName" binding:"required"` IsPublic bool `json:"isPublic" binding:"required"` RegionName string `json:"regionName"` Longitude float64 `json:"longitude"` Latitude float64 `json:"latitude"` Urls []string `json:"urls"` }
type CreateMomentResponse ¶ added in v0.8.7
type CreateMomentResponse struct { ID string `json:"id"` // contains filtered or unexported fields }
type CreatePlatformParams ¶
type CreatePlatformRequest ¶
type GetAdResponse ¶
type GetMomentByIDResponse ¶
type GetMomentByIDResponse struct { Info *MomentInfo `json:"infos"` // contains filtered or unexported fields }
type GetMomentParams ¶
type GetMomentParams struct { AuthorID string `form:"authorId"` SenderIDs []string `form:"senderIds"` IncludeAd bool `form:"includeAd"` LastAdID string `form:"lastAdId"` PageNo int `form:"pageNo"` PageSize int `form:"pageSize"` AdInterval int `form:"adInterval"` LastCommonCount int `form:"lastCommonCount"` }
type GetMomentResponse ¶
type GetMomentResponse struct { Infos []MomentInfo `json:"infos"` TotalCount int64 `json:"totalCount"` PageNo int `json:"pageNo"` LastCommonCount int `json:"lastCommonCount"` LastAdID string `json:"lastAdId"` // contains filtered or unexported fields }
type GetOriginalPicResponse ¶
type GetOriginalPicResponse struct { Urls []string `json:"urls"` // contains filtered or unexported fields }
type GetPlatformMomentsResponse ¶
type GetPlatformMomentsResponse struct { Infos []MomentInfo `json:"infos"` // contains filtered or unexported fields }
type MomentInfo ¶
type MomentInfo struct { ID string `json:"id"` Content string `json:"content"` RegionName string `json:"regionName"` Longitude float64 `json:"longitude"` Latitude float64 `json:"latitude"` Type string `json:"type"` SenderID string `json:"senderId"` SenderName string `json:"senderName"` IsPublic bool `json:"isPublic"` Avatar string `json:"avatar"` Urls []PicInfo `json:"urls"` PushTime *time.Time `json:"pushTime"` Like []LikeInfo `json:"like"` Comment []CommentInfo `json:"comment"` }
func GetMoment ¶
func GetMoment(params *GetMomentParams) ([]MomentInfo, int64, int, string, error)
func GetPlatformMoment ¶
func GetPlatformMoment(pageNo int, pageSize int) ([]MomentInfo, error)
func ID ¶
func ID(id string) (*MomentInfo, error)
type PicInfo ¶
func UploadMomentPic ¶
func UploadMomentPic(pics []*multipart.FileHeader) ([]PicInfo, error)
type UpdateAdConfigRequest ¶
type UpdateMomentRequest ¶
type UploadMomentPicResponse ¶
type UploadMomentPicResponse struct { Infos []PicInfo `json:"infos"` // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.