
We previously didn't really had any structure in our project apart from creating a new folder for each package in our project root. Now that we have accumulated some packages, we use the well-known Golang project layout in order to clearly communicate our intent with packages. See https://github.com/golang-standards/project-layout
94 lines
1.9 KiB
Go
94 lines
1.9 KiB
Go
// Code generated by mockery v0.0.0-dev. DO NOT EDIT.
|
|
|
|
package api
|
|
|
|
import (
|
|
io "io"
|
|
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// webSocketConnectionMock is an autogenerated mock type for the webSocketConnection type
|
|
type webSocketConnectionMock struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// Close provides a mock function with given fields:
|
|
func (_m *webSocketConnectionMock) Close() error {
|
|
ret := _m.Called()
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func() error); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// CloseHandler provides a mock function with given fields:
|
|
func (_m *webSocketConnectionMock) CloseHandler() func(int, string) error {
|
|
ret := _m.Called()
|
|
|
|
var r0 func(int, string) error
|
|
if rf, ok := ret.Get(0).(func() func(int, string) error); ok {
|
|
r0 = rf()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(func(int, string) error)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// NextReader provides a mock function with given fields:
|
|
func (_m *webSocketConnectionMock) NextReader() (int, io.Reader, error) {
|
|
ret := _m.Called()
|
|
|
|
var r0 int
|
|
if rf, ok := ret.Get(0).(func() int); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Get(0).(int)
|
|
}
|
|
|
|
var r1 io.Reader
|
|
if rf, ok := ret.Get(1).(func() io.Reader); ok {
|
|
r1 = rf()
|
|
} else {
|
|
if ret.Get(1) != nil {
|
|
r1 = ret.Get(1).(io.Reader)
|
|
}
|
|
}
|
|
|
|
var r2 error
|
|
if rf, ok := ret.Get(2).(func() error); ok {
|
|
r2 = rf()
|
|
} else {
|
|
r2 = ret.Error(2)
|
|
}
|
|
|
|
return r0, r1, r2
|
|
}
|
|
|
|
// SetCloseHandler provides a mock function with given fields: h
|
|
func (_m *webSocketConnectionMock) SetCloseHandler(h func(int, string) error) {
|
|
_m.Called(h)
|
|
}
|
|
|
|
// WriteMessage provides a mock function with given fields: messageType, data
|
|
func (_m *webSocketConnectionMock) WriteMessage(messageType int, data []byte) error {
|
|
ret := _m.Called(messageType, data)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(int, []byte) error); ok {
|
|
r0 = rf(messageType, data)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|