53d203ee14
CI / changes (push) Successful in 14s
CI / docker-bff (push) Successful in 3s
CI / docker-product (push) Successful in 24s
CI / docker-admin (push) Has been skipped
CI / docker-user (push) Has been skipped
CI / docker-ad (push) Has been skipped
CI / docker-chore (push) Successful in 25s
CI / docker-express (push) Has been skipped
CI / docker-sale (push) Successful in 26s
71 lines
2.3 KiB
Go
71 lines
2.3 KiB
Go
// Code generated by goctl. DO NOT EDIT.
|
|
// goctl 1.10.1
|
|
// Source: chore.proto
|
|
|
|
package choreClient
|
|
|
|
import (
|
|
"context"
|
|
|
|
"lone-services/rpc/chore/pb"
|
|
|
|
"github.com/zeromicro/go-zero/zrpc"
|
|
"google.golang.org/grpc"
|
|
)
|
|
|
|
type (
|
|
DecryptMobileReq = chore.DecryptMobileReq
|
|
PolicyReq = chore.PolicyReq
|
|
RegionItem = chore.RegionItem
|
|
RegionsByIdsData = chore.RegionsByIdsData
|
|
RegionsByIdsReq = chore.RegionsByIdsReq
|
|
RegionsReq = chore.RegionsReq
|
|
Response = chore.Response
|
|
TestReq = chore.TestReq
|
|
|
|
Chore interface {
|
|
Policy(ctx context.Context, in *PolicyReq, opts ...grpc.CallOption) (*Response, error)
|
|
Test(ctx context.Context, in *TestReq, opts ...grpc.CallOption) (*Response, error)
|
|
DecryptMobile(ctx context.Context, in *DecryptMobileReq, opts ...grpc.CallOption) (*Response, error)
|
|
Regions(ctx context.Context, in *RegionsReq, opts ...grpc.CallOption) (*Response, error)
|
|
// 服务间调用:按 id 批量查地区名称
|
|
RegionsByIds(ctx context.Context, in *RegionsByIdsReq, opts ...grpc.CallOption) (*RegionsByIdsData, error)
|
|
}
|
|
|
|
defaultChore struct {
|
|
cli zrpc.Client
|
|
}
|
|
)
|
|
|
|
func NewChore(cli zrpc.Client) Chore {
|
|
return &defaultChore{
|
|
cli: cli,
|
|
}
|
|
}
|
|
|
|
func (m *defaultChore) Policy(ctx context.Context, in *PolicyReq, opts ...grpc.CallOption) (*Response, error) {
|
|
client := chore.NewChoreClient(m.cli.Conn())
|
|
return client.Policy(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultChore) Test(ctx context.Context, in *TestReq, opts ...grpc.CallOption) (*Response, error) {
|
|
client := chore.NewChoreClient(m.cli.Conn())
|
|
return client.Test(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultChore) DecryptMobile(ctx context.Context, in *DecryptMobileReq, opts ...grpc.CallOption) (*Response, error) {
|
|
client := chore.NewChoreClient(m.cli.Conn())
|
|
return client.DecryptMobile(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultChore) Regions(ctx context.Context, in *RegionsReq, opts ...grpc.CallOption) (*Response, error) {
|
|
client := chore.NewChoreClient(m.cli.Conn())
|
|
return client.Regions(ctx, in, opts...)
|
|
}
|
|
|
|
// 服务间调用:按 id 批量查地区名称
|
|
func (m *defaultChore) RegionsByIds(ctx context.Context, in *RegionsByIdsReq, opts ...grpc.CallOption) (*RegionsByIdsData, error) {
|
|
client := chore.NewChoreClient(m.cli.Conn())
|
|
return client.RegionsByIds(ctx, in, opts...)
|
|
}
|