feat: implemented service/transport/main layers
This commit is contained in:
parent
5158c5d7c9
commit
bcb9ace54c
29 changed files with 804 additions and 393 deletions
|
|
@ -32,7 +32,7 @@ type Invoker interface {
|
|||
// Perform preidction.
|
||||
//
|
||||
// POST /api/v1/prediction
|
||||
PerformPrediction(ctx context.Context, request OptParameters, params PerformPredictionParams) (*Result, error)
|
||||
PerformPrediction(ctx context.Context, request OptPredictionParameters, params PerformPredictionParams) (*PredictionResult, error)
|
||||
}
|
||||
|
||||
// Client implements OAS client.
|
||||
|
|
@ -87,12 +87,12 @@ func (c *Client) requestURL(ctx context.Context) *url.URL {
|
|||
// Perform preidction.
|
||||
//
|
||||
// POST /api/v1/prediction
|
||||
func (c *Client) PerformPrediction(ctx context.Context, request OptParameters, params PerformPredictionParams) (*Result, error) {
|
||||
func (c *Client) PerformPrediction(ctx context.Context, request OptPredictionParameters, params PerformPredictionParams) (*PredictionResult, error) {
|
||||
res, err := c.sendPerformPrediction(ctx, request, params)
|
||||
return res, err
|
||||
}
|
||||
|
||||
func (c *Client) sendPerformPrediction(ctx context.Context, request OptParameters, params PerformPredictionParams) (res *Result, err error) {
|
||||
func (c *Client) sendPerformPrediction(ctx context.Context, request OptPredictionParameters, params PerformPredictionParams) (res *PredictionResult, err error) {
|
||||
otelAttrs := []attribute.KeyValue{
|
||||
otelogen.OperationID("performPrediction"),
|
||||
semconv.HTTPRequestMethodKey.String("POST"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue