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 (56 lines) | stat: -rw-r--r-- 1,478 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
syntax = "proto3";

package svc.token.v1;

import "google/protobuf/timestamp.proto";
import "types/v1/cursor.proto";
import "types/v1/environment_token.proto";

option go_package = "svc/token/v1;tokenv1";

service TokenService {
  rpc GenerateEnvironmentToken(GenerateEnvironmentTokenRequest) returns (GenerateEnvironmentTokenResponse) {}
  rpc RevokeEnvironmentToken(RevokeEnvironmentTokenRequest) returns (RevokeEnvironmentTokenResponse) {}
  rpc GetEnvironmentToken(GetEnvironmentTokenRequest) returns (GetEnvironmentTokenResponse) {}
  rpc ListEnvironmentToken(ListEnvironmentTokenRequest) returns (ListEnvironmentTokenResponse) {}
}

message GenerateEnvironmentTokenRequest {
  int64 environment_id = 1;
  google.protobuf.Timestamp expires_at = 2;
  repeated types.v1.EnvironmentRole roles = 3;
}

message GenerateEnvironmentTokenResponse {
  types.v1.EnvironmentToken token = 1;
}

message RevokeEnvironmentTokenRequest {
  int64 environment_id = 1;
  int64 token_id = 2;
}

message RevokeEnvironmentTokenResponse {}

message GetEnvironmentTokenRequest {
  int64 environment_id = 1;
  int64 token_id = 2;
}

message GetEnvironmentTokenResponse {
  types.v1.EnvironmentToken token = 1;
}

message ListEnvironmentTokenRequest {
  types.v1.Cursor cursor = 1;
  int32 limit = 2;
  int64 environment_id = 3;
}

message ListEnvironmentTokenResponse {
  types.v1.Cursor next = 1;
  message ListItem {
    types.v1.EnvironmentToken token = 1;
  }
  repeated ListItem items = 2;
}