-
Notifications
You must be signed in to change notification settings - Fork 0
/
gen_calibre.go
130 lines (115 loc) · 2.88 KB
/
gen_calibre.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
// Code generated
// DO NOT EDIT.
package cdb
// ListCommands lists the available calibredb commands.
func ListCommands() []string {
return []string{
"show_metadata",
"saved_searches list",
"saved_searches remove",
"add",
"add_format",
"embed_metadata",
"remove",
"set_metadata",
"export",
"remove_format",
"saved_searches add",
}
}
// Export initializes the export command with the id ...string paramaters.
func (c *Command) Export(id ...string) *Export {
c.SetArgs(id...)
c.CdbCmd = "export"
cmd := &Export{
Command: c,
}
return cmd
}
// RemoveFormat initializes the remove_format command with the id string, fmt string paramaters.
func (c *Command) RemoveFormat(id string, fmt string) *RemoveFormat {
c.SetArgs(id, fmt)
c.CdbCmd = "remove_format"
cmd := &RemoveFormat{
Command: c,
}
return cmd
}
// SavedSearchesAdd initializes the saved_searches add command with the name string, expression string paramaters.
func (c *Command) SavedSearchesAdd(name string, expression string) *SavedSearchesAdd {
c.SetArgs(name, expression)
c.CdbCmd = "saved_searches add"
cmd := &SavedSearchesAdd{
Command: c,
}
return cmd
}
// SavedSearchesRemove initializes the saved_searches remove command with the name string paramaters.
func (c *Command) SavedSearchesRemove(name string) *SavedSearchesRemove {
c.SetArgs(name)
c.CdbCmd = "saved_searches remove"
cmd := &SavedSearchesRemove{
Command: c,
}
return cmd
}
// Add initializes the add command with the files ...string paramaters.
func (c *Command) Add(files ...string) *Add {
c.SetArgs(files...)
c.CdbCmd = "add"
cmd := &Add{
Command: c,
}
return cmd
}
// AddFormat initializes the add_format command with the id string, file string paramaters.
func (c *Command) AddFormat(id string, file string) *AddFormat {
c.SetArgs(id, file)
c.CdbCmd = "add_format"
cmd := &AddFormat{
Command: c,
}
return cmd
}
// EmbedMetadata initializes the embed_metadata command.
func (c *Command) EmbedMetadata() *EmbedMetadata {
c.CdbCmd = "embed_metadata"
cmd := &EmbedMetadata{
Command: c,
}
return cmd
}
// Remove initializes the remove command.
func (c *Command) Remove() *Remove {
c.CdbCmd = "remove"
cmd := &Remove{
Command: c,
}
return cmd
}
// SetMetadata initializes the set_metadata command with the id string paramaters.
func (c *Command) SetMetadata(id string) *SetMetadata {
c.SetArgs(id)
c.CdbCmd = "set_metadata"
cmd := &SetMetadata{
Command: c,
}
return cmd
}
// ShowMetadata initializes the show_metadata command with the id string paramaters.
func (c *Command) ShowMetadata(id string) *ShowMetadata {
c.SetArgs(id)
c.CdbCmd = "show_metadata"
cmd := &ShowMetadata{
Command: c,
}
return cmd
}
// SavedSearchesList initializes the saved_searches list command.
func (c *Command) SavedSearchesList() *SavedSearchesList {
c.CdbCmd = "saved_searches list"
cmd := &SavedSearchesList{
Command: c,
}
return cmd
}