1// SPDX-License-Identifier: MIT
2
3// Code generated by protoc-gen-go. DO NOT EDIT.
4// versions:
5// protoc-gen-go v1.36.12
6// protoc (unknown)
7// source: ermite/types.proto
8
9package ermite
10
11import (
12 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
13 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
14 timestamppb "google.golang.org/protobuf/types/known/timestamppb"
15 reflect "reflect"
16 sync "sync"
17 unsafe "unsafe"
18)
19
20const (
21 // Verify that this generated code is sufficiently up-to-date.
22 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
23 // Verify that runtime/protoimpl is sufficiently up-to-date.
24 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
25)
26
27// MergeMode is how a merge request is merged. Fast-forward needs the target
28// to be an ancestor of the head. Squash and merge commit need the head to
29// merge cleanly into the target, which holds when the branch is behind its
30// target without conflict. The server never rebases: a branch that conflicts
31// is rebased by its author and pushed again.
32type MergeMode int32
33
34const (
35 // Not set. In MergeMergeRequestRequest.mode it means fast-forward. Rejected
36 // in RepoSettings.allowed_merge_modes. Returned on a merge request that was
37 // not merged.
38 MergeMode_MERGE_MODE_UNSPECIFIED MergeMode = 0
39 // The target branch moves to the head. No commit is created and the
40 // signatures of the branch's commits are kept.
41 MergeMode_MERGE_MODE_FAST_FORWARD MergeMode = 1
42 // One new commit is created with the tree of the merge of the head into the
43 // target (the tree of the head when the target is its ancestor) and the
44 // target tip as only parent, signed by the server's key (see ServerService.GetSigningKey).
45 // Its author is the author of the first commit of the branch, the other
46 // authors are added as "Co-authored-by:" trailers, and its message is the
47 // title, " (!<number>)", a blank line and the list of the squashed commits'
48 // summaries.
49 MergeMode_MERGE_MODE_SQUASH MergeMode = 2
50 // One new commit is created with two parents, the target tip then the head,
51 // and the tree of the merge. It is signed by the server's key (see
52 // ServerService.GetSigningKey); its author and committer are the server
53 // identity. Its message is "Merge branch '<source>' into <target> (!<n>)",
54 // a blank line and the title. The signatures of the branch's commits are
55 // kept. Needs the "merge_requests.mergeability" feature.
56 MergeMode_MERGE_MODE_MERGE_COMMIT MergeMode = 3
57)
58
59// Enum value maps for MergeMode.
60var (
61 MergeMode_name = map[int32]string{
62 0: "MERGE_MODE_UNSPECIFIED",
63 1: "MERGE_MODE_FAST_FORWARD",
64 2: "MERGE_MODE_SQUASH",
65 3: "MERGE_MODE_MERGE_COMMIT",
66 }
67 MergeMode_value = map[string]int32{
68 "MERGE_MODE_UNSPECIFIED": 0,
69 "MERGE_MODE_FAST_FORWARD": 1,
70 "MERGE_MODE_SQUASH": 2,
71 "MERGE_MODE_MERGE_COMMIT": 3,
72 }
73)
74
75func (x MergeMode) Enum() *MergeMode {
76 p := new(MergeMode)
77 *p = x
78 return p
79}
80
81func (x MergeMode) String() string {
82 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
83}
84
85func (MergeMode) Descriptor() protoreflect.EnumDescriptor {
86 return file_ermite_types_proto_enumTypes[0].Descriptor()
87}
88
89func (MergeMode) Type() protoreflect.EnumType {
90 return &file_ermite_types_proto_enumTypes[0]
91}
92
93func (x MergeMode) Number() protoreflect.EnumNumber {
94 return protoreflect.EnumNumber(x)
95}
96
97// Deprecated: Use MergeMode.Descriptor instead.
98func (MergeMode) EnumDescriptor() ([]byte, []int) {
99 return file_ermite_types_proto_rawDescGZIP(), []int{0}
100}
101
102// Signature identifies who did something in Git and when: the author or the
103// committer of a commit.
104type Signature struct {
105 state protoimpl.MessageState `protogen:"open.v1"`
106 // Name is the person's name as recorded in the commit.
107 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
108 // Email is the person's email address as recorded in the commit.
109 Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
110 // Time is when the action happened. The time zone offset of the commit is
111 // not kept.
112 Time *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=time,proto3" json:"time,omitempty"`
113 unknownFields protoimpl.UnknownFields
114 sizeCache protoimpl.SizeCache
115}
116
117func (x *Signature) Reset() {
118 *x = Signature{}
119 mi := &file_ermite_types_proto_msgTypes[0]
120 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
121 ms.StoreMessageInfo(mi)
122}
123
124func (x *Signature) String() string {
125 return protoimpl.X.MessageStringOf(x)
126}
127
128func (*Signature) ProtoMessage() {}
129
130func (x *Signature) ProtoReflect() protoreflect.Message {
131 mi := &file_ermite_types_proto_msgTypes[0]
132 if x != nil {
133 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
134 if ms.LoadMessageInfo() == nil {
135 ms.StoreMessageInfo(mi)
136 }
137 return ms
138 }
139 return mi.MessageOf(x)
140}
141
142// Deprecated: Use Signature.ProtoReflect.Descriptor instead.
143func (*Signature) Descriptor() ([]byte, []int) {
144 return file_ermite_types_proto_rawDescGZIP(), []int{0}
145}
146
147func (x *Signature) GetName() string {
148 if x != nil {
149 return x.Name
150 }
151 return ""
152}
153
154func (x *Signature) GetEmail() string {
155 if x != nil {
156 return x.Email
157 }
158 return ""
159}
160
161func (x *Signature) GetTime() *timestamppb.Timestamp {
162 if x != nil {
163 return x.Time
164 }
165 return nil
166}
167
168// Commit is the metadata of one Git commit.
169type Commit struct {
170 state protoimpl.MessageState `protogen:"open.v1"`
171 // Id is the full object id (40 lowercase hexadecimal characters for SHA-1).
172 Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
173 // ParentIds are the ids of the parent commits, first parent first. Empty for
174 // a root commit.
175 ParentIds []string `protobuf:"bytes,2,rep,name=parent_ids,json=parentIds,proto3" json:"parent_ids,omitempty"`
176 // Author is who wrote the change.
177 Author *Signature `protobuf:"bytes,3,opt,name=author,proto3" json:"author,omitempty"`
178 // Committer is who recorded the commit.
179 Committer *Signature `protobuf:"bytes,4,opt,name=committer,proto3" json:"committer,omitempty"`
180 // Summary is the first line of the message, without the line break.
181 Summary string `protobuf:"bytes,5,opt,name=summary,proto3" json:"summary,omitempty"`
182 // Message is the full commit message, including the summary. Text that is
183 // not valid UTF-8 is converted with the replacement character.
184 Message string `protobuf:"bytes,6,opt,name=message,proto3" json:"message,omitempty"`
185 // Verification tells whether and how the commit is signed. Unset on
186 // servers without the "commit_signatures" feature.
187 Verification *CommitVerification `protobuf:"bytes,7,opt,name=verification,proto3" json:"verification,omitempty"`
188 unknownFields protoimpl.UnknownFields
189 sizeCache protoimpl.SizeCache
190}
191
192func (x *Commit) Reset() {
193 *x = Commit{}
194 mi := &file_ermite_types_proto_msgTypes[1]
195 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
196 ms.StoreMessageInfo(mi)
197}
198
199func (x *Commit) String() string {
200 return protoimpl.X.MessageStringOf(x)
201}
202
203func (*Commit) ProtoMessage() {}
204
205func (x *Commit) ProtoReflect() protoreflect.Message {
206 mi := &file_ermite_types_proto_msgTypes[1]
207 if x != nil {
208 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
209 if ms.LoadMessageInfo() == nil {
210 ms.StoreMessageInfo(mi)
211 }
212 return ms
213 }
214 return mi.MessageOf(x)
215}
216
217// Deprecated: Use Commit.ProtoReflect.Descriptor instead.
218func (*Commit) Descriptor() ([]byte, []int) {
219 return file_ermite_types_proto_rawDescGZIP(), []int{1}
220}
221
222func (x *Commit) GetId() string {
223 if x != nil {
224 return x.Id
225 }
226 return ""
227}
228
229func (x *Commit) GetParentIds() []string {
230 if x != nil {
231 return x.ParentIds
232 }
233 return nil
234}
235
236func (x *Commit) GetAuthor() *Signature {
237 if x != nil {
238 return x.Author
239 }
240 return nil
241}
242
243func (x *Commit) GetCommitter() *Signature {
244 if x != nil {
245 return x.Committer
246 }
247 return nil
248}
249
250func (x *Commit) GetSummary() string {
251 if x != nil {
252 return x.Summary
253 }
254 return ""
255}
256
257func (x *Commit) GetMessage() string {
258 if x != nil {
259 return x.Message
260 }
261 return ""
262}
263
264func (x *Commit) GetVerification() *CommitVerification {
265 if x != nil {
266 return x.Verification
267 }
268 return nil
269}
270
271var File_ermite_types_proto protoreflect.FileDescriptor
272
273const file_ermite_types_proto_rawDesc = "" +
274 "\n" +
275 "\x12ermite/types.proto\x12\x06ermite\x1a\x16ermite/signature.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"e\n" +
276 "\tSignature\x12\x12\n" +
277 "\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n" +
278 "\x05email\x18\x02 \x01(\tR\x05email\x12.\n" +
279 "\x04time\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\x04time\"\x87\x02\n" +
280 "\x06Commit\x12\x0e\n" +
281 "\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n" +
282 "\n" +
283 "parent_ids\x18\x02 \x03(\tR\tparentIds\x12)\n" +
284 "\x06author\x18\x03 \x01(\v2\x11.ermite.SignatureR\x06author\x12/\n" +
285 "\tcommitter\x18\x04 \x01(\v2\x11.ermite.SignatureR\tcommitter\x12\x18\n" +
286 "\asummary\x18\x05 \x01(\tR\asummary\x12\x18\n" +
287 "\amessage\x18\x06 \x01(\tR\amessage\x12>\n" +
288 "\fverification\x18\a \x01(\v2\x1a.ermite.CommitVerificationR\fverification*x\n" +
289 "\tMergeMode\x12\x1a\n" +
290 "\x16MERGE_MODE_UNSPECIFIED\x10\x00\x12\x1b\n" +
291 "\x17MERGE_MODE_FAST_FORWARD\x10\x01\x12\x15\n" +
292 "\x11MERGE_MODE_SQUASH\x10\x02\x12\x1b\n" +
293 "\x17MERGE_MODE_MERGE_COMMIT\x10\x03Bq\n" +
294 "\n" +
295 "com.ermiteB\n" +
296 "TypesProtoP\x01Z\x1fbnema.dev/ermite-api/gen/ermite\xa2\x02\x03EXX\xaa\x02\x06Ermite\xca\x02\x06Ermite\xe2\x02\x12Ermite\\GPBMetadata\xea\x02\x06Ermiteb\x06proto3"
297
298var (
299 file_ermite_types_proto_rawDescOnce sync.Once
300 file_ermite_types_proto_rawDescData []byte
301)
302
303func file_ermite_types_proto_rawDescGZIP() []byte {
304 file_ermite_types_proto_rawDescOnce.Do(func() {
305 file_ermite_types_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_ermite_types_proto_rawDesc), len(file_ermite_types_proto_rawDesc)))
306 })
307 return file_ermite_types_proto_rawDescData
308}
309
310var file_ermite_types_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
311var file_ermite_types_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
312var file_ermite_types_proto_goTypes = []any{
313 (MergeMode)(0), // 0: ermite.MergeMode
314 (*Signature)(nil), // 1: ermite.Signature
315 (*Commit)(nil), // 2: ermite.Commit
316 (*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp
317 (*CommitVerification)(nil), // 4: ermite.CommitVerification
318}
319var file_ermite_types_proto_depIdxs = []int32{
320 3, // 0: ermite.Signature.time:type_name -> google.protobuf.Timestamp
321 1, // 1: ermite.Commit.author:type_name -> ermite.Signature
322 1, // 2: ermite.Commit.committer:type_name -> ermite.Signature
323 4, // 3: ermite.Commit.verification:type_name -> ermite.CommitVerification
324 4, // [4:4] is the sub-list for method output_type
325 4, // [4:4] is the sub-list for method input_type
326 4, // [4:4] is the sub-list for extension type_name
327 4, // [4:4] is the sub-list for extension extendee
328 0, // [0:4] is the sub-list for field type_name
329}
330
331func init() { file_ermite_types_proto_init() }
332func file_ermite_types_proto_init() {
333 if File_ermite_types_proto != nil {
334 return
335 }
336 file_ermite_signature_proto_init()
337 type x struct{}
338 out := protoimpl.TypeBuilder{
339 File: protoimpl.DescBuilder{
340 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
341 RawDescriptor: unsafe.Slice(unsafe.StringData(file_ermite_types_proto_rawDesc), len(file_ermite_types_proto_rawDesc)),
342 NumEnums: 1,
343 NumMessages: 2,
344 NumExtensions: 0,
345 NumServices: 0,
346 },
347 GoTypes: file_ermite_types_proto_goTypes,
348 DependencyIndexes: file_ermite_types_proto_depIdxs,
349 EnumInfos: file_ermite_types_proto_enumTypes,
350 MessageInfos: file_ermite_types_proto_msgTypes,
351 }.Build()
352 File_ermite_types_proto = out.File
353 file_ermite_types_proto_goTypes = nil
354 file_ermite_types_proto_depIdxs = nil
355}