Documentation
¶
Index ¶
- type PortID
- type PortState
- type Session
- func (s *Session) CreateVLAN(vid VID) (*http.Response, error)
- func (s *Session) DeleteVLAN(vid VID) (*http.Response, error)
- func (s *Session) FetchSwitchConfig() (*SwitchConfig, error)
- func (s *Session) Logout() (*http.Response, error)
- func (s *Session) SetVLANMembership(vid VID, switchConfig *SwitchConfig) (*http.Response, error)
- func (s *Session) SetVLANName(vid VID, name string) (*http.Response, error)
- type SwitchConfig
- type TrunkConfig
- type TrunkID
- type TrunkMode
- type VID
- type VlanConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
An admin login session on a switch.
It is recommended to call Logout when you're done with the session, because 1810 series switches have a limited number of session slots available. When these are used up, they will reject further logins.
func (*Session) FetchSwitchConfig ¶
func (s *Session) FetchSwitchConfig() (*SwitchConfig, error)
Read out the switches configuration.
func (*Session) SetVLANMembership ¶
Apply the VLAN membership settings in `switchConfig` for the VLAN identified by `vid`.
The intended usage is to fetch `switchConfig` through `FetchSwitchConfig`, modify it as desired, and to then pass it to this function for any VLANs needing modifications.