add: anowflake email kafka, refa: redis connectg

This commit is contained in:
wwweww
2026-02-25 01:16:13 +08:00
parent fdbcde13b2
commit 300058ad01
67 changed files with 3596 additions and 139 deletions
@@ -0,0 +1,46 @@
// Code generated by goctl. DO NOT EDIT.
// goctl 1.9.2
// Source: snowflake.proto
package snowflakeservice
import (
"context"
"juwan-backend/app/snowflake/rpc/snowflake"
"github.com/zeromicro/go-zero/zrpc"
"google.golang.org/grpc"
)
type (
NextIdReq = snowflake.NextIdReq
NextIdResp = snowflake.NextIdResp
NextIdsReq = snowflake.NextIdsReq
NextIdsResp = snowflake.NextIdsResp
SnowflakeService interface {
NextId(ctx context.Context, in *NextIdReq, opts ...grpc.CallOption) (*NextIdResp, error)
NextIds(ctx context.Context, in *NextIdsReq, opts ...grpc.CallOption) (*NextIdsResp, error)
}
defaultSnowflakeService struct {
cli zrpc.Client
}
)
func NewSnowflakeService(cli zrpc.Client) SnowflakeService {
return &defaultSnowflakeService{
cli: cli,
}
}
func (m *defaultSnowflakeService) NextId(ctx context.Context, in *NextIdReq, opts ...grpc.CallOption) (*NextIdResp, error) {
client := snowflake.NewSnowflakeServiceClient(m.cli.Conn())
return client.NextId(ctx, in, opts...)
}
func (m *defaultSnowflakeService) NextIds(ctx context.Context, in *NextIdsReq, opts ...grpc.CallOption) (*NextIdsResp, error) {
client := snowflake.NewSnowflakeServiceClient(m.cli.Conn())
return client.NextIds(ctx, in, opts...)
}