
* build: add goimports to fmt target to remove unused imports * feat: update codegen template to support returning raw response body * feat: add support for gunzip-ing response bodies * refactor: remove unused piece from codegen return values
23 lines
447 B
Go
23 lines
447 B
Go
package mock
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/influxdata/influx-cli/v2/internal/api"
|
|
)
|
|
|
|
var _ api.WriteApi = (*WriteApi)(nil)
|
|
|
|
type WriteApi struct {
|
|
PostWriteExecuteFn func(api.ApiPostWriteRequest) error
|
|
}
|
|
|
|
func (w *WriteApi) PostWrite(context.Context) api.ApiPostWriteRequest {
|
|
return api.ApiPostWriteRequest{
|
|
ApiService: w,
|
|
}
|
|
}
|
|
func (w *WriteApi) PostWriteExecute(req api.ApiPostWriteRequest) error {
|
|
return w.PostWriteExecuteFn(req)
|
|
}
|