tests

package
v0.0.0-...-c59a99f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockHTTPClient

type MockHTTPClient struct {
	MockDo func(req *http.Request) (*http.Response, error)
}

func (*MockHTTPClient) Do

func (c *MockHTTPClient) Do(req *http.Request) (*http.Response, error)

type MockOmadaApi

type MockOmadaApi struct {
	MockGetControllerId func() (*OmadaResponse, error)
	MockLogin           func(omadaControllerId *string) (*OmadaResponse, []*http.Cookie, error)
	MockGetSites        func(omadaControllerId *string, cookies []*http.Cookie,
		loginToken *string) (*OmadaResponse, error)
	MockGetWlans func(omadaControllerId *string, cookies []*http.Cookie, loginToken *string,
		siteId *string) (*OmadaResponse, error)
	MockGetSsids func(omadaControllerId *string, cookies []*http.Cookie, loginToken *string,
		siteId *string, wlanId *string) (*OmadaResponse, error)
	MockUpdateSsid func(omadaControllerId *string, cookies []*http.Cookie, loginToken *string,
		siteId *string, wlanId *string, ssidUpdateData *Data) (*OmadaResponse, error)
	MockGetTimeRanges func(omadaControllerId *string, cookies []*http.Cookie, loginToken *string,
		siteId *string) (*OmadaResponse, error)
	MockCreateTimeRange func(omadaControllerId *string, cookies []*http.Cookie, loginToken *string,
		siteId *string, trData *Data) (*OmadaResponse, error)

	MockQueryUrlFilters func(omadaControllerId *string, cookies []*http.Cookie,
		loginToken *string, siteId *string) (*OmadaResponse, error)
	MockCreateUrlFilter func(omadaControllerId *string, cookies []*http.Cookie,
		loginToken *string, siteId *string, urlFilterData *Data) (*OmadaResponse, error)
	MockUpdateUrlFilter func(omadaControllerId *string, cookies []*http.Cookie,
		loginToken *string, siteId *string, urlFilterData *Data) (*OmadaResponse, error)
	MockDeleteUrlFilter func(omadaControllerId *string, cookies []*http.Cookie,
		loginToken *string, siteId *string, urlFilterId *string) (*OmadaResponse, error)
}

func (*MockOmadaApi) CreateTimeRange

func (oa *MockOmadaApi) CreateTimeRange(omadaControllerId *string, cookies []*http.Cookie, loginToken *string,
	siteId *string, trData *Data) (*OmadaResponse, error)

func (*MockOmadaApi) CreateUrlFilter

func (oa *MockOmadaApi) CreateUrlFilter(omadaControllerId *string, cookies []*http.Cookie,
	loginToken *string, siteId *string, urlFilterData *Data) (*OmadaResponse, error)

func (*MockOmadaApi) DeleteUrlFilter

func (oa *MockOmadaApi) DeleteUrlFilter(omadaControllerId *string, cookies []*http.Cookie,
	loginToken *string, siteId *string, urlFilterId *string) (*OmadaResponse, error)

func (*MockOmadaApi) GetControllerId

func (oa *MockOmadaApi) GetControllerId() (*OmadaResponse, error)

func (*MockOmadaApi) GetSites

func (oa *MockOmadaApi) GetSites(omadaControllerId *string, cookies []*http.Cookie,
	loginToken *string) (*OmadaResponse, error)

func (*MockOmadaApi) GetSsids

func (oa *MockOmadaApi) GetSsids(omadaControllerId *string, cookies []*http.Cookie, loginToken *string,
	siteId *string, wlanId *string) (*OmadaResponse, error)

func (*MockOmadaApi) GetTimeRanges

func (oa *MockOmadaApi) GetTimeRanges(omadaControllerId *string, cookies []*http.Cookie, loginToken *string,
	siteId *string) (*OmadaResponse, error)

func (*MockOmadaApi) GetWlans

func (oa *MockOmadaApi) GetWlans(omadaControllerId *string, cookies []*http.Cookie, loginToken *string,
	siteId *string) (*OmadaResponse, error)

func (*MockOmadaApi) Login

func (oa *MockOmadaApi) Login(omadaControllerId *string) (*OmadaResponse, []*http.Cookie, error)

func (*MockOmadaApi) QueryUrlFilters

func (oa *MockOmadaApi) QueryUrlFilters(omadaControllerId *string, cookies []*http.Cookie, loginToken *string,
	siteId *string) (*OmadaResponse, error)

func (*MockOmadaApi) UpdateSsid

func (oa *MockOmadaApi) UpdateSsid(omadaControllerId *string, cookies []*http.Cookie, loginToken *string,
	siteId *string, wlanId *string, ssidUpdateData *Data) (*OmadaResponse, error)

func (*MockOmadaApi) UpdateUrlFilter

func (oa *MockOmadaApi) UpdateUrlFilter(omadaControllerId *string, cookies []*http.Cookie,
	loginToken *string, siteId *string, urlFilterData *Data) (*OmadaResponse, error)

type MockUrlFilterController

type MockUrlFilterController struct {
	MockQueryUrlFilters func(omadaControllerId *string, cookies []*http.Cookie,
		loginToken *string, siteId *string, ssidData *Data) (*[]UrlFilter, error)
	MockMaybeUpdateUrlFilters func(omadaControllerId *string,
		cookies []*http.Cookie, loginToken *string, siteId *string, ssidData *Data,
		requestedFilters *[]UrlFilter) (*[]UrlFilter, *bool, error)
}

func NewMockUrlFilterController

func NewMockUrlFilterController(queryError bool, updateUpstreamError bool) MockUrlFilterController

func (MockUrlFilterController) MaybeUpdateUrlFilters

func (ufc MockUrlFilterController) MaybeUpdateUrlFilters(omadaControllerId *string,
	cookies []*http.Cookie, loginToken *string, siteId *string, ssidData *Data,
	requestedFilters *[]UrlFilter) (*[]UrlFilter, *bool, error)

func (MockUrlFilterController) QueryUrlFilters

func (ufc MockUrlFilterController) QueryUrlFilters(omadaControllerId *string, cookies []*http.Cookie,
	loginToken *string, siteId *string, ssidData *Data) (*[]UrlFilter, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL