feat: api
This commit is contained in:
19
api/protos/conf/v1/kratos_conf_authn.proto
Normal file
19
api/protos/conf/v1/kratos_conf_authn.proto
Normal file
@@ -0,0 +1,19 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package conf;
|
||||
|
||||
option go_package = "github.com/tx7do/kratos-bootstrap/api/gen/go/conf/v1;conf";
|
||||
|
||||
import "google/protobuf/duration.proto";
|
||||
|
||||
// 认证
|
||||
message Authentication {
|
||||
// JWT
|
||||
message Jwt {
|
||||
string method = 1; // JWT签名的算法,支持算法:HS256
|
||||
string key = 2; // JWT 秘钥
|
||||
}
|
||||
|
||||
|
||||
optional Jwt jwt = 1;
|
||||
}
|
||||
11
api/protos/conf/v1/kratos_conf_authz.proto
Normal file
11
api/protos/conf/v1/kratos_conf_authz.proto
Normal file
@@ -0,0 +1,11 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package conf;
|
||||
|
||||
option go_package = "github.com/tx7do/kratos-bootstrap/api/gen/go/conf/v1;conf";
|
||||
|
||||
import "google/protobuf/duration.proto";
|
||||
|
||||
// 授权
|
||||
message Authorization {
|
||||
}
|
||||
@@ -13,16 +13,20 @@ import "conf/v1/kratos_conf_registry.proto";
|
||||
import "conf/v1/kratos_conf_oss.proto";
|
||||
import "conf/v1/kratos_conf_config.proto";
|
||||
import "conf/v1/kratos_conf_notify.proto";
|
||||
import "conf/v1/kratos_conf_authn.proto";
|
||||
import "conf/v1/kratos_conf_authz.proto";
|
||||
|
||||
// 引导信息
|
||||
message Bootstrap {
|
||||
Server server = 1;
|
||||
Client client = 2;
|
||||
Data data = 3;
|
||||
Tracer trace = 4;
|
||||
Logger logger = 5;
|
||||
Registry registry = 6;
|
||||
RemoteConfig config = 7;
|
||||
OSS oss = 8;
|
||||
Notification notify = 9;
|
||||
optional Server server = 1;
|
||||
optional Client client = 2;
|
||||
optional Data data = 3;
|
||||
optional Tracer trace = 4;
|
||||
optional Logger logger = 5;
|
||||
optional Registry registry = 6;
|
||||
optional RemoteConfig config = 7;
|
||||
optional OSS oss = 8;
|
||||
optional Notification notify = 9;
|
||||
optional Authentication authn = 10;
|
||||
optional Authorization authz = 11;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ option go_package = "github.com/tx7do/kratos-bootstrap/api/gen/go/conf/v1;conf";
|
||||
|
||||
import "google/protobuf/duration.proto";
|
||||
|
||||
// 中间件
|
||||
message Middleware {
|
||||
// JWT校验
|
||||
message Auth {
|
||||
|
||||
@@ -14,5 +14,5 @@ message Notification {
|
||||
string access_key_secret = 4; // 访问密钥
|
||||
}
|
||||
|
||||
SMS sms = 1;
|
||||
optional SMS sms = 1;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ option go_package = "github.com/tx7do/kratos-bootstrap/api/gen/go/conf/v1;conf";
|
||||
|
||||
import "conf/v1/kratos_conf_tls.proto";
|
||||
|
||||
// 对象存储
|
||||
message OSS {
|
||||
// MinIO
|
||||
message MinIO {
|
||||
@@ -21,5 +22,5 @@ message OSS {
|
||||
string download_host = 21; // 下载链接的主机名
|
||||
}
|
||||
|
||||
MinIO minio = 1;
|
||||
optional MinIO minio = 1;
|
||||
}
|
||||
|
||||
@@ -76,12 +76,12 @@ message Registry {
|
||||
|
||||
string type = 1;
|
||||
|
||||
Consul consul = 2; // Consul
|
||||
Etcd etcd = 3; // Etcd
|
||||
ZooKeeper zookeeper = 4; // ZooKeeper
|
||||
Nacos nacos = 5; // Nacos
|
||||
Kubernetes kubernetes = 6; // Kubernetes
|
||||
Eureka eureka = 7; // Eureka
|
||||
Polaris polaris = 8; // Polaris
|
||||
Servicecomb servicecomb = 9; // Servicecomb
|
||||
optional Consul consul = 2; // Consul
|
||||
optional Etcd etcd = 3; // Etcd
|
||||
optional ZooKeeper zookeeper = 4; // ZooKeeper
|
||||
optional Nacos nacos = 5; // Nacos
|
||||
optional Kubernetes kubernetes = 6; // Kubernetes
|
||||
optional Eureka eureka = 7; // Eureka
|
||||
optional Polaris polaris = 8; // Polaris
|
||||
optional Servicecomb servicecomb = 9; // Servicecomb
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ package conf;
|
||||
|
||||
option go_package = "github.com/tx7do/kratos-bootstrap/api/gen/go/conf/v1;conf";
|
||||
|
||||
// TLS配置
|
||||
message TLS {
|
||||
message File {
|
||||
optional string cert_path = 1;
|
||||
|
||||
Reference in New Issue
Block a user