Documentation ¶
Index ¶
- Variables
- func ChangeAccountPassword(username string, oldPassword string, newPassword string) (bool, error)
- func ConnectDatabase(dbPath string) error
- func CreateDomain(d Domain, id int) (bool, error)
- func CreateHost(h Host, id int) (bool, error)
- func CreateSubnet(s Subnet, id int) (bool, error)
- func CreateUser(p ProposedUser) (bool, error)
- func DeleteDomain(domain string) (bool, error)
- func DeleteHostname(hostname string) (bool, error)
- func DeleteSubnet(subnetName string) (bool, error)
- func DeleteUser(username string) (bool, error)
- func GetUserStatus(username string) (string, error)
- func ModifySubnet(subnetName string, json SubnetUpdate) (bool, error)
- func SetUserStatus(username string, j UserStatus) (bool, error)
- func UpdateMacAddresses(hostname string, data []string) (bool, error)
- type Address
- func GetAddressByHostName(hostname string) (Address, error)
- func GetAddressByHostNameId(id int) (Address, error)
- func GetAddressById(id int) (Address, error)
- func GetAddressByIpAddress(ip string) (Address, error)
- func GetAddresses() ([]Address, error)
- func GetAddressesByDomainId(id int) ([]Address, error)
- func GetAddressesByDomainName(domainname string) ([]Address, error)
- func GetAddressesBySubnetId(id int) ([]Address, error)
- func GetAddressesBySubnetName(snetname string) ([]Address, error)
- type AddressTableInUse
- type Domain
- type DomainList
- type FailureMsg
- type Host
- type HostList
- type InvalidStatusValue
- type MacAddressList
- type PasswordChange
- type PasswordHashMismatch
- type ProposedUser
- type StringHost
- type Subnet
- type SubnetUpdate
- type Subnets
- type SuccessMsg
- type User
- type UserStatus
- type UserStatusMsg
- type UsersList
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *sql.DB
Functions ¶
func ChangeAccountPassword ¶
func ConnectDatabase ¶
func CreateUser ¶
func CreateUser(p ProposedUser) (bool, error)
func DeleteDomain ¶
func DeleteHostname ¶
func DeleteSubnet ¶
func DeleteUser ¶
func GetUserStatus ¶
func ModifySubnet ¶
func ModifySubnet(subnetName string, json SubnetUpdate) (bool, error)
func SetUserStatus ¶
func SetUserStatus(username string, j UserStatus) (bool, error)
Types ¶
type Address ¶
type Address struct { Id int `json:"Id"` Address string `json:"Address"` HostNameId int `json:"HostNameId"` DomainId int `json:"DomainId"` SubnetId int `json:"SubnetId"` CreatorId int `json:"CreatorId"` CreationDate string `json:"CreationDate"` }
func GetAddressByHostName ¶
func GetAddressByHostNameId ¶
func GetAddressById ¶
func GetAddressByIpAddress ¶
func GetAddresses ¶
func GetAddressesByDomainId ¶
func GetAddressesBySubnetId ¶
type AddressTableInUse ¶
type AddressTableInUse struct {
Err error
}
func (*AddressTableInUse) Error ¶
func (p *AddressTableInUse) Error() string
type Domain ¶
type Domain struct { Id int `json:"Id"` DomainName string `json:"DomainName"` CreatorId int `json:"CreatorId"` CreationDate string `json:"CreationDate"` }
func GetDomainByDomainName ¶
func GetDomainById ¶
func GetDomains ¶
type DomainList ¶
type DomainList struct {
Data []Domain `json:"data"`
}
type FailureMsg ¶
type FailureMsg struct {
Error string `json:"error"`
}
type Host ¶
type Host struct { Id int `json:"Id"` HostName string `json:"HostName"` MacAddresses []string `json:"MacAddresses"` CreatorId int `json:"CreatorId"` CreationDate string `json:"CreationDate"` }
func GetHostByHostName ¶
func GetHostById ¶
type InvalidStatusValue ¶
type InvalidStatusValue struct {
Err error
}
func (*InvalidStatusValue) Error ¶
func (i *InvalidStatusValue) Error() string
type MacAddressList ¶
type MacAddressList struct {
Data []string `json:"data"`
}
type PasswordChange ¶
type PasswordHashMismatch ¶
type PasswordHashMismatch struct {
Err error
}
func (*PasswordHashMismatch) Error ¶
func (p *PasswordHashMismatch) Error() string
type ProposedUser ¶
type StringHost ¶
type Subnet ¶
type Subnet struct { Id int `json:"Id"` NetworkName string `json:"NetworkName"` NetworkPrefix string `json:"NetworkPrefix"` BitMask int `json:"BitMask"` GatewayAddress string `json:"GatewayAddress"` DomainId int `json:"DomainId"` CreatorId int `json:"CreatorId"` CreationDate string `json:"CreationDate"` }
func GetSubnestByDomainId ¶
func GetSubnestByDomainName ¶
func GetSubnetById ¶
func GetSubnetByNetworkName ¶
func GetSubnets ¶
type SubnetUpdate ¶
type SuccessMsg ¶
type SuccessMsg struct {
Message string `json:"message"`
}
type User ¶
type User struct { Id int `json:"Id"` UserName string `json:"UserName"` Status string `json:"Status"` PasswordHash string `json:"PasswordHash"` CreationDate string `json:"CreationDate"` LastChangedDate string `json:"LastChangedDate"` }
func GetUserById ¶
func GetUserByUserName ¶
type UserStatus ¶
type UserStatus struct {
Status string `json:"status"`
}
type UserStatusMsg ¶
Click to show internal directories.
Click to hide internal directories.