Documentation
¶
Index ¶
- Variables
- func APIAuthentication(c *gin.Context)
- func AddDeviceVlan(client *ent.Client, obj ent.Device) (response *ent.Device, err error)
- func ChangePasswordAdministrator(client *ent.Client, obj ChangeAdminPassword) (response *ent.Administrator, e error)
- func CheckNetworkOverlap(client *ent.Client, d *ent.Device, ip_address *ent.IPAddress) bool
- func CheckNilAdministrator(client *ent.Client) (status bool)
- func CheckNotDuplicateIPAddress(client *ent.Client, d *ent.Device, ip_address *ent.IPAddress) (*ent.IPAddress, error)
- func CheckTimeout(session *LoggedSession)
- func CleanInterface(client *ent.Client, id int) (err error)
- func Commit(client *ent.Client, device_id int) (status interface{}, err error)
- func CreateAdministrator(client *ent.Client, obj ent.Administrator) (response *ent.Administrator, err error)
- func CreateDevice(client *ent.Client, obj ent.Device) (response *ent.Device, err error)
- func CreateDeviceMap(client *ent.Client, obj DeviceMapStruct) (response *ent.NetTopologyDeviceMap, err error)
- func CreateDeviceType(client *ent.Client, obj ent.DeviceType) (response *ent.DeviceType, err error)
- func CreateEdge(client *ent.Client, obj EdgeStruct) (response *ent.NetTopologyDeviceMap, err error)
- func CreateIPRouting(client *ent.Client, obj ent.IPStaticRoutingTable) (response *ent.IPStaticRoutingTable, err error)
- func CreateInterface(client *ent.Client, obj ent.NetInterface) (response *ent.NetInterface, err error)
- func CreatePortChannelInterface(client *ent.Client, obj ent.PortChannelInterface) (response *ent.PortChannelInterface, err error)
- func CreateRangeInterface(client *ent.Client, obj []ent.NetInterface) (response []*ent.NetInterface, err error)
- func CreateTopology(client *ent.Client, obj ent.NetTopology) (response *ent.NetTopology, err error)
- func CreateVlan(client *ent.Client, obj ent.Vlan) (response *ent.Vlan, err error)
- func DeleteDevice(client *ent.Client, id int) (err error)
- func DeleteDeviceMap(client *ent.Client, id int) (err error)
- func DeleteDeviceType(client *ent.Client, id int) (err error)
- func DeleteDeviceVlan(client *ent.Client, id, vid int) error
- func DeleteIPRouting(client *ent.Client, id int) (err error)
- func DeleteInterface(client *ent.Client, id int) (err error)
- func DeletePortChannelInterface(client *ent.Client, id int) (err error)
- func DeleteTopology(client *ent.Client, id int) (err error)
- func DeleteVlan(client *ent.Client, id int) (err error)
- func EditDeviceDetail(client *ent.Client, obj ent.Device) (response *ent.Device, e error)
- func EditDeviceTypeDetail(client *ent.Client, obj ent.DeviceType) (response *ent.DeviceType, e error)
- func EditInterfaceDetail(client *ent.Client, obj ent.NetInterface) (response *ent.NetInterface, err error)
- func EditPortChannelInterface(client *ent.Client, obj ent.PortChannelInterface) (response *ent.PortChannelInterface, err error)
- func EditTopologyDetail(client *ent.Client, obj ent.NetTopology) (response *ent.NetTopology, e error)
- func EditVlanDetail(client *ent.Client, obj ent.Vlan) (response *ent.Vlan, e error)
- func GetAllAdministrator(client *ent.Client) (response []*ent.Administrator, err error)
- func GetAllDevice(client *ent.Client) (response []*ent.Device, err error)
- func GetAllDeviceType(client *ent.Client) (response []*ent.DeviceType, err error)
- func GetAllTopology(client *ent.Client) (response []*ent.NetTopology, err error)
- func GetAllVlan(client *ent.Client) (response []*ent.Vlan, err error)
- func GetCanBeStaticRouteOnDevice(client *ent.Client, did int) (response []*ent.Device, err error)
- func GetDevice(client *ent.Client, id int) (response *ent.Device, err error)
- func GetDevicePlatform(client *ent.Client) (response []*ent.DevicePlatform, err error)
- func GetDeviceType(client *ent.Client, id int) (response *ent.DeviceType, err error)
- func GetInterface(client *ent.Client, id int) (response *ent.NetInterface, err error)
- func GetInterfaceLayer(client *ent.Client) (response []*ent.NetInterfaceLayer, err error)
- func GetInterfaceMode(client *ent.Client) (response []*ent.NetInterfaceMode, err error)
- func GetPingDevice(client *ent.Client, id int) (response *netautomation.PingResponse, err error)
- func GetPingTopology(client *ent.Client, id int) (response []*netautomation.PingResponseDeviceMap, err error)
- func GetPortChannelInterface(client *ent.Client, id int) (response *ent.PortChannelInterface, err error)
- func GetTopology(client *ent.Client, id int) (response *ent.NetTopology, err error)
- func GetVlan(client *ent.Client, id int) (response *ent.Vlan, err error)
- func Logout(session *LoggedSession)
- type APIKeyTemporary
- type ChangeAdminPassword
- type DeviceMapStruct
- type EdgeStruct
- type LoggedSession
Constants ¶
This section is empty.
Variables ¶
View Source
var APIKeyTemporaryVar = &APIKeyTemporary{}
View Source
var LoggedSessionVar = make(map[string]*LoggedSession)
Functions ¶
func APIAuthentication ¶
func AddDeviceVlan ¶
func ChangePasswordAdministrator ¶
func ChangePasswordAdministrator(client *ent.Client, obj ChangeAdminPassword) (response *ent.Administrator, e error)
func CheckNetworkOverlap ¶ added in v0.2.0
func CheckNilAdministrator ¶
func CheckNotDuplicateIPAddress ¶ added in v0.2.0
func CheckTimeout ¶
func CheckTimeout(session *LoggedSession)
func CreateAdministrator ¶
func CreateAdministrator(client *ent.Client, obj ent.Administrator) (response *ent.Administrator, err error)
func CreateDevice ¶
func CreateDeviceMap ¶
func CreateDeviceMap(client *ent.Client, obj DeviceMapStruct) (response *ent.NetTopologyDeviceMap, err error)
func CreateDeviceType ¶
func CreateDeviceType(client *ent.Client, obj ent.DeviceType) (response *ent.DeviceType, err error)
func CreateEdge ¶
func CreateEdge(client *ent.Client, obj EdgeStruct) (response *ent.NetTopologyDeviceMap, err error)
func CreateIPRouting ¶ added in v0.2.0
func CreateIPRouting(client *ent.Client, obj ent.IPStaticRoutingTable) (response *ent.IPStaticRoutingTable, err error)
func CreateInterface ¶
func CreateInterface(client *ent.Client, obj ent.NetInterface) (response *ent.NetInterface, err error)
func CreatePortChannelInterface ¶ added in v0.2.0
func CreatePortChannelInterface(client *ent.Client, obj ent.PortChannelInterface) (response *ent.PortChannelInterface, err error)
func CreateRangeInterface ¶
func CreateRangeInterface(client *ent.Client, obj []ent.NetInterface) (response []*ent.NetInterface, err error)
func CreateTopology ¶
func CreateTopology(client *ent.Client, obj ent.NetTopology) (response *ent.NetTopology, err error)
func DeletePortChannelInterface ¶ added in v0.2.0
func EditDeviceDetail ¶
func EditDeviceTypeDetail ¶
func EditDeviceTypeDetail(client *ent.Client, obj ent.DeviceType) (response *ent.DeviceType, e error)
func EditInterfaceDetail ¶
func EditInterfaceDetail(client *ent.Client, obj ent.NetInterface) (response *ent.NetInterface, err error)
func EditPortChannelInterface ¶ added in v0.2.0
func EditPortChannelInterface(client *ent.Client, obj ent.PortChannelInterface) (response *ent.PortChannelInterface, err error)
func EditTopologyDetail ¶
func EditTopologyDetail(client *ent.Client, obj ent.NetTopology) (response *ent.NetTopology, e error)
func EditVlanDetail ¶
func GetAllAdministrator ¶
func GetAllAdministrator(client *ent.Client) (response []*ent.Administrator, err error)
func GetAllDeviceType ¶
func GetAllDeviceType(client *ent.Client) (response []*ent.DeviceType, err error)
func GetAllTopology ¶
func GetAllTopology(client *ent.Client) (response []*ent.NetTopology, err error)
func GetCanBeStaticRouteOnDevice ¶ added in v0.2.0
func GetDevicePlatform ¶
func GetDevicePlatform(client *ent.Client) (response []*ent.DevicePlatform, err error)
func GetDeviceType ¶
func GetInterface ¶
func GetInterfaceLayer ¶ added in v0.2.0
func GetInterfaceLayer(client *ent.Client) (response []*ent.NetInterfaceLayer, err error)
func GetInterfaceMode ¶
func GetInterfaceMode(client *ent.Client) (response []*ent.NetInterfaceMode, err error)
func GetPingDevice ¶
func GetPingDevice(client *ent.Client, id int) (response *netautomation.PingResponse, err error)
func GetPingTopology ¶
func GetPingTopology(client *ent.Client, id int) (response []*netautomation.PingResponseDeviceMap, err error)
func GetPortChannelInterface ¶ added in v0.2.0
func GetTopology ¶
func Logout ¶
func Logout(session *LoggedSession)
Types ¶
type APIKeyTemporary ¶
type ChangeAdminPassword ¶
type DeviceMapStruct ¶
type EdgeStruct ¶
type LoggedSession ¶
type LoggedSession struct { Username string `json:"username"` APISecret string `json:"api_secret"` Authorized bool `json:"authorized"` AtDatetime time.Time `json:"at_datetime"` Reason string `json:"reason"` }
func CheckSessionWithUsernameAndAPISecret ¶
func CheckSessionWithUsernameAndAPISecret(obj ent.Administrator) (auth *LoggedSession, e error)
func FindLoggedSession ¶
func FindLoggedSession(username string) (session *LoggedSession, err error)
func GetAuthentication ¶
func GetAuthentication(client *ent.Client, obj ent.Administrator) (auth *LoggedSession, e error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.