cmd

package
v0.0.0-...-ad44e78 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Copyright © 2020 haojunyu <haojunyu2012@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Copyright © 2020 haojunyu <haojunyu2012@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Copyright © 2020 haojunyu <haojunyu2012@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Copyright © 2020 haojunyu <haojunyu2012@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Copyright © 2020 haojunyu <haojunyu2012@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Index

Constants

View Source
const (
	Rcd    = "data/sync_news_mysql.rcd"
	Url    = "http://news-open.51y5.net"
	SqlUrl = "thirdparty:Thirdparty123@tcp(rm-2zew4iw684p3rw391o.mysql.rds.aliyuncs.com:3306)/thirdparty?charset=utf8"
)

全局变量

Variables

View Source
var Db *sqlx.DB

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type NewsI

type NewsI struct {
	ItemID      int
	NewsID      int    `json:"newsid"`
	DocID       int    `json:"docid"`
	Title       string `json:"title"`
	NewsState   string `json:"newsState"`
	EditType    int    `json:"edit_type"`
	Description string `json:"description"`
	Source      int    `json:"source"`
	Body        string
	MediaID     int `json:"mediaId"`
	Type        int
	Bigimg      string   `json:"bigImg"`
	InnerSource string   `json:"inner_source"`
	FromUrlMd5  string   `json:"from_url_md5"`
	Vulgar      int      `json:"vulgar"`
	Only        int      `json:"only"`
	Ctime       int      `json:"ctime"`
	From        string   `json:"from"`
	HttpsUrl    string   `json:"httpsUrl"`
	UrlLocal    string   `json:"urlLocal"`
	Url3g       string   `json:"url3g"`
	Editor      string   `json:"editor"`
	Imgs        []string `json:"imgs"`
	PublishTime int      `json:"publishTime"`
	Cate1       int      `json:"cate1"`
	Cate2       int      `json:"cate2"`
	Cate3       int      `json:"cate3"`
	Original    int      `json:"original"`
	Level       int      `json:"level"`
	Author      string   `json:"author"`
	CheckStatus int      `json:"check_status"`
	Expire      int      `json:"expire"`
	Region      string   `json:"region"`
	Status      int      `json:"status"`
	Mediatype   int      `json:"mediaType"`
	Startkey    string

	// list
	Id             int      `json:"id"`
	FetchedUrl     string   `json:"fetchhedUrl"`
	WifiFetchedUrl string   `json:"wifiFetchedUrl"`
	Img3           []string `json:"img3"`
	ImgSize        int      `json:"imgSize"`
	BodyLength     int      `json:"bodyLength"`
	Img1           string   `json:"img1"`
	Ts             int      `json:"ts"`
}

NewsI 图文对象,映射成json

type NewsList

type NewsList []NewsI

NewsList 图文列表

type NewsM

type NewsM struct {
	Itemid       int
	Newsid       string `json:"newsid"`
	Docid        int    `json:"docid"`
	Title        string `json:"title"`
	Newstate     string `json:"newsState"`
	Edit_type    int    `json:"edit_type"`
	Description  string `json:"description"`
	Source       int    `json:"source"`
	Body         string
	MediaId      int `json:"mediaId"`
	Type         int
	Bigimg       string `json:"bigImg"`
	Inner_source string `json:"inner_source"`
	From_url_md5 string `json:"from_url_md5"`
	Vulgar       int    `json:"vulgar"`
	Only         int    `json:"only"`
	Ctime        int    `json:"ctime"`
	From         string `json:"from"`
	HttpsUrl     string `json:"httpsUrl"`
	Urllocal     string `json:"urlLocal"`
	Url3g        string `json:"url3g"`
	Editor       string `json:"editor"`
	Imgs         string
	Publishtime  int    `json:"publishTime"`
	Cate1        int    `json:"cate1"`
	Cate2        int    `json:"cate2"`
	Cate3        int    `json:"cate3"`
	Original     int    `json:"original"`
	Level        int    `json:"level"`
	Author       string `json:"author"`
	Check_status int    `json:"check_status"`
	Expire       int    `json:"expire"`
	Region       string `json:"region"`
	Status       int    `json:"status"`
	Mediatype    int    `json:"mediaType"`
	Startkey     string
	Dg_item_tag  string
	Dg_item_cate string
	Create_time  string
	Update_time  string
}

NewsM 图文数据库结构体

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL