Documentation
¶
Index ¶
- Variables
- func ChangeAccountPassword(username string, oldPassword string, newPassword string) (bool, error)
- func ConnectDatabase(dbPath string) error
- func ConvertSqliteTimestamp(t string) string
- func CreateArchitecture(a Architecture, id int) (bool, error)
- func CreateBuilding(b Building, id int) (bool, error)
- func CreateMachineRole(m MachineRole, id int) (bool, error)
- func CreateNetworkInterface(n NetworkInterface, id int) (bool, error)
- func CreateOSFamily(osFamily OperatingSystemFamily, id int) (bool, error)
- func CreateOSVersion(osVersion OperatingSystemVersion, id int) (bool, error)
- func CreateOU(o OrgUnit, id int) (bool, error)
- func CreateOperatingSystem(os OperatingSystem, id int) (bool, error)
- func CreateRole(r Role) (bool, error)
- func CreateStorageVolume(s StorageVolume, id int) (bool, error)
- func CreateUser(p ProposedUser) (bool, error)
- func CreateVendor(v Vendor, id int) (bool, error)
- func DeleteArchitecture(architectureId int) (bool, error)
- func DeleteBuilding(buildingId int) (bool, error)
- func DeleteMachineRole(machineRoleId int) (bool, error)
- func DeleteNetworkInterface(networkInterfaceId int) (bool, error)
- func DeleteOSFamily(osFamilyIdId int) (bool, error)
- func DeleteOSVersion(osVersionId int) (bool, error)
- func DeleteOU(ouId int) (bool, error)
- func DeleteOperatingSystem(osId int) (bool, error)
- func DeleteRole(roleId int) (bool, error)
- func DeleteStorageVolume(storageVolumeId int) (bool, error)
- func DeleteUser(username string) (bool, error)
- func DeleteVendor(vendorId int) (bool, error)
- func GetUserStatus(username string) (string, error)
- func SetUserOuId(username string, j UserOrgUnitId) (bool, error)
- func SetUserRoleId(username string, j UserRoleId) (bool, error)
- func SetUserStatus(username string, j UserStatus) (bool, error)
- func UpdateBuildingById(buildingId int, b Building) (bool, error)
- func UpdateMachineRoleById(machineRoleId int, m MachineRole) (bool, error)
- func UpdateNetworkInterface(networkInterfaceId int, n NetworkInterface) (bool, error)
- func UpdateOperatingSystemById(osId int, os OperatingSystem) (bool, error)
- func UpdateStorageVolume(id int, s StorageVolume) (bool, error)
- type Architecture
- type ArchitectureList
- type Building
- type BuildingList
- type FailureMsg
- type InvalidStatusValue
- type MachineRole
- type MachineRoleList
- type NetworkInterface
- func GetNetworkInterfaceById(id int) (NetworkInterface, error)
- func GetNetworkInterfaceByIpAddress(ipAddr string) (NetworkInterface, error)
- func GetNetworkInterfaceByMACAddress(macAddress string) (NetworkInterface, error)
- func GetNetworkInterfaces() ([]NetworkInterface, error)
- func GetNetworkInterfacesBySystemId(systemId int) ([]NetworkInterface, error)
- type NetworkInterfaces
- type OperatingSystem
- type OperatingSystemFamily
- type OperatingSystemFamilyList
- type OperatingSystemList
- type OperatingSystemVersion
- type OperatingSystemVersionList
- type OrgUnit
- type OrgUnitList
- type PasswordChange
- type PasswordHashMismatch
- type ProposedUser
- type Role
- type RolesList
- type StorageVolume
- type StorageVolumes
- type SuccessMsg
- type System
- type SystemList
- type User
- type UserOrgUnitId
- type UserOrgUnitIdMsg
- type UserRoleId
- type UserRoleIdMsg
- type UserStatus
- type UserStatusMsg
- type UsersList
- type Vendor
- type VendorList
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *sql.DB
Functions ¶
func ChangeAccountPassword ¶
func ConnectDatabase ¶
func ConvertSqliteTimestamp ¶
func CreateArchitecture ¶
func CreateArchitecture(a Architecture, id int) (bool, error)
func CreateMachineRole ¶
func CreateMachineRole(m MachineRole, id int) (bool, error)
func CreateNetworkInterface ¶
func CreateNetworkInterface(n NetworkInterface, id int) (bool, error)
func CreateOSFamily ¶
func CreateOSFamily(osFamily OperatingSystemFamily, id int) (bool, error)
func CreateOSVersion ¶
func CreateOSVersion(osVersion OperatingSystemVersion, id int) (bool, error)
func CreateOperatingSystem ¶
func CreateOperatingSystem(os OperatingSystem, id int) (bool, error)
func CreateRole ¶
func CreateStorageVolume ¶
func CreateStorageVolume(s StorageVolume, id int) (bool, error)
func CreateUser ¶
func CreateUser(p ProposedUser) (bool, error)
func DeleteArchitecture ¶
func DeleteBuilding ¶
func DeleteMachineRole ¶
func DeleteNetworkInterface ¶
func DeleteOSFamily ¶
func DeleteOSVersion ¶
func DeleteOperatingSystem ¶
func DeleteRole ¶
func DeleteStorageVolume ¶
func DeleteUser ¶
func DeleteVendor ¶
func GetUserStatus ¶
func SetUserOuId ¶
func SetUserOuId(username string, j UserOrgUnitId) (bool, error)
func SetUserRoleId ¶
func SetUserRoleId(username string, j UserRoleId) (bool, error)
func SetUserStatus ¶
func SetUserStatus(username string, j UserStatus) (bool, error)
func UpdateMachineRoleById ¶
func UpdateMachineRoleById(machineRoleId int, m MachineRole) (bool, error)
func UpdateNetworkInterface ¶
func UpdateNetworkInterface(networkInterfaceId int, n NetworkInterface) (bool, error)
func UpdateOperatingSystemById ¶
func UpdateOperatingSystemById(osId int, os OperatingSystem) (bool, error)
func UpdateStorageVolume ¶
func UpdateStorageVolume(id int, s StorageVolume) (bool, error)
Types ¶
type Architecture ¶
type Architecture struct { Id int `json:"Id"` ISEName string `json:"iseName"` RegisterSize int `json:"registerSize"` CreatorId int `json:"creatorId"` CreationDate string `json:"creationDate"` }
primary object structs
func GetArchitectureById ¶
func GetArchitectureById(id int) (Architecture, error)
func GetArchitectureByName ¶
func GetArchitectureByName(architectureName string) (Architecture, error)
func GetArchitectures ¶
func GetArchitectures() ([]Architecture, error)
type ArchitectureList ¶
type ArchitectureList struct {
Data []Architecture `json:"data"`
}
type Building ¶
type Building struct { Id int `json:"Id"` BuildingName string `json:"buildingName"` ShortName string `json:"shortName"` City string `json:"city"` Region string `json:"region"` CreatorId int `json:"creatorId"` CreationDate string `json:"creationDate"` }
func GetBuildingById ¶
func GetBuildingByShortName ¶
func GetBuildings ¶
type BuildingList ¶
type BuildingList struct {
Data []Building `json:"data"`
}
type FailureMsg ¶
type FailureMsg struct {
Error string `json:"error"`
}
type InvalidStatusValue ¶
type InvalidStatusValue struct {
Err error
}
func (*InvalidStatusValue) Error ¶
func (i *InvalidStatusValue) Error() string
type MachineRole ¶
type MachineRole struct { Id int `json:"Id"` MachineRoleName string `json:"machineRoleName"` Description string `json:"description"` CreatorId int `json:"creatorId"` CreationDate string `json:"creationDate"` }
func GetMachineRoleById ¶
func GetMachineRoleById(id int) (MachineRole, error)
func GetMachineRoleByName ¶
func GetMachineRoleByName(machineRoleName string) (MachineRole, error)
func GetMachineRoles ¶
func GetMachineRoles() ([]MachineRole, error)
type MachineRoleList ¶
type MachineRoleList struct {
Data []MachineRole `json:"data"`
}
type NetworkInterface ¶
type NetworkInterface struct { Id int `json:"Id"` DeviceModel string `json:"deviceModel"` DeviceId string `json:"deviceId"` MACAddress string `json:"macAddress"` SystemId int `json:"systemId"` IpAddress string `json:"ipAddress"` Bitmask int `json:"bitmask"` Gateway string `json:"gateway"` CreatorId int `json:"creatorId"` CreationDate string `json:"creationDate"` }
func GetNetworkInterfaceById ¶
func GetNetworkInterfaceById(id int) (NetworkInterface, error)
func GetNetworkInterfaceByIpAddress ¶
func GetNetworkInterfaceByIpAddress(ipAddr string) (NetworkInterface, error)
func GetNetworkInterfaceByMACAddress ¶
func GetNetworkInterfaceByMACAddress(macAddress string) (NetworkInterface, error)
func GetNetworkInterfaces ¶
func GetNetworkInterfaces() ([]NetworkInterface, error)
func GetNetworkInterfacesBySystemId ¶
func GetNetworkInterfacesBySystemId(systemId int) ([]NetworkInterface, error)
type NetworkInterfaces ¶
type NetworkInterfaces struct {
Interfaces []NetworkInterface `json:"interfaces"`
}
Note that this is not stored in the DB, rather it is synthesized off the runtime data
type OperatingSystem ¶
type OperatingSystem struct { Id int `json:"Id"` OSName string `json:"osName"` OSFamilyId int `json:"osFamilyId"` VendorId int `json:"vendorId"` OSImageUrl string `json:"osImageUrl"` ImageUriProtocol string `json:"imageUriProtocol"` CreatorId int `json:"creatorId"` CreationDate string `json:"creationDate"` }
func GetOperatingSystemById ¶
func GetOperatingSystemById(id int) (OperatingSystem, error)
func GetOperatingSystems ¶
func GetOperatingSystems() ([]OperatingSystem, error)
func GetOperatingSystemsByFamilyId ¶
func GetOperatingSystemsByFamilyId(osFamilyId int) ([]OperatingSystem, error)
func GetOperatingSystemsByVendorId ¶
func GetOperatingSystemsByVendorId(osVendorId int) ([]OperatingSystem, error)
type OperatingSystemFamily ¶
type OperatingSystemFamily struct { Id int `json:"Id"` OSFamilyName string `json:"osFamilyName"` CreatorId int `json:"creatorId"` CreationDate string `json:"creationDate"` }
func GetOSFamilies ¶
func GetOSFamilies() ([]OperatingSystemFamily, error)
func GetOSFamilyById ¶
func GetOSFamilyById(id int) (OperatingSystemFamily, error)
func GetOSFamilyByName ¶
func GetOSFamilyByName(name string) (OperatingSystemFamily, error)
type OperatingSystemFamilyList ¶
type OperatingSystemFamilyList struct {
Data []OperatingSystemFamily `json:"data"`
}
type OperatingSystemList ¶
type OperatingSystemList struct {
Data []OperatingSystem `json:"data"`
}
type OperatingSystemVersion ¶
type OperatingSystemVersion struct { Id int `json:"Id"` OperatingSystemId int `json:"osId"` VersionNumber string `json:"versionNumber"` CreatorId int `json:"creatorId"` CreationDate string `json:"creationDate"` }
func GetOSVersionById ¶
func GetOSVersionById(id int) (OperatingSystemVersion, error)
func GetOSVersions ¶
func GetOSVersions() ([]OperatingSystemVersion, error)
func GetOSVersionsByOSId ¶
func GetOSVersionsByOSId(osId int) ([]OperatingSystemVersion, error)
type OperatingSystemVersionList ¶
type OperatingSystemVersionList struct {
Data []OperatingSystemVersion `json:"data"`
}
type OrgUnit ¶
type OrgUnitList ¶
type OrgUnitList struct {
Data []OrgUnit `json:"data"`
}
type PasswordChange ¶
type PasswordHashMismatch ¶
type PasswordHashMismatch struct {
Err error
}
func (*PasswordHashMismatch) Error ¶
func (p *PasswordHashMismatch) Error() string
type ProposedUser ¶
type Role ¶
type Role struct { Id int `json:"Id"` RoleName string `json:"roleName"` Description string `json:"description"` CreationDate string `json:"creationDate"` }
func GetRoleById ¶
func GetRoleByName ¶
type StorageVolume ¶
type StorageVolume struct { Id int `json:"Id"` VolumeName string `json:"volumeName"` StorageType string `json:"storageType"` DeviceModel string `json:"deviceModel"` DeviceId string `json:"deviceId"` MountPoint string `json:"mountPoint"` VolumeSize int `json:"volumeSize"` VolumeFormat string `json:"volumeFormat"` VolumeLabel string `json:"volumeLabel"` SystemId int `json:"systemId"` CreatorId int `json:"creatorId"` CreationDate string `json:"creationDate"` }
func GetStorageVolumeById ¶
func GetStorageVolumeById(id int) (StorageVolume, error)
func GetStorageVolumeByLabel ¶
func GetStorageVolumeByLabel(label string, id int) (StorageVolume, error)
func GetStorageVolumes ¶
func GetStorageVolumes() ([]StorageVolume, error)
func GetStorageVolumesBySystemId ¶
func GetStorageVolumesBySystemId(systemId int) ([]StorageVolume, error)
type StorageVolumes ¶
type StorageVolumes struct {
Volumes []StorageVolume `json:"volumes"`
}
Note that this is not stored in the DB, it's synthesized from the data
type SuccessMsg ¶
type SuccessMsg struct {
Message string `json:"message"`
}
type System ¶
type System struct { Id int `json:"Id"` SerialNumber string `json:"serialNumber"` ModelId int `json:"modelId"` OperatingSystemId int `json:"osId"` Reimage bool `json:"reimage"` HostVars string `json:"HostVars"` BilledToOrgUnitId int `json:"billedToOrgUnitId"` VendorId int `json:"vendorId"` ArchitectureId int `json:"architectureId"` RAM int `json:"ram"` CpuCores int `json:"cpuCores"` CreatorId int `json:"creatorId"` CreationDate string `json:"creationDate"` }
type SystemList ¶
type SystemList struct {
Data []System `json:"data"`
}
type User ¶
type User struct { Id int `json:"Id"` UserName string `json:"userName"` FullName string `json:"fullName"` Status string `json:"status"` OrgUnitId int `json:"orgUnitId"` RoleId int `json:"roleId"` PasswordHash string `json:"passwordHash"` CreationDate string `json:"creationDate"` LastPasswordChangedDate string `json:"lastPasswordChangedDate"` }
func GetUserById ¶
func GetUserByUserName ¶
func GetUsersByOuId ¶
func GetUsersByRoleId ¶
type UserOrgUnitId ¶
type UserOrgUnitId struct {
OrgUnitId int `json:"orgUnitId"`
}
type UserOrgUnitIdMsg ¶
type UserRoleId ¶
type UserRoleId struct {
RoleId int `json:"roleId"`
}
type UserRoleIdMsg ¶
type UserStatus ¶
type UserStatus struct {
Status string `json:"status" enum:"enabled,disabled"`
}
type UserStatusMsg ¶
type Vendor ¶
type Vendor struct { Id int `json:"Id"` VendorName string `json:"vendorName"` CreatorId int `json:"creatorId"` CreationDate string `json:"creationDate"` }
func GetVendorById ¶
func GetVendorByName ¶
func GetVendors ¶
type VendorList ¶
type VendorList struct {
Data []Vendor `json:"data"`
}
Click to show internal directories.
Click to hide internal directories.