File: test_message.proto

package info (click to toggle)
golang-github-google-certificate-transparency 0.0~git20160709.0.0f6e3d1~ds1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster
  • size: 5,676 kB
  • sloc: cpp: 35,278; python: 11,838; java: 1,911; sh: 1,885; makefile: 950; xml: 520; ansic: 225
file content (44 lines) | stat: -rw-r--r-- 1,734 bytes parent folder | download
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
syntax = "proto2";

package ct;

import "ct/proto/tls_options.proto";


// A message that covers each option at least once.
// The test coverage is best-effort: the test message can't cover
// all combinations of message types and options.
message TestMessage {
  enum TestEnum {
    option (tls_enum_opts).max_value = 65535;
    ENUM_0 = 0;
    ENUM_1 = 1;
  }

  message EmbeddedMessage {
    optional uint32 uint_32 = 1 [(tls_opts).bytes_in_use = 2];
  }

  optional uint32 skip_uint32 = 1 [(tls_opts).skip = true];
  optional uint32 uint_8 = 2 [(tls_opts).bytes_in_use = 1];
  optional uint32 uint_16 = 3 [(tls_opts).bytes_in_use = 2];
  optional uint32 uint_24 = 4 [(tls_opts).bytes_in_use = 3];
  optional uint32 uint_32 = 5;
  optional uint64 uint_48 = 6 [(tls_opts).bytes_in_use = 6];
  optional uint64 uint_64 = 7;
  optional bytes skip_bytes = 8 [(tls_opts).skip = true];
  optional bytes fixed_bytes = 9 [(tls_opts).fixed_length = 2];
  optional bytes var_bytes = 10 [(tls_opts).max_length = 16];
  optional bytes var_bytes2 = 11 [(tls_opts).min_length = 4,
                                  (tls_opts).max_length = 256];
  repeated bytes vector_bytes = 12 [(tls_opts).max_length = 10,
                                    (tls_opts).max_total_length = 20];
  repeated uint32 vector_uint32 = 13 [(tls_opts).min_total_length = 4,
                                      (tls_opts).max_total_length = 8];
  optional TestEnum test_enum = 14;
  optional uint32 select_uint32 = 15 [(tls_opts).select_field = "test_enum",
                                      (tls_opts).select_value = 1];
  optional EmbeddedMessage embedded_message = 16;
  repeated EmbeddedMessage repeated_message = 17
      [(tls_opts).max_total_length = 8];
}