Documentation ¶
Index ¶
- func SetController(controller CntrInterface)
- func SetLogger(newLogger *zap.Logger)
- type Cntr
- func (control Cntr) DeliverWebhook(msg dtos.DiscordMsg) error
- func (control Cntr) Get(pageURL string) []byte
- func (control Cntr) GetFormattedTime() string
- func (control Cntr) GetPage(pageURL string) *html.Node
- func (control Cntr) Sleep(duration time.Duration)
- func (control Cntr) WriteWsMessage(msg []byte, ws *websocket.Conn) error
- type CntrInterface
- type MockCntrInterface
- func (_m *MockCntrInterface) DeliverWebhook(msg dtos.DiscordMsg) error
- func (_m *MockCntrInterface) Get(pageURL string) []byte
- func (_m *MockCntrInterface) GetFormattedTime() string
- func (_m *MockCntrInterface) GetPage(pageURL string) *html.Node
- func (_m *MockCntrInterface) Sleep(duration time.Duration)
- func (_m *MockCntrInterface) WriteWsMessage(msg []byte, ws *websocket.Conn) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetController ¶
func SetController(controller CntrInterface)
Types ¶
type Cntr ¶
type Cntr struct{}
func (Cntr) DeliverWebhook ¶
func (control Cntr) DeliverWebhook(msg dtos.DiscordMsg) error
func (Cntr) GetFormattedTime ¶
type CntrInterface ¶
type CntrInterface interface { // Goodreads and TheBookshop GetPage(url string) *html.Node Get(pageURL string) []byte // Websocket and notifications WriteWsMessage(msg []byte, ws *websocket.Conn) error DeliverWebhook(msg dtos.DiscordMsg) error // Utils GetFormattedTime() string Sleep(duration time.Duration) }
var (
Cnt CntrInterface
)
type MockCntrInterface ¶
MockCntrInterface is an autogenerated mock type for the MockCntrInterface type
func NewMockCntrInterface ¶
func NewMockCntrInterface(t mockConstructorTestingTNewMockCntrInterface) *MockCntrInterface
NewMockCntrInterface creates a new instance of MockCntrInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockCntrInterface) DeliverWebhook ¶
func (_m *MockCntrInterface) DeliverWebhook(msg dtos.DiscordMsg) error
DeliverWebhook provides a mock function with given fields: msg
func (*MockCntrInterface) Get ¶
func (_m *MockCntrInterface) Get(pageURL string) []byte
GetPage provides a mock function with given fields: url
func (*MockCntrInterface) GetFormattedTime ¶
func (_m *MockCntrInterface) GetFormattedTime() string
GetFormattedTime provides a mock function with given fields:
func (*MockCntrInterface) GetPage ¶
func (_m *MockCntrInterface) GetPage(pageURL string) *html.Node
GetPage provides a mock function with given fields: url
func (*MockCntrInterface) Sleep ¶
func (_m *MockCntrInterface) Sleep(duration time.Duration)
Sleep provides a mock function with given fields: duration
func (*MockCntrInterface) WriteWsMessage ¶
func (_m *MockCntrInterface) WriteWsMessage(msg []byte, ws *websocket.Conn) error
WriteWsMessage provides a mock function with given fields: msg, ws
Click to show internal directories.
Click to hide internal directories.