github.com/lxt1045/json@v0.0.0-20231013032136-54d6b1d6e525/testdata/struct.go (about)

     1  package testdata
     2  
     3  type Twitter struct {
     4  	StatusesST       []StatusesST     `json:"statuses"`
     5  	SearchMetadataST SearchMetadataST `json:"search_metadata"`
     6  }
     7  type MetadataST struct {
     8  	ResultType      string `json:"result_type"`
     9  	IsoLanguageCode string `json:"iso_language_code"`
    10  }
    11  type Description struct {
    12  	Urls []interface{} `json:"urls"`
    13  }
    14  type EntitiesST struct {
    15  	Description  Description    `json:"description"`
    16  	HashtagsST   []interface{}  `json:"hashtags"`
    17  	Symbols      []interface{}  `json:"symbols"`
    18  	Urls         []interface{}  `json:"urls"`
    19  	UserMentions []UserMentions `json:"user_mentions"`
    20  	Media        []Media        `json:"media"`
    21  }
    22  type UserST struct {
    23  	ID                             int         `json:"id"`
    24  	IDStr                          string      `json:"id_str"`
    25  	Name                           string      `json:"name"`
    26  	ScreenName                     string      `json:"screen_name"`
    27  	Location                       string      `json:"location"`
    28  	Description                    string      `json:"description"`
    29  	URL                            interface{} `json:"url"`
    30  	EntitiesST                     EntitiesST  `json:"entities"`
    31  	Protected                      bool        `json:"protected"`
    32  	FollowersCount                 int         `json:"followers_count"`
    33  	FriendsCount                   int         `json:"friends_count"`
    34  	ListedCount                    int         `json:"listed_count"`
    35  	CreatedAt                      string      `json:"created_at"`
    36  	FavouritesCount                int         `json:"favourites_count"`
    37  	UtcOffset                      int         `json:"utc_offset"`
    38  	TimeZone                       string      `json:"time_zone"`
    39  	GeoEnabled                     bool        `json:"geo_enabled"`
    40  	Verified                       bool        `json:"verified"`
    41  	StatusesCount                  int         `json:"statuses_count"`
    42  	Lang                           string      `json:"lang"`
    43  	ContributorsEnabled            bool        `json:"contributors_enabled"`
    44  	IsTranslator                   bool        `json:"is_translator"`
    45  	IsTranslationEnabled           bool        `json:"is_translation_enabled"`
    46  	ProfileBackgroundColor         string      `json:"profile_background_color"`
    47  	ProfileBackgroundImageURL      string      `json:"profile_background_image_url"`
    48  	ProfileBackgroundImageURLHTTPS string      `json:"profile_background_image_url_https"`
    49  	ProfileBackgroundTile          bool        `json:"profile_background_tile"`
    50  	ProfileImageURL                string      `json:"profile_image_url"`
    51  	ProfileImageURLHTTPS           string      `json:"profile_image_url_https"`
    52  	ProfileBannerURL               string      `json:"profile_banner_url"`
    53  	ProfileLinkColor               string      `json:"profile_link_color"`
    54  	ProfileSidebarBorderColor      string      `json:"profile_sidebar_border_color"`
    55  	ProfileSidebarFillColor        string      `json:"profile_sidebar_fill_color"`
    56  	ProfileTextColor               string      `json:"profile_text_color"`
    57  	ProfileUseBackgroundImage      bool        `json:"profile_use_background_image"`
    58  	DefaultProfile                 bool        `json:"default_profile"`
    59  	DefaultProfileImage            bool        `json:"default_profile_image"`
    60  	Following                      bool        `json:"following"`
    61  	FollowRequestSent              bool        `json:"follow_request_sent"`
    62  	Notifications                  bool        `json:"notifications"`
    63  }
    64  type UserMentions struct {
    65  	ScreenName string `json:"screen_name"`
    66  	Name       string `json:"name"`
    67  	ID         int    `json:"id"`
    68  	IDStr      string `json:"id_str"`
    69  	Indices    []int  `json:"indices"`
    70  }
    71  type Medium struct {
    72  	W      int    `json:"w"`
    73  	H      int    `json:"h"`
    74  	Resize string `json:"resize"`
    75  }
    76  type Small struct {
    77  	W      int    `json:"w"`
    78  	H      int    `json:"h"`
    79  	Resize string `json:"resize"`
    80  }
    81  type Thumb struct {
    82  	W      int    `json:"w"`
    83  	H      int    `json:"h"`
    84  	Resize string `json:"resize"`
    85  }
    86  type Large struct {
    87  	W      int    `json:"w"`
    88  	H      int    `json:"h"`
    89  	Resize string `json:"resize"`
    90  }
    91  type Sizes struct {
    92  	Medium Medium `json:"medium"`
    93  	Small  Small  `json:"small"`
    94  	Thumb  Thumb  `json:"thumb"`
    95  	Large  Large  `json:"large"`
    96  }
    97  type Media struct {
    98  	ID                int64  `json:"id"`
    99  	IDStr             string `json:"id_str"`
   100  	Indices           []int  `json:"indices"`
   101  	MediaURL          string `json:"media_url"`
   102  	MediaURLHTTPS     string `json:"media_url_https"`
   103  	URL               string `json:"url"`
   104  	DisplayURL        string `json:"display_url"`
   105  	ExpandedURL       string `json:"expanded_url"`
   106  	Type              string `json:"type"`
   107  	Sizes             Sizes  `json:"sizes"`
   108  	SourceStatusID    int64  `json:"source_status_id"`
   109  	SourceStatusIDStr string `json:"source_status_id_str"`
   110  }
   111  type RetweetedStatus struct {
   112  	MetadataST           MetadataST  `json:"metadata"`
   113  	CreatedAt            string      `json:"created_at"`
   114  	ID                   int64       `json:"id"`
   115  	IDStr                string      `json:"id_str"`
   116  	Text                 string      `json:"text"`
   117  	Source               string      `json:"source"`
   118  	Truncated            bool        `json:"truncated"`
   119  	InReplyToStatusID    interface{} `json:"in_reply_to_status_id"`
   120  	InReplyToStatusIDStr interface{} `json:"in_reply_to_status_id_str"`
   121  	InReplyToUserID      interface{} `json:"in_reply_to_user_id"`
   122  	InReplyToUserIDStr   interface{} `json:"in_reply_to_user_id_str"`
   123  	InReplyToScreenName  interface{} `json:"in_reply_to_screen_name"`
   124  	UserST               UserST      `json:"user"`
   125  	Geo                  interface{} `json:"geo"`
   126  	Coordinates          interface{} `json:"coordinates"`
   127  	Place                interface{} `json:"place"`
   128  	Contributors         interface{} `json:"contributors"`
   129  	RetweetCount         int         `json:"retweet_count"`
   130  	FavoriteCount        int         `json:"favorite_count"`
   131  	EntitiesST           EntitiesST  `json:"entities"`
   132  	Favorited            bool        `json:"favorited"`
   133  	Retweeted            bool        `json:"retweeted"`
   134  	PossiblySensitive    bool        `json:"possibly_sensitive"`
   135  	Lang                 string      `json:"lang"`
   136  }
   137  
   138  type HashtagsST struct {
   139  	Text    string `json:"text"`
   140  	Indices []int  `json:"indices"`
   141  }
   142  type StatusesST struct {
   143  	MetadataST           MetadataST      `json:"metadata"`
   144  	CreatedAt            string          `json:"created_at"`
   145  	ID                   int64           `json:"id"`
   146  	IDStr                string          `json:"id_str"`
   147  	Text                 string          `json:"text"`
   148  	Source               string          `json:"source"`
   149  	Truncated            bool            `json:"truncated"`
   150  	InReplyToStatusID    interface{}     `json:"in_reply_to_status_id"`
   151  	InReplyToStatusIDStr interface{}     `json:"in_reply_to_status_id_str"`
   152  	InReplyToUserID      int             `json:"in_reply_to_user_id"`
   153  	InReplyToUserIDStr   string          `json:"in_reply_to_user_id_str"`
   154  	InReplyToScreenName  string          `json:"in_reply_to_screen_name"`
   155  	UserST               UserST          `json:"user,omitempty"`
   156  	Geo                  interface{}     `json:"geo"`
   157  	Coordinates          interface{}     `json:"coordinates"`
   158  	Place                interface{}     `json:"place"`
   159  	Contributors         interface{}     `json:"contributors"`
   160  	RetweetCount         int             `json:"retweet_count"`
   161  	FavoriteCount        int             `json:"favorite_count"`
   162  	EntitiesST           EntitiesST      `json:"entities,omitempty"`
   163  	Favorited            bool            `json:"favorited"`
   164  	Retweeted            bool            `json:"retweeted"`
   165  	Lang                 string          `json:"lang"`
   166  	RetweetedStatus      RetweetedStatus `json:"retweeted_status,omitempty"`
   167  	PossiblySensitive    bool            `json:"possibly_sensitive,omitempty"`
   168  }
   169  type SearchMetadataST struct {
   170  	CompletedIn float64 `json:"completed_in"`
   171  	MaxID       int64   `json:"max_id"`
   172  	MaxIDStr    string  `json:"max_id_str"`
   173  	NextResults string  `json:"next_results"`
   174  	Query       string  `json:"query"`
   175  	RefreshURL  string  `json:"refresh_url"`
   176  	Count       int     `json:"count"`
   177  	SinceID     int     `json:"since_id"`
   178  	SinceIDStr  string  `json:"since_id_str"`
   179  }