File: localhost_config.proto

package info (click to toggle)
golang-github-humanlogio-api 0.0~git20250305.fa41d14-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,352 kB
  • sloc: sh: 45; makefile: 8
file content (137 lines) | stat: -rw-r--r-- 2,977 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
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
syntax = "proto3";

package types.v1;

import "google/protobuf/struct.proto";

option go_package = "types/v1;typesv1";

message FormatConfig {
  message Color {
    string html_hex_color = 1;
  }
  message Style {
    Color foreground = 1;
    optional Color background = 2;
    // ANSI text formatting
    optional bool bold = 300;
    optional bool italic = 301;
    optional bool faint = 302;
    optional bool blink = 303;
    optional bool strikethrough = 304;
    optional bool underline = 305;
  }
  message NullStyle {
    Style style = 1;
    string content = 2;
  }
  message LevelStyle {
    Style debug = 100;
    Style info = 200;
    Style warn = 300;
    Style error = 400;
    Style panic = 500;
    Style fatal = 600;
    Style unknown = 700;
  }
  message Theme {
    Style key = 1;
    Style value = 2;
    Style time = 3;
    Style msg = 4;
    LevelStyle levels = 5;
    // how to style messages that are missing
    Style absent_msg = 6;
    Style absent_time = 7;
  }

  message Themes {
    Theme light = 1;
    Theme dark = 2;
  }

  message Truncation {
    int64 length = 1;
  }
  message Time {
    optional string format = 1;
    optional string timezone = 2;
    optional string absent_default_value = 3;
  }
  message Message {
    optional string absent_default_value = 1;
  }
  enum ColorMode {
    COLORMODE_AUTO = 0;
    COLORMODE_ENABLED = 1;
    COLORMODE_DISABLED = 2;
  }

  Themes themes = 1;
  repeated string skip_fields = 2;
  repeated string keep_fields = 3;
  optional bool sort_longest = 4;
  optional bool skip_unchanged = 5;
  optional Truncation truncation = 6;
  optional Time time = 7;
  optional Message message = 8;
  optional ColorMode terminal_color_mode = 9;
}

message ParseConfig {
  message Time {
    repeated string field_names = 1;
  }
  message Message {
    repeated string field_names = 1;
  }
  message Level {
    repeated string field_names = 1;
  }
  Time timestamp = 1;
  Message message = 2;
  Level level = 3;
}

message ServeLocalhostConfig {
  int64 port = 1;
  string engine = 2;
  google.protobuf.Struct engine_config = 3;
  optional bool show_in_systray = 4;
  optional string log_dir = 5;
}

message RuntimeConfig {
  message Features {}
  message ExperimentalFeatures {
    optional string release_channel = 1;
    optional bool send_logs_to_cloud = 2;
    optional ServeLocalhostConfig serve_localhost = 3;
  }
  message ClientConfig {
    enum HTTPProtocol {
      HTTP2 = 0;
      HTTP1 = 1;
    }
    enum RPCProtocol {
      GRPC = 0;
      GRPC_WEB = 1;
      PROTOJSON = 2;
    }
    optional HTTPProtocol http_protocol = 1;
    optional RPCProtocol rpc_protocol = 2;
  }
  optional bool interrupt = 1;
  optional bool skip_check_for_updates = 2;
  Features features = 3;
  ExperimentalFeatures experimental_features = 4;
  ClientConfig api_client = 5;
}

message LocalhostConfig {
  int64 version = 1;

  FormatConfig formatter = 2;
  ParseConfig parser = 3;
  RuntimeConfig runtime = 4;
}