fork of https://github.com/sourcegraph/zoekt
1// Copyright 2020 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4//
5// Note (@Sourcegraph): This file was copied / adapted from
6// https://github.com/protocolbuffers/protobuf-go/blob/v1.30.0/internal/testprotos/news/news.proto to aid our testing.
7
8syntax = "proto3";
9
10package grpc.testprotos.news.v1;
11
12import "google/protobuf/timestamp.proto";
13
14option go_package = "github.com/sourcegraph/zoekt/grpc/testprotos/news/v1";
15
16message Article {
17 enum Status {
18 STATUS_DRAFT_UNSPECIFIED = 0;
19 STATUS_PUBLISHED = 1;
20 STATUS_REVOKED = 2;
21 }
22
23 string author = 1;
24 google.protobuf.Timestamp date = 2;
25 string title = 3;
26 string content = 4;
27 Status status = 8;
28 repeated Attachment attachments = 7;
29}
30
31message Attachment {
32 oneof contents {
33 BinaryAttachment binary_attachment = 1;
34 KeyValueAttachment key_value_attachment = 2;
35 }
36}
37
38message BinaryAttachment {
39 string name = 1;
40 bytes data = 2;
41}
42
43message KeyValueAttachment {
44 string name = 1;
45 map<string, string> data = 2;
46}