Documentation
¶
Index ¶
- Constants
- func CheckIsLoginRequired(httpResponseBody string) bool
- func DoHttpRequestAndReadResponse(args *types.GlobalOptions, httpMethod string, host string, requestUrl string, ...) (string, error)
- func DoUnauthenticatedHttpRequestAndReadResponse(args *types.GlobalOptions, httpMethod string, requestUrl string, ...) (string, error)
- func ReadTokenAndModel2GlobalOptions(args *types.GlobalOptions, host string) (types.NetgearModel, string, error)
- func RequestPage(args *types.GlobalOptions, host string, url string) (string, error)
- type LoginCommand
- type MockHTTPServer
- type RequestLog
Constants ¶
View Source
const FailedAttempt = "no SID cookie found in response header"
Variables ¶
This section is empty.
Functions ¶
func CheckIsLoginRequired ¶
func ReadTokenAndModel2GlobalOptions ¶
func ReadTokenAndModel2GlobalOptions(args *types.GlobalOptions, host string) (types.NetgearModel, string, error)
func RequestPage ¶
Types ¶
type LoginCommand ¶
type LoginCommand struct {
Address string `required:"" help:"the Netgear switch's IP address or host name to connect to" short:"a"`
Password string `optional:"" help:"the admin console's password; if omitted, it will be prompted for" short:"p"`
}
func (*LoginCommand) Run ¶
func (login *LoginCommand) Run(args *types.GlobalOptions) error
type MockHTTPServer ¶
type MockHTTPServer struct {
// contains filtered or unexported fields
}
MockHTTPServer creates a test HTTP server that mimics switch behavior
func NewMockHTTPServer ¶
func NewMockHTTPServer(model types.NetgearModel) *MockHTTPServer
NewMockHTTPServer creates a new mock server for testing
func (*MockHTTPServer) Close ¶
func (m *MockHTTPServer) Close()
func (*MockHTTPServer) GetRequests ¶
func (m *MockHTTPServer) GetRequests() []RequestLog
func (*MockHTTPServer) URL ¶
func (m *MockHTTPServer) URL() string
Click to show internal directories.
Click to hide internal directories.