-
Notifications
You must be signed in to change notification settings - Fork 795
Expand file tree
/
Copy pathclient.go
More file actions
109 lines (90 loc) · 6.95 KB
/
Copy pathclient.go
File metadata and controls
109 lines (90 loc) · 6.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
// Code generated by Kitex v0.13.1. DO NOT EDIT.
package evalopenapiservice
import (
"context"
client "github.com/cloudwego/kitex/client"
callopt "github.com/cloudwego/kitex/client/callopt"
openapi "github.com/coze-dev/coze-loop/backend/kitex_gen/coze/loop/evaluation/openapi"
)
// Client is designed to provide IDL-compatible methods with call-option parameter for kitex framework.
type Client interface {
CreateEvaluationSetOApi(ctx context.Context, req *openapi.CreateEvaluationSetOApiRequest, callOptions ...callopt.Option) (r *openapi.CreateEvaluationSetOApiResponse, err error)
GetEvaluationSetOApi(ctx context.Context, req *openapi.GetEvaluationSetOApiRequest, callOptions ...callopt.Option) (r *openapi.GetEvaluationSetOApiResponse, err error)
ListEvaluationSetsOApi(ctx context.Context, req *openapi.ListEvaluationSetsOApiRequest, callOptions ...callopt.Option) (r *openapi.ListEvaluationSetsOApiResponse, err error)
CreateEvaluationSetVersionOApi(ctx context.Context, req *openapi.CreateEvaluationSetVersionOApiRequest, callOptions ...callopt.Option) (r *openapi.CreateEvaluationSetVersionOApiResponse, err error)
ListEvaluationSetVersionsOApi(ctx context.Context, req *openapi.ListEvaluationSetVersionsOApiRequest, callOptions ...callopt.Option) (r *openapi.ListEvaluationSetVersionsOApiResponse, err error)
BatchCreateEvaluationSetItemsOApi(ctx context.Context, req *openapi.BatchCreateEvaluationSetItemsOApiRequest, callOptions ...callopt.Option) (r *openapi.BatchCreateEvaluationSetItemsOApiResponse, err error)
BatchUpdateEvaluationSetItemsOApi(ctx context.Context, req *openapi.BatchUpdateEvaluationSetItemsOApiRequest, callOptions ...callopt.Option) (r *openapi.BatchUpdateEvaluationSetItemsOApiResponse, err error)
BatchDeleteEvaluationSetItemsOApi(ctx context.Context, req *openapi.BatchDeleteEvaluationSetItemsOApiRequest, callOptions ...callopt.Option) (r *openapi.BatchDeleteEvaluationSetItemsOApiResponse, err error)
ListEvaluationSetVersionItemsOApi(ctx context.Context, req *openapi.ListEvaluationSetVersionItemsOApiRequest, callOptions ...callopt.Option) (r *openapi.ListEvaluationSetVersionItemsOApiResponse, err error)
UpdateEvaluationSetSchemaOApi(ctx context.Context, req *openapi.UpdateEvaluationSetSchemaOApiRequest, callOptions ...callopt.Option) (r *openapi.UpdateEvaluationSetSchemaOApiResponse, err error)
ReportEvalTargetInvokeResult_(ctx context.Context, req *openapi.ReportEvalTargetInvokeResultRequest, callOptions ...callopt.Option) (r *openapi.ReportEvalTargetInvokeResultResponse, err error)
}
// NewClient creates a client for the service defined in IDL.
func NewClient(destService string, opts ...client.Option) (Client, error) {
var options []client.Option
options = append(options, client.WithDestService(destService))
options = append(options, opts...)
kc, err := client.NewClient(serviceInfo(), options...)
if err != nil {
return nil, err
}
return &kEvalOpenAPIServiceClient{
kClient: newServiceClient(kc),
}, nil
}
// MustNewClient creates a client for the service defined in IDL. It panics if any error occurs.
func MustNewClient(destService string, opts ...client.Option) Client {
kc, err := NewClient(destService, opts...)
if err != nil {
panic(err)
}
return kc
}
type kEvalOpenAPIServiceClient struct {
*kClient
}
func (p *kEvalOpenAPIServiceClient) CreateEvaluationSetOApi(ctx context.Context, req *openapi.CreateEvaluationSetOApiRequest, callOptions ...callopt.Option) (r *openapi.CreateEvaluationSetOApiResponse, err error) {
ctx = client.NewCtxWithCallOptions(ctx, callOptions)
return p.kClient.CreateEvaluationSetOApi(ctx, req)
}
func (p *kEvalOpenAPIServiceClient) GetEvaluationSetOApi(ctx context.Context, req *openapi.GetEvaluationSetOApiRequest, callOptions ...callopt.Option) (r *openapi.GetEvaluationSetOApiResponse, err error) {
ctx = client.NewCtxWithCallOptions(ctx, callOptions)
return p.kClient.GetEvaluationSetOApi(ctx, req)
}
func (p *kEvalOpenAPIServiceClient) ListEvaluationSetsOApi(ctx context.Context, req *openapi.ListEvaluationSetsOApiRequest, callOptions ...callopt.Option) (r *openapi.ListEvaluationSetsOApiResponse, err error) {
ctx = client.NewCtxWithCallOptions(ctx, callOptions)
return p.kClient.ListEvaluationSetsOApi(ctx, req)
}
func (p *kEvalOpenAPIServiceClient) CreateEvaluationSetVersionOApi(ctx context.Context, req *openapi.CreateEvaluationSetVersionOApiRequest, callOptions ...callopt.Option) (r *openapi.CreateEvaluationSetVersionOApiResponse, err error) {
ctx = client.NewCtxWithCallOptions(ctx, callOptions)
return p.kClient.CreateEvaluationSetVersionOApi(ctx, req)
}
func (p *kEvalOpenAPIServiceClient) ListEvaluationSetVersionsOApi(ctx context.Context, req *openapi.ListEvaluationSetVersionsOApiRequest, callOptions ...callopt.Option) (r *openapi.ListEvaluationSetVersionsOApiResponse, err error) {
ctx = client.NewCtxWithCallOptions(ctx, callOptions)
return p.kClient.ListEvaluationSetVersionsOApi(ctx, req)
}
func (p *kEvalOpenAPIServiceClient) BatchCreateEvaluationSetItemsOApi(ctx context.Context, req *openapi.BatchCreateEvaluationSetItemsOApiRequest, callOptions ...callopt.Option) (r *openapi.BatchCreateEvaluationSetItemsOApiResponse, err error) {
ctx = client.NewCtxWithCallOptions(ctx, callOptions)
return p.kClient.BatchCreateEvaluationSetItemsOApi(ctx, req)
}
func (p *kEvalOpenAPIServiceClient) BatchUpdateEvaluationSetItemsOApi(ctx context.Context, req *openapi.BatchUpdateEvaluationSetItemsOApiRequest, callOptions ...callopt.Option) (r *openapi.BatchUpdateEvaluationSetItemsOApiResponse, err error) {
ctx = client.NewCtxWithCallOptions(ctx, callOptions)
return p.kClient.BatchUpdateEvaluationSetItemsOApi(ctx, req)
}
func (p *kEvalOpenAPIServiceClient) BatchDeleteEvaluationSetItemsOApi(ctx context.Context, req *openapi.BatchDeleteEvaluationSetItemsOApiRequest, callOptions ...callopt.Option) (r *openapi.BatchDeleteEvaluationSetItemsOApiResponse, err error) {
ctx = client.NewCtxWithCallOptions(ctx, callOptions)
return p.kClient.BatchDeleteEvaluationSetItemsOApi(ctx, req)
}
func (p *kEvalOpenAPIServiceClient) ListEvaluationSetVersionItemsOApi(ctx context.Context, req *openapi.ListEvaluationSetVersionItemsOApiRequest, callOptions ...callopt.Option) (r *openapi.ListEvaluationSetVersionItemsOApiResponse, err error) {
ctx = client.NewCtxWithCallOptions(ctx, callOptions)
return p.kClient.ListEvaluationSetVersionItemsOApi(ctx, req)
}
func (p *kEvalOpenAPIServiceClient) UpdateEvaluationSetSchemaOApi(ctx context.Context, req *openapi.UpdateEvaluationSetSchemaOApiRequest, callOptions ...callopt.Option) (r *openapi.UpdateEvaluationSetSchemaOApiResponse, err error) {
ctx = client.NewCtxWithCallOptions(ctx, callOptions)
return p.kClient.UpdateEvaluationSetSchemaOApi(ctx, req)
}
func (p *kEvalOpenAPIServiceClient) ReportEvalTargetInvokeResult_(ctx context.Context, req *openapi.ReportEvalTargetInvokeResultRequest, callOptions ...callopt.Option) (r *openapi.ReportEvalTargetInvokeResultResponse, err error) {
ctx = client.NewCtxWithCallOptions(ctx, callOptions)
return p.kClient.ReportEvalTargetInvokeResult_(ctx, req)
}