Xray-core/testing/mocks/dns.go

109 lines
3.1 KiB
Go
Raw Normal View History

2020-11-25 13:01:53 +02:00
// Code generated by MockGen. DO NOT EDIT.
2021-04-09 18:36:48 +03:00
// Source: github.com/xtls/xray-core/features/dns (interfaces: Client)
2020-11-25 13:01:53 +02:00
// Package mocks is a generated GoMock package.
package mocks
import (
net "net"
reflect "reflect"
2021-03-19 17:33:07 +02:00
gomock "github.com/golang/mock/gomock"
2021-04-09 18:36:48 +03:00
dns "github.com/xtls/xray-core/features/dns"
2020-11-25 13:01:53 +02:00
)
2021-03-19 17:33:07 +02:00
// DNSClient is a mock of Client interface.
2020-11-25 13:01:53 +02:00
type DNSClient struct {
ctrl *gomock.Controller
recorder *DNSClientMockRecorder
}
2021-03-19 17:33:07 +02:00
// DNSClientMockRecorder is the mock recorder for DNSClient.
2020-11-25 13:01:53 +02:00
type DNSClientMockRecorder struct {
mock *DNSClient
}
2021-03-19 17:33:07 +02:00
// NewDNSClient creates a new mock instance.
2020-11-25 13:01:53 +02:00
func NewDNSClient(ctrl *gomock.Controller) *DNSClient {
mock := &DNSClient{ctrl: ctrl}
mock.recorder = &DNSClientMockRecorder{mock}
return mock
}
2021-03-19 17:33:07 +02:00
// EXPECT returns an object that allows the caller to indicate expected use.
2020-11-25 13:01:53 +02:00
func (m *DNSClient) EXPECT() *DNSClientMockRecorder {
return m.recorder
}
2021-03-19 17:33:07 +02:00
// Close mocks base method.
2020-11-25 13:01:53 +02:00
func (m *DNSClient) Close() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Close")
ret0, _ := ret[0].(error)
return ret0
}
2021-03-19 17:33:07 +02:00
// Close indicates an expected call of Close.
2020-11-25 13:01:53 +02:00
func (mr *DNSClientMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*DNSClient)(nil).Close))
}
2021-03-19 17:33:07 +02:00
// LookupIP mocks base method.
func (m *DNSClient) LookupIP(arg0 string) ([]net.IP, error) {
2020-11-25 13:01:53 +02:00
m.ctrl.T.Helper()
2021-03-19 17:33:07 +02:00
ret := m.ctrl.Call(m, "LookupIP", arg0)
2020-11-25 13:01:53 +02:00
ret0, _ := ret[0].([]net.IP)
ret1, _ := ret[1].(error)
return ret0, ret1
}
2021-03-19 17:33:07 +02:00
// LookupIP indicates an expected call of LookupIP.
func (mr *DNSClientMockRecorder) LookupIP(arg0 interface{}) *gomock.Call {
2020-11-25 13:01:53 +02:00
mr.mock.ctrl.T.Helper()
2021-03-19 17:33:07 +02:00
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LookupIP", reflect.TypeOf((*DNSClient)(nil).LookupIP), arg0)
2020-11-25 13:01:53 +02:00
}
2021-04-09 18:36:48 +03:00
// LookupOptions mocks base method.
func (m *DNSClient) LookupOptions(arg0 string, arg1 dns.IPOption) ([]net.IP, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LookupOptions", arg0, arg1)
ret0, _ := ret[0].([]net.IP)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// LookupOptions indicates an expected call of LookupOptions.
func (mr *DNSClientMockRecorder) LookupOptions(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LookupOptions", reflect.TypeOf((*DNSClient)(nil).LookupOptions), arg0, arg1)
}
2021-03-19 17:33:07 +02:00
// Start mocks base method.
2020-11-25 13:01:53 +02:00
func (m *DNSClient) Start() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Start")
ret0, _ := ret[0].(error)
return ret0
}
2021-03-19 17:33:07 +02:00
// Start indicates an expected call of Start.
2020-11-25 13:01:53 +02:00
func (mr *DNSClientMockRecorder) Start() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*DNSClient)(nil).Start))
}
2021-03-19 17:33:07 +02:00
// Type mocks base method.
2020-11-25 13:01:53 +02:00
func (m *DNSClient) Type() interface{} {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Type")
ret0, _ := ret[0].(interface{})
return ret0
}
2021-03-19 17:33:07 +02:00
// Type indicates an expected call of Type.
2020-11-25 13:01:53 +02:00
func (mr *DNSClientMockRecorder) Type() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*DNSClient)(nil).Type))
}