This commit is contained in:
2024-10-12 20:41:55 +08:00
parent 8c09120db6
commit 597e4f1b89
75 changed files with 5009 additions and 823 deletions

View File

@@ -22,6 +22,7 @@ type (
DeleteSecretRequest = sentinel.DeleteSecretRequest
DeleteUserProductRequest = sentinel.DeleteUserProductRequest
DeleteWhitelistRequest = sentinel.DeleteWhitelistRequest
GetRecordByCodeRequest = sentinel.GetRecordByCodeRequest
GetRecordByIdRequest = sentinel.GetRecordByIdRequest
GetSecretBySecretIdRequest = sentinel.GetSecretBySecretIdRequest
MatchResponse = sentinel.MatchResponse
@@ -51,6 +52,7 @@ type (
DeleteProduct(ctx context.Context, in *DeleteProductRequest, opts ...grpc.CallOption) (*Product, error)
GetProductPageList(ctx context.Context, in *PageListRequest, opts ...grpc.CallOption) (*ProductResponse, error)
GetProductById(ctx context.Context, in *GetRecordByIdRequest, opts ...grpc.CallOption) (*Product, error)
GetProductByCode(ctx context.Context, in *GetRecordByCodeRequest, opts ...grpc.CallOption) (*Product, error)
}
defaultProductZrpcClient struct {
@@ -89,3 +91,8 @@ func (m *defaultProductZrpcClient) GetProductById(ctx context.Context, in *GetRe
client := sentinel.NewProductClient(m.cli.Conn())
return client.GetProductById(ctx, in, opts...)
}
func (m *defaultProductZrpcClient) GetProductByCode(ctx context.Context, in *GetRecordByCodeRequest, opts ...grpc.CallOption) (*Product, error) {
client := sentinel.NewProductClient(m.cli.Conn())
return client.GetProductByCode(ctx, in, opts...)
}