Documentation ¶
Overview ¶
Package test implements the functionality of test server emulating the work of a Beget server.
Index ¶
- Variables
- type BegetServer
- func (s *BegetServer) BackupDownloadFile(body string, checkValuesFunction func(url.Values)) *BegetServer
- func (s *BegetServer) BackupDownloadMYSQL(body string, checkValuesFunction func(url.Values)) *BegetServer
- func (s *BegetServer) BackupGetFileBackupList(body string, checkValuesFunction func(url.Values)) *BegetServer
- func (s *BegetServer) BackupGetFileList(body string, checkValuesFunction func(url.Values)) *BegetServer
- func (s *BegetServer) BackupGetLog(body string, checkValuesFunction func(url.Values)) *BegetServer
- func (s *BegetServer) BackupGetMYSQLBackupList(body string, checkValuesFunction func(url.Values)) *BegetServer
- func (s *BegetServer) BackupGetMYSQLList(body string, checkValuesFunction func(url.Values)) *BegetServer
- func (s *BegetServer) BackupRestoreFile(body string, checkValuesFunction func(url.Values)) *BegetServer
- func (s *BegetServer) BackupRestoreMYSQL(body string, checkValuesFunction func(url.Values)) *BegetServer
- func (s *BegetServer) DNSChangeRecords(body string, checkValuesFunction func(url.Values)) *BegetServer
- func (s *BegetServer) DNSGetData(body string, checkValuesFunction func(url.Values)) *BegetServer
- func (s *BegetServer) GetURL() string
- func (s *BegetServer) UserGetAccountInfo(body string, checkValuesFunction func(url.Values)) *BegetServer
- func (s *BegetServer) UserToggleSSH(body string, checkValuesFunction func(url.Values)) *BegetServer
Constants ¶
This section is empty.
Variables ¶
var ErrNotSetHandler = errors.New("handler wasn't set") // "handler wasn't set".
Functions ¶
This section is empty.
Types ¶
type BegetServer ¶
type BegetServer struct {
// contains filtered or unexported fields
}
BegetServer is an extension of the httptest.Server to work with Beget Server. Supports processing of all api methods implemented by the package.
Important ¶
If the handler is not specified and the appropriate method is invoked, the server will panic with ErrNotSetHandler.
func NewBegetServer ¶
func NewBegetServer() *BegetServer
NewBegetServer creates a new BegetServer. The httptest.Server will be started.
func (*BegetServer) BackupDownloadFile ¶
func (s *BegetServer) BackupDownloadFile(body string, checkValuesFunction func(url.Values)) *BegetServer
BackupDownloadFile specify handler for downloadFile method.
func (*BegetServer) BackupDownloadMYSQL ¶
func (s *BegetServer) BackupDownloadMYSQL(body string, checkValuesFunction func(url.Values)) *BegetServer
BackupDownloadMYSQL specify handler for downloadMysql method.
func (*BegetServer) BackupGetFileBackupList ¶
func (s *BegetServer) BackupGetFileBackupList(body string, checkValuesFunction func(url.Values)) *BegetServer
BackupGetFileBackupList specify handler for getFileBackupList method.
func (*BegetServer) BackupGetFileList ¶
func (s *BegetServer) BackupGetFileList(body string, checkValuesFunction func(url.Values)) *BegetServer
BackupGetFileList specify handler for getFileList method.
func (*BegetServer) BackupGetLog ¶
func (s *BegetServer) BackupGetLog(body string, checkValuesFunction func(url.Values)) *BegetServer
BackupGetLog specify handler for getLog method.
func (*BegetServer) BackupGetMYSQLBackupList ¶
func (s *BegetServer) BackupGetMYSQLBackupList(body string, checkValuesFunction func(url.Values)) *BegetServer
BackupGetMYSQLBackupList specify handler for getMysqlBackupList method.
func (*BegetServer) BackupGetMYSQLList ¶
func (s *BegetServer) BackupGetMYSQLList(body string, checkValuesFunction func(url.Values)) *BegetServer
BackupGetMYSQLList specify handler for getMysqlList method.
func (*BegetServer) BackupRestoreFile ¶
func (s *BegetServer) BackupRestoreFile(body string, checkValuesFunction func(url.Values)) *BegetServer
BackupRestoreFile specify handler for restoreFile method.
func (*BegetServer) BackupRestoreMYSQL ¶
func (s *BegetServer) BackupRestoreMYSQL(body string, checkValuesFunction func(url.Values)) *BegetServer
BackupRestoreMYSQL specify handler for restoreMysql method.
func (*BegetServer) DNSChangeRecords ¶
func (s *BegetServer) DNSChangeRecords(body string, checkValuesFunction func(url.Values)) *BegetServer
DNSChangeRecords specify handler for changeRecords method.
func (*BegetServer) DNSGetData ¶
func (s *BegetServer) DNSGetData(body string, checkValuesFunction func(url.Values)) *BegetServer
DNSGetData specify handler for getData method.
func (*BegetServer) GetURL ¶
func (s *BegetServer) GetURL() string
GetURL returns URL of test server.
func (*BegetServer) UserGetAccountInfo ¶
func (s *BegetServer) UserGetAccountInfo(body string, checkValuesFunction func(url.Values)) *BegetServer
UserGetAccountInfo specify handler for getAccountInfo method.
func (*BegetServer) UserToggleSSH ¶
func (s *BegetServer) UserToggleSSH(body string, checkValuesFunction func(url.Values)) *BegetServer
UserToggleSSH specify handler for toggleSsh method.