mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-07-10 03:56:59 +00:00
feat(rpc): add rpcs
This commit is contained in:
parent
cdafaa90db
commit
f31b32c54a
15 changed files with 516 additions and 0 deletions
39
src/rpc/auth/client/BUILD.bazel
Normal file
39
src/rpc/auth/client/BUILD.bazel
Normal file
|
@ -0,0 +1,39 @@
|
|||
load("@rules_proto//proto:defs.bzl", "proto_library")
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
|
||||
load("@rules_typescript_proto//:index.bzl", "typescript_proto_library")
|
||||
|
||||
proto_library(
|
||||
name = "client_proto",
|
||||
srcs = ["auth-client.proto"],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//src/rpc/auth:auth_proto",
|
||||
"//src/rpc/shared:shared_proto",
|
||||
"@com_google_protobuf//:empty_proto",
|
||||
],
|
||||
)
|
||||
|
||||
go_proto_library(
|
||||
name = "client_go_proto",
|
||||
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
|
||||
importpath = "github.com/roleypoly/roleypoly/src/auth/client",
|
||||
proto = ":client_proto",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//src/rpc/auth",
|
||||
"//src/rpc/shared",
|
||||
],
|
||||
)
|
||||
|
||||
go_library(
|
||||
name = "client",
|
||||
embed = [":client_go_proto"],
|
||||
importpath = "github.com/roleypoly/roleypoly/src/auth/client",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
typescript_proto_library(
|
||||
name = "ts",
|
||||
proto = ":client_proto",
|
||||
)
|
15
src/rpc/auth/client/auth-client.proto
Normal file
15
src/rpc/auth/client/auth-client.proto
Normal file
|
@ -0,0 +1,15 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package roleypoly.auth.client;
|
||||
option go_package = "github.com/roleypoly/roleypoly/src/auth/client";
|
||||
|
||||
import "src/rpc/shared/internal.proto";
|
||||
import "google/protobuf/empty.proto";
|
||||
import "src/rpc/auth/shared.proto";
|
||||
|
||||
service AuthClient {
|
||||
rpc GetClientToken(google.protobuf.Empty) returns (roleypoly.auth.Token) {}
|
||||
rpc GetUserSession(google.protobuf.Empty) returns (roleypoly.RoleypolySession) {}
|
||||
rpc ResolveSessionKey(roleypoly.auth.Token) returns (roleypoly.auth.Token) {}
|
||||
rpc AuthorizeChallenge(roleypoly.auth.AuthChallenge) returns (roleypoly.auth.Token) {}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue