Files
lone-services/admin/proto/admin.proto
T
gjs 44c4aed22e
CI / changes (push) Successful in 2s
CI / docker-bff (push) Successful in 1s
CI / docker-product (push) Has been skipped
service apis edit, info, items, status, names
2026-08-11 10:35:29 +08:00

165 lines
3.2 KiB
Protocol Buffer

syntax = "proto3";
package admin;
option go_package="./admin";
import "google/api/annotations.proto";
message AdminEditRequest {
int64 id = 1;
string name = 2;
string password = 3;
string avatar = 4;
string phone = 5;
string email = 6;
repeated int64 roles = 7;
}
message StatusRequest {
int64 id = 1 ;
int32 status = 2 ;
string reason = 3;
}
message Response {
int32 code = 1;
string msg = 2;
string data = 3;
}
message PasswordRequest {
int64 id = 1;
string password = 2;
}
message OwnPasswordRequest {
string password = 1;
}
message AdminInfoRequest {
int64 id = 1;
}
message AdminItemsRequest {
int32 page = 1;
int32 size = 2;
string phone = 3;
string name = 5;
string email = 6;
int32 status = 7;
}
message AdminLoginRequest {
string username = 1;
string password = 2;
}
message AdminEmptyRequest {
}
message InfoRequest {
int64 id = 1;
}
message ServiceEditRequest {
int64 id = 1;
string name = 2;
string description = 3;
}
message ServiceItemsRequest {
string name = 1;
int32 status = 2;
}
message ServiceNameRequest {
string name = 1;
}
service Admin {
rpc AdminEdit(AdminEditRequest) returns(Response){
option (google.api.http) = {
post: "/admin/v3/admin/edit"
body: "*"
};
};
rpc AdminStatus(StatusRequest) returns(Response){
option (google.api.http) = {
post: "/admin/v3/admin/status"
body: "*"
};
};
rpc Password(PasswordRequest) returns(Response){
option (google.api.http) = {
post: "/admin/v3/admin/password"
body: "*"
};
};
rpc OwnPassword(OwnPasswordRequest) returns(Response){
option (google.api.http) = {
post: "/admin/v3/admin/own-password"
body: "*"
};
};
rpc AdminInfo(AdminInfoRequest) returns(Response){
option (google.api.http) = {
get: "/admin/v3/admin/info"
body: "*"
};
};
rpc AdminItems(AdminItemsRequest) returns(Response){
option (google.api.http) = {
get: "/admin/v3/admin/items"
body: "*"
};
};
rpc AdminLogin(AdminLoginRequest) returns(Response){
option (google.api.http) = {
post: "/admin/v3/login"
body: "*"
};
};
rpc AdminRefresh(AdminEmptyRequest) returns(Response){
option (google.api.http) = {
post: "/admin/v3/refresh"
body: "*"
};
};
rpc LoginInfo(AdminEmptyRequest) returns(Response){
option (google.api.http) = {
post: "/admin/v3/info"
body: "*"
};
};
rpc ServiceInfo(InfoRequest) returns(Response){
option (google.api.http) = {
post: "/admin/v3/service/info"
body: "*"
};
};
rpc ServiceEdit(ServiceEditRequest) returns(Response){
option (google.api.http) = {
post: "/admin/v3/service/edit"
body: "*"
};
};
rpc ServiceItems(ServiceItemsRequest) returns(Response){
option (google.api.http) = {
post: "/admin/v3/service/items"
body: "*"
};
};
rpc ServiceStatus(StatusRequest) returns(Response){
option (google.api.http) = {
post: "/admin/v3/service/status"
body: "*"
};
};
rpc ServiceNames(ServiceNameRequest) returns(Response){
option (google.api.http) = {
post: "/admin/v3/service/names"
body: "*"
};
};
}