File: service.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 (66 lines) | stat: -rw-r--r-- 1,685 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
syntax = "proto3";

package svc.localhost.v1;

import "types/v1/localhost_config.proto";
import "types/v1/meta.proto";
import "types/v1/organization.proto";
import "types/v1/user.proto";
import "types/v1/version.proto";

option go_package = "svc/localhost/v1;localhostv1";

service LocalhostService {
  rpc Ping(PingRequest) returns (PingResponse);
  rpc DoLogin(DoLoginRequest) returns (DoLoginResponse);
  rpc DoLogout(DoLogoutRequest) returns (DoLogoutResponse);
  rpc DoUpdate(DoUpdateRequest) returns (DoUpdateResponse);
  rpc DoRestart(DoRestartRequest) returns (DoRestartResponse);

  rpc GetConfig(GetConfigRequest) returns (GetConfigResponse);
  rpc SetConfig(SetConfigRequest) returns (SetConfigResponse);
}

message PingRequest {}
message PingResponse {
  message UserDetails {
    types.v1.User user = 1;
    types.v1.Organization current_organization = 2;
    types.v1.Organization default_organization = 3;
  }

  types.v1.Version client_version = 1;
  string architecture = 2;
  string operating_system = 3;
  // logged_in_user is set if the CLI is logged in.
  // if the CLI is alive but not logged in, this field
  // is null
  UserDetails logged_in_user = 4;
  types.v1.ResMeta meta = 1000;
}

message DoLoginRequest {
  string returnToURL = 1;
}
message DoLoginResponse {}

message DoLogoutRequest {
  string returnToURL = 1;
}
message DoLogoutResponse {}

message DoUpdateRequest {}
message DoUpdateResponse {}

message DoRestartRequest {}
message DoRestartResponse {}

message GetConfigRequest {}
message GetConfigResponse {
  types.v1.LocalhostConfig config = 1;
}

message SetConfigRequest {
  types.v1.LocalhostConfig config = 1;
}
message SetConfigResponse {}