Documentation ¶
Index ¶
- type IpManager
- func (i *IpManager) ChangeAccountPassword(c *gin.Context)
- func (i *IpManager) CreateDomain(c *gin.Context)
- func (i *IpManager) CreateHost(c *gin.Context)
- func (i *IpManager) CreateSubnet(c *gin.Context)
- func (i *IpManager) CreateUser(c *gin.Context)
- func (i *IpManager) DeleteDomain(c *gin.Context)
- func (i *IpManager) DeleteHostname(c *gin.Context)
- func (i *IpManager) DeleteSubnet(c *gin.Context)
- func (i *IpManager) DeleteUser(c *gin.Context)
- func (i *IpManager) GetAddressByHostName(c *gin.Context)
- func (i *IpManager) GetAddressByHostNameId(c *gin.Context)
- func (i *IpManager) GetAddressById(c *gin.Context)
- func (i *IpManager) GetAddressByIpAddress(c *gin.Context)
- func (i *IpManager) GetAddresses(c *gin.Context)
- func (i *IpManager) GetAddressesByDomainId(c *gin.Context)
- func (i *IpManager) GetAddressesByDomainName(c *gin.Context)
- func (i *IpManager) GetAddressesBySubnetId(c *gin.Context)
- func (i *IpManager) GetAddressesBySubnetName(c *gin.Context)
- func (i *IpManager) GetDomainByDomainName(c *gin.Context)
- func (i *IpManager) GetDomainById(c *gin.Context)
- func (i *IpManager) GetDomains(c *gin.Context)
- func (i *IpManager) GetHostByHostName(c *gin.Context)
- func (i *IpManager) GetHostById(c *gin.Context)
- func (i *IpManager) GetHosts(c *gin.Context)
- func (i *IpManager) GetSubnetById(c *gin.Context)
- func (i *IpManager) GetSubnetByNetworkName(c *gin.Context)
- func (i *IpManager) GetSubnets(c *gin.Context)
- func (i *IpManager) GetSubnetsByDomainId(c *gin.Context)
- func (i *IpManager) GetSubnetsByDomainName(c *gin.Context)
- func (i *IpManager) GetUserById(c *gin.Context)
- func (i *IpManager) GetUserByUserName(c *gin.Context)
- func (i *IpManager) GetUserStatus(c *gin.Context)
- func (i *IpManager) GetUsers(c *gin.Context)
- func (i *IpManager) ModifySubnet(c *gin.Context)
- func (i *IpManager) SetUserStatus(c *gin.Context)
- func (i *IpManager) UpdateMacAddresses(c *gin.Context)
- type SafeUser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IpManager ¶
func (*IpManager) ChangeAccountPassword ¶
ChangeAccountPassowrd Change an account's password
@Summary Change password @Description Change password @Tags user @Accept json @Produce json @Param name path string true "User name" @Param changePassword body model.PasswordChange true "Password data" @Security BasicAuth @Success 200 {object} model.SuccessMsg @Failure 400 {object} model.FailureMsg @Router /user/{name} [patch]
func (*IpManager) CreateDomain ¶
CreateDomain Add a domain
@Summary Create a new domain @Description Create a new domain @Tags domain @Accept json @Produce json @Param domain body model.Domain true "Domain data" @Security BasicAuth @Success 200 {object} model.SuccessMsg @Failure 400 {object} model.FailureMsg @Router /domain [post]
func (*IpManager) CreateHost ¶
CreateHost Register a host into the system
@Summary Register host @Description Add a new host @Tags host @Accept json @Produce json @Param host body model.Host true "Host Data" @Security BasicAuth @Success 200 {object} model.SuccessMsg @Failure 400 {object} model.FailureMsg @Router /host [post]
func (*IpManager) CreateSubnet ¶
CreateSubnet Register a subnet with the system
@Summary Register subnet @Description Add a new subnet @Tags subnet @Accept json @Produce json @Param subnet body model.Subnet true "Subnet Data" @Security BasicAuth @Success 200 {object} model.SuccessMsg @Failure 400 {object} model.FailureMsg @Router /subnet [post]
func (*IpManager) CreateUser ¶
CreateUser Register a user for authentication and authorization
@Summary Register user @Description Add a new user @Tags user @Accept json @Produce json @Param user body model.ProposedUser true "User Data" @Security BasicAuth @Success 200 {object} model.SuccessMsg @Failure 400 {object} model.FailureMsg @Router /user [post]
func (*IpManager) DeleteDomain ¶
DeleteDomain Add a domain
@Summary Delete a domain @Description Delete a domain @Tags domain @Produce json @Param domainname path string true "Domain name" @Security BasicAuth @Success 200 {object} model.SuccessMsg @Failure 400 {object} model.FailureMsg @Router /domain/{domainname} [delete]
func (*IpManager) DeleteHostname ¶
DeleteHostname Remove a host from the system
@Summary Delete a host @Description Delete a host @Tags host @Accept json @Produce json @Param hostname path string true "Hostname" @Security BasicAuth @Success 200 {object} model.SuccessMsg @Failure 400 {object} model.FailureMsg @Router /host/{hostname} [delete]
func (*IpManager) DeleteSubnet ¶
DeleteSubnet Remove a subnet
@Summary Delete subnet @Description Delete a subnet @Tags subnet @Accept json @Produce json @Param networkname path string true "Network name" @Security BasicAuth @Success 200 {object} model.SuccessMsg @Failure 400 {object} model.FailureMsg @Router /subnet/{networkname} [delete]
func (*IpManager) DeleteUser ¶
DeleteUser Remove a user for authentication and authorization
@Summary Delete user @Description Delete a user @Tags user @Accept json @Produce json @Param name path string true "User name" @Security BasicAuth @Success 200 {object} model.SuccessMsg @Failure 400 {object} model.FailureMsg @Router /user/{name} [delete]
func (*IpManager) GetAddressByHostName ¶
func (*IpManager) GetAddressByHostNameId ¶
func (*IpManager) GetAddressById ¶
func (*IpManager) GetAddressByIpAddress ¶
func (*IpManager) GetAddresses ¶
func (*IpManager) GetAddressesByDomainId ¶
func (*IpManager) GetAddressesByDomainName ¶
func (*IpManager) GetAddressesBySubnetId ¶
func (*IpManager) GetAddressesBySubnetName ¶
func (*IpManager) GetDomainByDomainName ¶
GetDomainByName Retrieve a domain by DomainName
@Summary Retrieve a domain by DomainName @Description Retrieve a domain by DomainName @Tags domain @Produce json @Param domainname path string true "Domain name" @Success 200 {object} model.Domain @Failure 400 {object} model.FailureMsg @Router /domain/name/{domainname} [get]
func (*IpManager) GetDomainById ¶
GetDomainById Retrieve a domain by Id
@Summary Retrieve a domain by Id @Description Retrieve a domain by Id @Tags domain @Produce json @Param domainid path string true "Domain Id" @Success 200 {object} model.Domain @Failure 400 {object} model.FailureMsg @Router /domain/id/{domainid} [get]
func (*IpManager) GetDomains ¶
GetDomains Retrieve a list of domain
@Summary Retrieve a list of domain @Description Retrieve a list of domain @Tags domain @Produce json @Success 200 {object} model.DomainList @Failure 400 {object} model.FailureMsg @Router /domains [get]
func (*IpManager) GetHostByHostName ¶
GetHostByHostName Retrieve a host by its hostname
@Summary Retrieve a host by its hostname @Description Retrieve a host by its hostname @Tags host @Produce json @Param hostname path string true "hostname" @Success 200 {object} model.Host @Failure 400 {object} model.FailureMsg @Router /host/name/{hostname} [get]
func (*IpManager) GetHostById ¶
GetHostById Retrieve a host by its Id
@Summary Retrieve a host by its Id @Description Retrieve a host by its Id @Tags host @Produce json @Param hostid path string true "host Id" @Success 200 {object} model.Host @Failure 400 {object} model.FailureMsg @Router /host/id/{hostid} [get]
func (*IpManager) GetHosts ¶
GetHosts Retrieve list of all hosts
@Summary Retrieve list of all hosts @Description Retrieve list of all hosts @Tags host @Produce json @Success 200 {object} model.HostList @Failure 400 {object} model.FailureMsg @Router /hosts [get]
func (*IpManager) GetSubnetById ¶
GetSubnetById Retrieve a subnet by its Id
@Summary Retrieve a subnet by its Id @Description Retrieve a subnet by its Id @Tags subnet @Produce json @Param subnetid path string true "Subnet Id" @Success 200 {object} model.Subnet @Failure 400 {object} model.FailureMsg @Router /subnet/id/{subnetname} [get]
func (*IpManager) GetSubnetByNetworkName ¶
GetSubnetByNetworkName Retrieve a subnet by its network name
@Summary Retrieve a subnet by its network name @Description Retrieve a subnet by its network name @Tags subnet @Produce json @Param subnetname path string true "Subnet name" @Success 200 {object} model.Subnet @Failure 400 {object} model.FailureMsg @Router /subnet/name/{subnetname} [get]
func (*IpManager) GetSubnets ¶
GetSubnets Retrieve list of all subnets
@Summary Retrieve list of all subnets @Description Retrieve list of all subnets @Tags subnet @Produce json @Success 200 {object} model.Subnets @Failure 400 {object} model.FailureMsg @Router /subnets [get]
func (*IpManager) GetSubnetsByDomainId ¶
GetSubnetsByDomainId Retrieve the list of subnets assigned to a domain Id
@Summary Retrieve a list of subnets assigned to a domain Id @Description Retrieve a list of subnets assigned to a domain Id @Tags subnet @Produce json @Param domainname path string true "Domain name" @Success 200 {object} model.Subnets @Failure 400 {object} model.FailureMsg @Router /subnets/domain/id/{domainid} [get]
func (*IpManager) GetSubnetsByDomainName ¶
GetSubnetsByDomainName Retrieve the list of subnets assigned to a domain name
@Summary Retrieve a list of subnets assigned to a domain name @Description Retrieve a list of subnets assigned to a domain name @Tags subnet @Produce json @Param domainname path string true "Domain name" @Success 200 {object} model.Subnets @Failure 400 {object} model.FailureMsg @Router /subnets/domain/name/{domainname} [get]
func (*IpManager) GetUserById ¶
GetUserById Retrieve a user by their Id
@Summary Retrieve a user by their Id @Description Retrieve a user by their Id @Tags user @Produce json @Param id path int true "User ID" @Success 200 {object} SafeUser @Failure 400 {object} model.FailureMsg @Router /user/id/{id} [get]
func (*IpManager) GetUserByUserName ¶
GetUserByName Retrieve a user by their UserName
@Summary Retrieve a user by their UserName @Description Retrieve a user by their UserName @Tags user @Produce json @Param name path string true "User name" @Success 200 {object} SafeUser @Failure 400 {object} model.FailureMsg @Router /user/name/{name} [get]
func (*IpManager) GetUserStatus ¶
GetUserStatus Retrieve the active status of a user. Can be either 'enabled' or 'locked'
@Summary Retrieve a user's active status. Can be either 'enabled' or 'locked' @Description Retrieve a user's active status @Tags user @Accept json @Produce json @Param name path string true "User name" @Security BasicAuth @Success 200 {object} model.UserStatusMsg @Failure 400 {object} model.FailureMsg @Router /user/{name}/status [get]
func (*IpManager) GetUsers ¶
GetUsers Retrieve list of all users
@Summary Retrieve list of all users @Description Retrieve list of all users @Tags user @Produce json @Success 200 {object} model.UsersList @Failure 400 {object} model.FailureMsg @Router /users [get]
func (*IpManager) ModifySubnet ¶
ModifySubnet Change a subnet's network information
@Summary Change subnet network information @Description Change subnet network information @Tags subnet @Accept json @Produce json @Param networkname path string true "Network name" @Param subnetUpdate body model.SubnetUpdate true "Subnet data" @Security BasicAuth @Success 200 {object} model.SuccessMsg @Failure 400 {object} model.FailureMsg @Router /subnet/{networkname} [patch]
func (*IpManager) SetUserStatus ¶
SetUserStatus Set the active status of a user. Can be either 'enabled' or 'locked'
@Summary Set a user's active status. Can be either 'enabled' or 'locked' @Description Set a user's active status @Tags user @Accept json @Produce json @Param user body model.User.UserName true "User Data" @Param name path string true "User name" @Security BasicAuth @Success 200 {object} model.UserStatusMsg @Failure 400 {object} model.FailureMsg @Router /user/{name}/status [patch]
func (*IpManager) UpdateMacAddresses ¶
UpdateMacAddresses Update a host's MAC address list
@Summary Update MAC address list @Description Update MAC address list @Tags host @Accept json @Produce json @Param hostname path string true "Hostname" @Param updateMacAddresses body model.MacAddressList true "MAC address list" @Security BasicAuth @Success 200 {object} model.SuccessMsg @Failure 400 {object} model.FailureMsg @Router /host/{hostname} [patch]