blob: bf5f62320b37a46a7ce1d521bcbc5fe66ba7d59f (
plain)
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
|
syntax = "proto3";
package gitaly;
import "lint.proto";
import "shared.proto";
option go_package = "gitlab.com/gitlab-org/gitaly/v14/proto/go/gitalypb";
// WikiService is a service that provides Wiki-related functionality. This
// service is deprecated and should not be used anymore. Instead, all
// functionality to implement Wikis should use Git-based RPCS.
service WikiService {
rpc WikiWritePage(stream WikiWritePageRequest) returns (WikiWritePageResponse) {
option (op_type) = {
op: MUTATOR
};
}
rpc WikiUpdatePage(stream WikiUpdatePageRequest) returns (WikiUpdatePageResponse) {
option (op_type) = {
op: MUTATOR
};
}
// WikiFindPage returns a stream because the page's raw_data field may be arbitrarily large.
rpc WikiFindPage(WikiFindPageRequest) returns (stream WikiFindPageResponse) {
option (op_type) = {
op: ACCESSOR
};
}
rpc WikiGetAllPages(WikiGetAllPagesRequest) returns (stream WikiGetAllPagesResponse) {
option (op_type) = {
op: ACCESSOR
};
}
rpc WikiListPages(WikiListPagesRequest) returns (stream WikiListPagesResponse) {
option (op_type) = {
op: ACCESSOR
};
}
}
message WikiCommitDetails {
bytes name = 1;
bytes email = 2;
bytes message = 3;
int32 user_id = 4;
bytes user_name = 5;
}
message WikiPageVersion {
GitCommit commit = 1;
string format = 2;
}
message WikiPage {
// These fields are only present in the first message of a WikiPage stream
WikiPageVersion version = 1;
string format = 2;
bytes title = 3;
string url_path = 4;
bytes path = 5;
bytes name = 6;
bool historical = 7;
// This field is present in all messages of a WikiPage stream
bytes raw_data = 8;
}
// This message is sent in a stream because the 'content' field may be large.
message WikiWritePageRequest {
// These following fields are only present in the first message.
Repository repository = 1 [(target_repository)=true];
bytes name = 2;
string format = 3;
WikiCommitDetails commit_details = 4;
// This field is present in all messages.
bytes content = 5;
}
message WikiWritePageResponse {
bytes duplicate_error = 1;
}
message WikiUpdatePageRequest {
// There fields are only present in the first message of the stream
Repository repository = 1 [(target_repository)=true];
bytes page_path = 2;
bytes title = 3;
string format = 4;
WikiCommitDetails commit_details = 5;
// This field is present in all messages
bytes content = 6;
}
message WikiUpdatePageResponse {
bytes error = 1;
}
message WikiFindPageRequest {
Repository repository = 1 [(target_repository)=true];
bytes title = 2;
bytes revision = 3;
bytes directory = 4;
// prevents the content from being sent over the response
bool skip_content = 5;
}
// WikiFindPageResponse is a stream because we need multiple WikiPage
// messages to send the raw_data field.
message WikiFindPageResponse {
WikiPage page = 1;
}
message WikiGetAllPagesRequest {
Repository repository = 1 [(target_repository)=true];
// Passing 0 means no limit is applied
uint32 limit = 2;
bool direction_desc = 3;
enum SortBy {
TITLE = 0;
CREATED_AT = 1;
}
SortBy sort = 4;
}
// The WikiGetAllPagesResponse stream is a concatenation of WikiPage streams
message WikiGetAllPagesResponse {
WikiPage page = 1;
// When end_of_page is true it signals a change of page for the next Response message (if any)
bool end_of_page = 2;
}
message WikiListPagesRequest {
Repository repository = 1 [(target_repository)=true];
// Passing 0 means no limit is applied
uint32 limit = 2;
bool direction_desc = 3;
enum SortBy {
TITLE = 0;
CREATED_AT = 1;
}
SortBy sort = 4;
uint32 offset = 5;
}
// The WikiListPagesResponse stream is a concatenation of WikiPage streams without content
message WikiListPagesResponse {
WikiPage page = 1;
}
|