1
proto/tokens/v1/service.proto

62 lines
1.2 KiB
Protocol Buffer
Raw Normal View History

2023-12-29 20:01:47 +00:00
// Copyright (C) 2023 The Licensing Authors
// SPDX-License-Identifier: MIT
//
// This file attempts to follow common styles and design patterns described by
// Google Cloud based on their extensive use of protocol buffers.
//
// - See here for more: https://cloud.google.com/apis/design/design_patterns
//
syntax = "proto3";
package tokens.v1;
import "google/api/annotations.proto";
message AuthenticateRequest {}
2023-12-29 22:15:52 +00:00
2023-12-29 20:01:47 +00:00
message AuthenticateResponse {}
message ListRequest {}
2023-12-29 22:15:52 +00:00
2023-12-29 20:01:47 +00:00
message ListResponse {}
message CreateRequest {}
2023-12-29 22:15:52 +00:00
2023-12-29 20:01:47 +00:00
message CreateResponse {}
2023-12-29 22:15:52 +00:00
message DeleteRequest {
string token_id = 1;
}
2023-12-29 20:01:47 +00:00
message DeleteResponse {}
service TokenService {
rpc Authenticate(AuthenticateRequest) returns (AuthenticateResponse) {
option (google.api.http) = {
post: "/v1/token"
body: "*"
};
};
rpc List(ListRequest) returns (ListResponse) {
option (google.api.http) = {
get: "/v1/tokens"
};
};
rpc Create(CreateRequest) returns (CreateResponse) {
option (google.api.http) = {
post: "/v1/tokens"
body: "*"
};
};
rpc Delete(DeleteRequest) returns (DeleteResponse) {
option (google.api.http) = {
delete: "/v1/tokens/{token_id}"
};
};
}