19 lines
425 B
Go
19 lines
425 B
Go
|
package mock
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"io"
|
||
|
|
||
|
"github.com/influxdata/platform"
|
||
|
)
|
||
|
|
||
|
// WriteService writes data read from the reader.
|
||
|
type WriteService struct {
|
||
|
WriteF func(context.Context, platform.ID, platform.ID, io.Reader) error
|
||
|
}
|
||
|
|
||
|
// Write calls the mocked WriteF function with arguments.
|
||
|
func (s *WriteService) Write(ctx context.Context, org, bucket platform.ID, r io.Reader) error {
|
||
|
return s.WriteF(ctx, org, bucket, r)
|
||
|
}
|