| 1 | package rethinkdbscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ |
| 2 | |
| 3 | import ( |
| 4 | "github.com/stretchr/testify/mockscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/" |
| 5 | "ioscip-go gomod github.com/golang/go/src go1.14 io/" |
| 6 | "netscip-go gomod github.com/golang/go/src go1.14 net/" |
| 7 | "timescip-go gomod github.com/golang/go/src go1.14 time/" |
| 8 | ) |
| 9 | |
| 10 | type connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock# struct { |
| 11 | mockscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/.Mockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#Mock. |
| 12 | donescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#done. <-chan struct{} |
| 13 | doneSetscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#doneSet. chan struct{} |
| 14 | } |
| 15 | |
| 16 | func (m *connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#) setDonescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#setDone().(done <-chan struct{}) { |
| 17 | m.donescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#done. = done |
| 18 | close(m.doneSetscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#doneSet.) |
| 19 | } |
| 20 | |
| 21 | func (m *connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#) waitDialscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDial().() { |
| 22 | <-m.doneSetscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#doneSet. |
| 23 | } |
| 24 | |
| 25 | func (m *connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#) waitDonescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDone().() { |
| 26 | <-m.donescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#done. |
| 27 | } |
| 28 | |
| 29 | func (m *connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#) onCloseReturnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#onCloseReturn().(err error) { |
| 30 | closeChan := make(chan struct{}) |
| 31 | m.doneSetscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#doneSet. = make(chan struct{}) |
| 32 | // Maybe - Connection can be closed by Close() before Read() occurs when stopReadChan closed |
| 33 | m.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Read", respHeaderLenscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/respHeaderLen.).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(nil, 0, ioscip-go gomod github.com/golang/go/src go1.14 io/.EOFscip-go gomod github.com/golang/go/src go1.14 io/EOF., nil).Maybescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Maybe().().Runscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Run().(func(args mockscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/.Argumentsscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Arguments#) { |
| 34 | <-closeChan |
| 35 | }) |
| 36 | m.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Close").Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(err).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().().Runscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Run().(func(args mockscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/.Argumentsscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Arguments#) { |
| 37 | close(closeChan) |
| 38 | }) |
| 39 | } |
| 40 | |
| 41 | func (m *connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#) Readscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#Read().(b []byte) (n int, err error) { |
| 42 | args := m.Calledscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#Called().(len(b)) |
| 43 | rbuf, ok := args.Getscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Arguments#Get().(0).([]byte) |
| 44 | if ok { |
| 45 | copy(b, rbuf) |
| 46 | } |
| 47 | timeout := args.Getscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Arguments#Get().(3) |
| 48 | if timeout != nil { |
| 49 | timescip-go gomod github.com/golang/go/src go1.14 time/.Sleepscip-go gomod github.com/golang/go/src go1.14 time/Sleep().(timeout.(timescip-go gomod github.com/golang/go/src go1.14 time/.Durationscip-go gomod github.com/golang/go/src go1.14 time/Duration#)) |
| 50 | } |
| 51 | return args.Intscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Arguments#Int().(1), args.Errorscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Arguments#Error().(2) |
| 52 | } |
| 53 | |
| 54 | func (m *connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#) Writescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#Write().(b []byte) (n int, err error) { |
| 55 | args := m.Calledscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#Called().(b) |
| 56 | timeout := args.Getscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Arguments#Get().(2) |
| 57 | if timeout != nil { |
| 58 | timescip-go gomod github.com/golang/go/src go1.14 time/.Sleepscip-go gomod github.com/golang/go/src go1.14 time/Sleep().(timeout.(timescip-go gomod github.com/golang/go/src go1.14 time/.Durationscip-go gomod github.com/golang/go/src go1.14 time/Duration#)) |
| 59 | } |
| 60 | return args.Intscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Arguments#Int().(0), args.Errorscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Arguments#Error().(1) |
| 61 | } |
| 62 | |
| 63 | func (m *connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#) Closescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#Close().() error { |
| 64 | args := m.Calledscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#Called().() |
| 65 | return args.Errorscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Arguments#Error().(0) |
| 66 | } |
| 67 | |
| 68 | func (m *connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#) LocalAddrscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#LocalAddr().() netscip-go gomod github.com/golang/go/src go1.14 net/.Addrscip-go gomod github.com/golang/go/src go1.14 net/Addr# { |
| 69 | args := m.Calledscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#Called().() |
| 70 | return args.Getscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Arguments#Get().(0).(netscip-go gomod github.com/golang/go/src go1.14 net/.Addrscip-go gomod github.com/golang/go/src go1.14 net/Addr#) |
| 71 | } |
| 72 | |
| 73 | func (m *connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#) RemoteAddrscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#RemoteAddr().() netscip-go gomod github.com/golang/go/src go1.14 net/.Addrscip-go gomod github.com/golang/go/src go1.14 net/Addr# { |
| 74 | args := m.Calledscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#Called().() |
| 75 | return args.Getscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Arguments#Get().(0).(netscip-go gomod github.com/golang/go/src go1.14 net/.Addrscip-go gomod github.com/golang/go/src go1.14 net/Addr#) |
| 76 | } |
| 77 | |
| 78 | func (m *connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#) SetDeadlinescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#SetDeadline().(t timescip-go gomod github.com/golang/go/src go1.14 time/.Timescip-go gomod github.com/golang/go/src go1.14 time/Time#) error { |
| 79 | args := m.Calledscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#Called().() |
| 80 | return args.Errorscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Arguments#Error().(0) |
| 81 | } |
| 82 | |
| 83 | func (m *connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#) SetReadDeadlinescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#SetReadDeadline().(t timescip-go gomod github.com/golang/go/src go1.14 time/.Timescip-go gomod github.com/golang/go/src go1.14 time/Time#) error { |
| 84 | args := m.Calledscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#Called().() |
| 85 | return args.Errorscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Arguments#Error().(0) |
| 86 | } |
| 87 | |
| 88 | func (m *connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#) SetWriteDeadlinescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#SetWriteDeadline().(t timescip-go gomod github.com/golang/go/src go1.14 time/.Timescip-go gomod github.com/golang/go/src go1.14 time/Time#) error { |
| 89 | args := m.Calledscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#Called().() |
| 90 | return args.Errorscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Arguments#Error().(0) |
| 91 | } |