proto

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Category_name = map[int32]string{
	0: "broadcast",
	1: "book",
	2: "movie",
	3: "game",
	4: "music",
	5: "app",
	6: "review",
}
View Source
var Category_value = map[string]int32{
	"broadcast": 0,
	"book":      1,
	"movie":     2,
	"game":      3,
	"music":     4,
	"app":       5,
	"review":    6,
}
View Source
var Flag_name = map[int32]string{
	0: "user",
	1: "tasks",
	2: "categories",
	3: "output_dir",
	8: "cookies_file",
	4: "incremental",
	5: "proxy",
	6: "max_retry",
	7: "req_delay",
}
View Source
var Flag_value = map[string]int32{
	"user":         0,
	"tasks":        1,
	"categories":   2,
	"output_dir":   3,
	"cookies_file": 8,
	"incremental":  4,
	"proxy":        5,
	"max_retry":    6,
	"req_delay":    7,
}
View Source
var Task_name = map[int32]string{
	0: "collect",
	1: "parse",
	2: "publish",
}
View Source
var Task_value = map[string]int32{
	"collect": 0,
	"parse":   1,
	"publish": 2,
}

Functions

func ConcatProtoEnum

func ConcatProtoEnum(nameMap map[int32]string, separator string) string

ConcatProtoEnum concats enum proto values to a string.

Types

type Category

type Category int32

Category defines the supported categories. Full list supported by Douban are: - 广播 broadcast (所有的状态更新) - 书籍 book - 电影 movie - 音乐 music - 游戏 game - 移动应用 app - 评论 review - 小组 group (not supported) - 日记 note (not supported) - 图片 album (not supported) - 小站 site (not supported) - 同城活动 activity (not supported) - 舞台剧 drama (not supported) - 豆品 thing (not supported)

const (
	Category_broadcast Category = 0
	Category_book      Category = 1
	Category_movie     Category = 2
	Category_game      Category = 3
	Category_music     Category = 4
	Category_app       Category = 5
	Category_review    Category = 6
)

func (Category) EnumDescriptor

func (Category) EnumDescriptor() ([]byte, []int)

func (Category) String

func (x Category) String() string

type Flag

type Flag int32

Flag defines the names of all runtime flags. Next: 9

const (
	// The user name.
	Flag_user Flag = 0
	// Tasks to run.
	Flag_tasks Flag = 1
	// Categories to run on.
	Flag_categories Flag = 2
	// Output path/directory.
	Flag_output_dir Flag = 3
	// Input file path to cookies.txt.
	Flag_cookies_file Flag = 8
	// Incremental running or starting over with overriding existing files.
	Flag_incremental Flag = 4
	// Proxy used to send each request via.
	Flag_proxy Flag = 5
	// Max number of retries.
	Flag_max_retry Flag = 6
	// Min time between any two requests.
	Flag_req_delay Flag = 7
)

func (Flag) EnumDescriptor

func (Flag) EnumDescriptor() ([]byte, []int)

func (Flag) String

func (x Flag) String() string

type Task

type Task int32

Task defines the specific tasks the program does.

const (
	// Collecting web pages in raw format.
	Task_collect Task = 0
	// Parse raw web pages into structural data.
	Task_parse Task = 1
	// Publish parsed data into web pages.
	Task_publish Task = 2
)

func (Task) EnumDescriptor

func (Task) EnumDescriptor() ([]byte, []int)

func (Task) String

func (x Task) String() string

Jump to

Keyboard shortcuts

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