Compare commits
4 Commits
api/v0.0.1
...
api/v0.0.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
22a04344d4 | ||
|
|
9e4e56bc2d | ||
|
|
411aabf0fa | ||
|
|
46bffc550a |
File diff suppressed because it is too large
Load Diff
@@ -40,6 +40,7 @@ type PagingRequest struct {
|
||||
NoPaging *bool `protobuf:"varint,6,opt,name=no_paging,json=noPaging,proto3,oneof" json:"no_paging,omitempty"`
|
||||
// 字段掩码,其作用为SELECT中的字段,其语法为使用逗号分隔字段名,例如:id,realName,userName。如果为空则选中所有字段,即SELECT *。
|
||||
FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,7,opt,name=field_mask,json=fieldMask,proto3,oneof" json:"field_mask,omitempty"`
|
||||
TenantId *uint32 `protobuf:"varint,8,opt,name=tenant_id,json=tenantId,proto3,oneof" json:"tenant_id,omitempty"` // 租户ID
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -123,6 +124,13 @@ func (x *PagingRequest) GetFieldMask() *fieldmaskpb.FieldMask {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *PagingRequest) GetTenantId() uint32 {
|
||||
if x != nil && x.TenantId != nil {
|
||||
return *x.TenantId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// 分页通用结果
|
||||
type PagingResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
@@ -188,7 +196,7 @@ var file_pagination_v1_pagination_proto_rawDesc = string([]byte{
|
||||
0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24,
|
||||
0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2f,
|
||||
0x76, 0x33, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd5, 0x08, 0x0a, 0x0d, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x52,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x22, 0x95, 0x09, 0x0a, 0x0d, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x05, 0x42, 0x1e, 0xba, 0x47, 0x1b, 0x8a, 0x02, 0x09, 0x09, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xf0, 0x3f, 0x92, 0x02, 0x0c, 0xe5, 0xbd, 0x93, 0xe5, 0x89, 0x8d, 0xe9, 0xa1,
|
||||
@@ -253,11 +261,15 @@ var file_pagination_v1_pagination_proto_rawDesc = string([]byte{
|
||||
0x89, 0xe4, 0xb8, 0xad, 0xe6, 0x89, 0x80, 0xe6, 0x9c, 0x89, 0xe5, 0xad, 0x97, 0xe6, 0xae, 0xb5,
|
||||
0xef, 0xbc, 0x8c, 0xe5, 0x8d, 0xb3, 0x53, 0x45, 0x4c, 0x45, 0x43, 0x54, 0x20, 0x2a, 0xe3, 0x80,
|
||||
0x82, 0x48, 0x05, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x88, 0x01,
|
||||
0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x70,
|
||||
0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x71, 0x75, 0x65,
|
||||
0x72, 0x79, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6f, 0x72, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x42,
|
||||
0x0c, 0x0a, 0x0a, 0x5f, 0x6e, 0x6f, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x42, 0x0d, 0x0a,
|
||||
0x0b, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x22, 0x3c, 0x0a, 0x0e,
|
||||
0x01, 0x12, 0x30, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x08,
|
||||
0x20, 0x01, 0x28, 0x0d, 0x42, 0x0e, 0xba, 0x47, 0x0b, 0x92, 0x02, 0x08, 0xe7, 0xa7, 0x9f, 0xe6,
|
||||
0x88, 0xb7, 0x49, 0x44, 0x48, 0x06, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64,
|
||||
0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x42, 0x0c, 0x0a, 0x0a,
|
||||
0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x71,
|
||||
0x75, 0x65, 0x72, 0x79, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6f, 0x72, 0x5f, 0x71, 0x75, 0x65, 0x72,
|
||||
0x79, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6e, 0x6f, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x42,
|
||||
0x0d, 0x0a, 0x0b, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x42, 0x0c,
|
||||
0x0a, 0x0a, 0x5f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x22, 0x3c, 0x0a, 0x0e,
|
||||
0x50, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14,
|
||||
0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74,
|
||||
0x6f, 0x74, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20,
|
||||
|
||||
@@ -139,20 +139,108 @@ message Server {
|
||||
|
||||
// Asynq
|
||||
message Asynq {
|
||||
string endpoint = 1; // 对端网络地址
|
||||
string password = 2; // redis登录密码
|
||||
int32 db = 3; // 数据库索引
|
||||
string location = 4; // 时区
|
||||
TLS tls = 5; // TLS配置
|
||||
bool enable_keep_alive = 6; // 启用心跳
|
||||
string network = 1; // Redis对端网络地址
|
||||
string endpoint = 2; // Redis对端网络地址
|
||||
string password = 3; // Redis登录密码
|
||||
int32 db = 4; // Redis数据库索引
|
||||
string uri = 5; // Redis URI
|
||||
int32 pool_size = 6; // Redis连接池大小
|
||||
|
||||
TLS tls = 7; // TLS配置
|
||||
string codec = 8; // 编解码器: json,xml,yaml...
|
||||
|
||||
string location = 10; // 时区
|
||||
int32 concurrency = 11; // 并发数
|
||||
int32 group_max_size = 12; // 组最大大小
|
||||
map<string, int32> queues = 13; // 队列
|
||||
|
||||
bool enable_keep_alive = 20; // 启用心跳
|
||||
bool enable_gracefully_shutdown = 21; // 优雅关闭
|
||||
bool enable_strict_priority = 22; // 严格优先级
|
||||
|
||||
google.protobuf.Duration shutdown_timeout = 30; // 关闭超时时间
|
||||
google.protobuf.Duration dial_timeout = 31; // 拨号超时时间
|
||||
google.protobuf.Duration read_timeout = 32; // 读取超时时间
|
||||
google.protobuf.Duration write_timeout = 33; // 写入超时时间
|
||||
|
||||
google.protobuf.Duration health_check_interval = 34; // 健康检查时间间隔
|
||||
google.protobuf.Duration delayed_task_check_interval = 35; // 延迟任务检查时间间隔
|
||||
google.protobuf.Duration group_grace_period = 36; // 组宽限期
|
||||
google.protobuf.Duration group_max_delay = 37; // 组最大延迟
|
||||
}
|
||||
|
||||
// Machinery
|
||||
message Machinery {
|
||||
repeated string brokers = 1; // broker的地址,可以根据实际使用的存储介质,分别指定Redis、AMQP或AWS SQS;
|
||||
repeated string backends = 2; // backend配置,用来指定存放结果的介质的配置。可以根据需求,分别指定为:Redis、memcached或mongodb等;
|
||||
TLS tls = 3; // TLS配置
|
||||
bool enable_keep_alive = 4; // 启用心跳
|
||||
string broker_type = 1; // broker类型,可以根据实际使用的存储介质,分别指定Redis、AMQP或AWS SQS;
|
||||
string broker_addr = 2; // broker的地址
|
||||
int32 broker_db = 3; // broker的数据库索引
|
||||
|
||||
string backend_type = 10; // backend类型,可以分别指定为:redis、memcached或mongodb等;
|
||||
string backend_addr = 11; // backend的地址
|
||||
int32 backend_db = 12; // backend的数据库索引
|
||||
|
||||
string lock_type = 20; // lock类型,可以分别指定为:redis、memcached或mongodb等;
|
||||
string lock_addr = 21; // lock的地址
|
||||
int32 lock_db = 22; // lock的数据库索引
|
||||
|
||||
string consumer_tag = 30; // 消费者标签
|
||||
int32 consumer_concurrency = 31; // 消费者并发数
|
||||
string consumer_queue = 32; // 消费者队列
|
||||
|
||||
TLS tls = 50; // TLS配置
|
||||
bool enable_keep_alive = 51; // 启用心跳
|
||||
string default_queue = 52; // 默认队列
|
||||
int32 results_expire_in = 53; // 结果过期时间
|
||||
bool no_unix_signals = 54; // 禁用Unix信号
|
||||
|
||||
message Redis {
|
||||
int32 max_idle = 1;
|
||||
int32 max_active = 2;
|
||||
int32 max_idle_timeout = 3;
|
||||
bool wait = 4;
|
||||
int32 read_timeout = 5;
|
||||
int32 write_timeout = 6;
|
||||
int32 connect_timeout = 7;
|
||||
int32 normal_tasks_poll_period = 8;
|
||||
int32 delayed_tasks_poll_period = 9;
|
||||
string delayed_tasks_key = 10;
|
||||
string master_name = 11;
|
||||
}
|
||||
Redis redis = 100; // Redis配置
|
||||
|
||||
message AMQP {
|
||||
string exchange = 1;
|
||||
string exchange_type = 2;
|
||||
map<string, string> queue_declare_args = 3;
|
||||
map<string, string> queue_binding_args = 4;
|
||||
string binding_key = 5;
|
||||
int32 prefetch_count = 6;
|
||||
bool auto_delete = 7;
|
||||
string delayed_queue = 8;
|
||||
}
|
||||
AMQP amqp = 101; // AMQP配置
|
||||
|
||||
message SQS {
|
||||
int32 receive_wait_time_seconds = 1;
|
||||
optional int32 receive_visibility_timeout = 2;
|
||||
}
|
||||
SQS sqs = 102; // SQS配置
|
||||
|
||||
message GCP {
|
||||
google.protobuf.Duration max_extension = 1;
|
||||
}
|
||||
GCP gcp = 103; // GCP配置
|
||||
|
||||
message MongoDB {
|
||||
string database = 1;
|
||||
}
|
||||
MongoDB mongodb = 104; // MongoDB配置
|
||||
|
||||
message DynamoDB {
|
||||
string task_states_table = 1;
|
||||
string group_metas_table = 2;
|
||||
}
|
||||
DynamoDB dynamodb = 105; // DynamoDB配置
|
||||
}
|
||||
|
||||
// SSE
|
||||
|
||||
@@ -70,6 +70,11 @@ message PagingRequest {
|
||||
example: {yaml : "id,realName,userName"}
|
||||
}
|
||||
];
|
||||
|
||||
optional uint32 tenant_id = 8 [
|
||||
(gnostic.openapi.v3.property) = {description: "租户ID"},
|
||||
json_name = "tenantId"
|
||||
]; // 租户ID
|
||||
}
|
||||
|
||||
// 分页通用结果
|
||||
|
||||
@@ -67,7 +67,6 @@ func initGrpcClientConfig(cfg *conf.Bootstrap, mds ...middleware.Middleware) []k
|
||||
options = append(options, kratosGrpc.WithTimeout(timeout))
|
||||
|
||||
var ms []middleware.Middleware
|
||||
ms = append(ms, mds...)
|
||||
if cfg.Client.Grpc.Middleware != nil {
|
||||
if cfg.Client.Grpc.Middleware.GetEnableRecovery() {
|
||||
ms = append(ms, recovery.Recovery())
|
||||
@@ -82,6 +81,8 @@ func initGrpcClientConfig(cfg *conf.Bootstrap, mds ...middleware.Middleware) []k
|
||||
ms = append(ms, metadata.Client())
|
||||
}
|
||||
}
|
||||
ms = append(ms, mds...)
|
||||
|
||||
options = append(options, kratosGrpc.WithMiddleware(ms...))
|
||||
|
||||
if cfg.Client.Grpc.Tls != nil {
|
||||
@@ -119,7 +120,6 @@ func initGrpcServerConfig(cfg *conf.Bootstrap, mds ...middleware.Middleware) []k
|
||||
var options []kratosGrpc.ServerOption
|
||||
|
||||
var ms []middleware.Middleware
|
||||
ms = append(ms, mds...)
|
||||
if cfg.Server.Grpc.Middleware != nil {
|
||||
if cfg.Server.Grpc.Middleware.GetEnableRecovery() {
|
||||
ms = append(ms, recovery.Recovery())
|
||||
@@ -144,6 +144,8 @@ func initGrpcServerConfig(cfg *conf.Bootstrap, mds ...middleware.Middleware) []k
|
||||
ms = append(ms, metadata.Server())
|
||||
}
|
||||
}
|
||||
ms = append(ms, mds...)
|
||||
|
||||
options = append(options, kratosGrpc.Middleware(ms...))
|
||||
|
||||
if cfg.Server.Grpc.Tls != nil {
|
||||
|
||||
@@ -53,7 +53,6 @@ func initRestConfig(cfg *conf.Bootstrap, mds ...middleware.Middleware) []kratosR
|
||||
}
|
||||
|
||||
var ms []middleware.Middleware
|
||||
ms = append(ms, mds...)
|
||||
if cfg.Server.Rest.Middleware != nil {
|
||||
if cfg.Server.Rest.Middleware.GetEnableRecovery() {
|
||||
ms = append(ms, recovery.Recovery())
|
||||
@@ -78,6 +77,8 @@ func initRestConfig(cfg *conf.Bootstrap, mds ...middleware.Middleware) []kratosR
|
||||
ms = append(ms, metadata.Server())
|
||||
}
|
||||
}
|
||||
ms = append(ms, mds...)
|
||||
|
||||
options = append(options, kratosRest.Middleware(ms...))
|
||||
|
||||
if cfg.Server.Rest.Network != "" {
|
||||
|
||||
4
tag.bat
4
tag.bat
@@ -1,4 +1,4 @@
|
||||
git tag api/v0.0.15 --force
|
||||
git tag api/v0.0.18 --force
|
||||
|
||||
git tag utils/v0.1.3 --force
|
||||
|
||||
@@ -7,7 +7,7 @@ git tag oss/minio/v0.0.9 --force
|
||||
git tag registry/v0.0.9 --force
|
||||
git tag config/v0.0.9 --force
|
||||
git tag logger/v0.0.9 --force
|
||||
git tag rpc/v0.0.12 --force
|
||||
git tag rpc/v0.0.13 --force
|
||||
git tag tracer/v0.0.9 --force
|
||||
|
||||
git tag database/ent/v0.0.9 --force
|
||||
|
||||
Reference in New Issue
Block a user