comment all

This commit is contained in:
2020-01-15 14:59:09 +01:00
parent 41861da83e
commit 63c342d87a
6 changed files with 65 additions and 40 deletions

View File

@@ -8,16 +8,19 @@ package main
import "encoding/json"
// UnmarshalDataFT UnmarshalDataFT
func UnmarshalDataFT(data []byte) (DataFT, error) {
var r DataFT
err := json.Unmarshal(data, &r)
return r, err
}
// Marshal Marshal
func (r *DataFT) Marshal() ([]byte, error) {
return json.Marshal(r)
}
//DataFT DataFT
type DataFT struct {
MFStoryKey string `json:"mf_story_key"`
TopLevelPostID string `json:"top_level_post_id"`
@@ -32,6 +35,7 @@ type DataFT struct {
Tn string `json:"tn"`
}
//PageInsight PageInsight
type PageInsight struct {
PageID string `json:"page_id"`
ActorID string `json:"actor_id"`
@@ -43,11 +47,13 @@ type PageInsight struct {
Targets []Target `json:"targets"`
}
// Dm Dm
type Dm struct {
IsShare int64 `json:"isShare"`
OriginalPostOwnerID int64 `json:"originalPostOwnerID"`
}
// PostContext PostContext
type PostContext struct {
ObjectFbtype int64 `json:"object_fbtype"`
PublishTime int64 `json:"publish_time"`
@@ -55,6 +61,7 @@ type PostContext struct {
StoryFbid []string `json:"story_fbid"`
}
// Target Target
type Target struct {
ActorID string `json:"actor_id"`
PageID string `json:"page_id"`