Documentation ¶
Index ¶
- type SiteClient
- func (c *SiteClient) Close()
- func (c *SiteClient) EndSession() error
- func (c *SiteClient) GetApiInfo() (*model.ApiInfo, error)
- func (c *SiteClient) GetClientDetails(client *model.Client) error
- func (c *SiteClient) GetClients(detailed bool) (*[]model.Client, error)
- func (c *SiteClient) GetDeviceDetails(device *model.Device) error
- func (c *SiteClient) GetDevices(detailed bool) (*[]model.Device, error)
- func (c *SiteClient) GetNetworks() (*[]model.Network, error)
- func (c *SiteClient) GetUserInfo() (*model.UsersCurrent, error)
- func (c *SiteClient) HasActiveSession() bool
- func (c *SiteClient) StartSession() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SiteClient ¶
type SiteClient struct {
// contains filtered or unexported fields
}
func NewSiteClient ¶
func NewSiteClient(url, siteName, username, password string, skipVerify, verbose bool) (*SiteClient, error)
Creates a new SiteClient
Parameters:
url : Omada controller address(example: https://192.168.0.2) siteName : Visible site name(empty string for default site) username : Username for login(it is advised to create a separate api user) password : Password for login skipVerify : Ignore SSL errors(necessary for ip addresses as url or selfsigned certificates) erbose : Debug logging to console(should only be enabled for debugging scenarios)
Return:
SiteClient instance error
func (*SiteClient) EndSession ¶
func (c *SiteClient) EndSession() error
End current session
Will be called by Close ¶
Return:
error
func (*SiteClient) GetApiInfo ¶
func (c *SiteClient) GetApiInfo() (*model.ApiInfo, error)
Get API information
Return:
API information error
func (*SiteClient) GetClientDetails ¶
func (c *SiteClient) GetClientDetails(client *model.Client) error
Get enhanced information for a provided cliend and enhance the struct by it
Parameters:
client : Client to enhance(Type and Mac have to be provided as minimal information)
Return:
error
func (*SiteClient) GetClients ¶
func (c *SiteClient) GetClients(detailed bool) (*[]model.Client, error)
Get active clients
Parameters:
detailed : get detailed device information
Return:
Client list error
func (*SiteClient) GetDeviceDetails ¶
func (c *SiteClient) GetDeviceDetails(device *model.Device) error
Get enhanced information for a provided device and enhance the struct by it
Parameters:
device : Device to enhance(Type and Mac have to be provided as minimal information)
Return:
error
func (*SiteClient) GetDevices ¶
func (c *SiteClient) GetDevices(detailed bool) (*[]model.Device, error)
Get list of devices
Parameters:
detailed : get detailed device information
Return:
Devices list error
func (*SiteClient) GetNetworks ¶ added in v0.0.5
func (c *SiteClient) GetNetworks() (*[]model.Network, error)
Get networks
Return:
Network list error
func (*SiteClient) GetUserInfo ¶
func (c *SiteClient) GetUserInfo() (*model.UsersCurrent, error)
Get user information for current session
Return:
User information error
func (*SiteClient) HasActiveSession ¶
func (c *SiteClient) HasActiveSession() bool
Determines if client has an active session
Return:
sesion state
func (*SiteClient) StartSession ¶
func (c *SiteClient) StartSession() error
Start a new session
Will be called by api methodes if required ¶
Return:
error
Click to show internal directories.
Click to hide internal directories.