Documentation ¶
Index ¶
- func ConvertReactAdminID(c *gin.Context, key string) string
- func CreateBootentry(c *gin.Context)
- func CreateIpxeaccount(c *gin.Context)
- func DeleteBootentry(c *gin.Context)
- func DeleteComputer(c *gin.Context)
- func DeleteIpxeaccount(c *gin.Context)
- func DownloadBootentryFile(c *gin.Context)
- func DownloadProtectedFile(c *gin.Context)
- func DownloadPublicFile(c *gin.Context)
- func Downloadfile(c *gin.Context, bootentryFile *models.BootentryFile, computer *models.Computer)
- func GetBootentry(c *gin.Context)
- func GetComputer(c *gin.Context)
- func GetIpxeaccount(c *gin.Context)
- func GetTFTPReader(config *utils.Config, db *gorm.DB) func(filename string, rf io.ReaderFrom) error
- func GetTFTPWriter(config *utils.Config) func(filename string, wt io.WriterTo) error
- func GrubScript(c *gin.Context)
- func IpxeScript(c *gin.Context)
- func ListBootentries(c *gin.Context)
- func ListComputers(c *gin.Context)
- func ListFilter(db *gorm.DB, c *gin.Context) *gorm.DB
- func ListIpxeaccount(c *gin.Context)
- func PaginationFilter(db *gorm.DB, c *gin.Context) *gorm.DB
- func SearchFields(c *gin.Context) []string
- func ToSnakeCase(str string) string
- func UpdateBootentry(c *gin.Context)
- func UpdateComputer(c *gin.Context)
- func UpdateIpxeaccount(c *gin.Context)
- func UploadBootentryFile(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateBootentry ¶
CreateBootentry @Summary Create Bootentry @Description Create a Bootentry @Accept json @Produce json @Param bootentry body models.Bootentry true "json format Bootentry" @Success 200 {object} models.Bootentry @Failure 400 {object} models.Error "Failed to create account in DB" @Failure 500 {object} models.Error "Unmarshall error" @Router /bootentries [post]
func CreateIpxeaccount ¶
CreateIpxeaccount @Summary Create iPXE account @Description Create a iPXE account @Accept json @Produce json @Param ipxeaccount body models.Ipxeaccount true "json format iPXE account" @Success 200 {object} models.Ipxeaccount @Failure 400 {object} models.Error "Failed to create account in DB" @Failure 500 {object} models.Error "Unmarshall error" @Router /ipxeaccount [post]
func DeleteBootentry ¶
DeleteBootentry @Summary Delete Bootentry @Description Delete Bootentry @Accept json @Produce json @Param uuid path string true "Bootentry UUID" minlength(36) maxlength(36) @Success 200 @Failure 400 {object} models.Error "Failed to parse UUID" @Failure 404 {object} models.Error "Bootentry UUID not found" @Router /Bootentries/{username} [delete]
func DeleteComputer ¶
DeleteComputer @Summary Delete computer @Description Delete a computer @Accept json @Produce json @Param id path string true "Computer UUID" minlength(36) maxlength(36) @Success 200 @Failure 400 {object} models.Error "Failed to parse UUID" @Failure 404 {object} models.Error "Can not find ID" @Router /computers/{id} [delete]
func DeleteIpxeaccount ¶
DeleteIpxeaccount @Summary Delete iPXE account @Description Delete a iPXE account @Accept json @Produce json @Param username path string true "Username" @Success 200 {object} models.Ipxeaccount @Failure 404 {object} models.Error "iPXE account not found" @Router /ipxeaccount/{username} [delete]
func DownloadBootentryFile ¶
func DownloadProtectedFile ¶
func DownloadPublicFile ¶
func Downloadfile ¶
func GetBootentry ¶
GetBootentry @Summary Get Bootentry @Description Get a Bootentry by Id @Accept json @Produce json @Param id path string true "Bootentry UUID" minlength(36) maxlength(36) @Success 200 {object} models.Bootentry @Failure 404 {object} models.Error "Computer with uuid %s not found" @Router /bootentries/{id} [get]
func GetComputer ¶
GetComputer @Summary Get computer @Description Get a computer by Id @Accept json @Produce json @Param id path string true "Computer UUID" minlength(36) maxlength(36) @Success 200 {object} models.Computer @Failure 404 {object} models.Error "Computer with uuid %s not found" @Router /computers/{id} [get]
func GetIpxeaccount ¶
GetIpxeaccount @Summary Get iPXE account @Description Get iPXE account by username @Accept json @Produce json @Param username path string true "Username" @Success 200 {object} models.Ipxeaccount @Failure 404 {object} models.Error "iPXE account not found" @Router /ipxeaccount/{username} [get]
func GetTFTPReader ¶
func GetTFTPWriter ¶
func GrubScript ¶
func IpxeScript ¶
func ListBootentries ¶
ListBootentries @Summary List Bootentries @Description List of Bootentry filtered or not @Accept json @Produce json @Param _start query int false "Offset" @Success 200 {object} []models.Bootentry @Router /bootentries [get]
func ListComputers ¶
ListComputers @Summary List computers @Description List of computers filtered or not @Accept json @Produce json @Param _start query int false "Offset" @Success 200 {object} []models.Computer @Router /computers [get]
func ListIpxeaccount ¶
ListIpxeaccount @Summary List iPXE account @Description List of accounts for ipxe @Accept json @Produce json @Param _start query int false "Offset" @Success 200 {object} []models.Ipxeaccount @Router /ipxeaccount [get]
func SearchFields ¶
func ToSnakeCase ¶
func UpdateBootentry ¶
UpdateBootentry @Summary Update Bootentry @Description Update a Bootentry @Accept json @Produce json @Param uuid path string true "Bootentry UUID" minlength(36) maxlength(36) @Param bootentry body models.Bootentry true "json format of Bootentry" @Success 200 {object} models.Bootentry @Failure 500 {object} models.Error "Unmarshall error" @Failure 400 {object} models.Error "Query uuid and uuid miss match" @Failure 404 {object} models.Error "Bootentry UUID not found" @Router /bootentries/{username} [put]
func UpdateComputer ¶
UpdateComputer @Summary Update computer @Description Update a computer @Accept json @Produce json @Param id path string true "Computer UUID" minlength(36) maxlength(36) @Param computer body models.Computer true "json format computer" @Success 200 {object} models.Computer @Failure 500 {object} models.Error "Unmarshall error" @Failure 400 {object} models.Error "Query ID and UUID miss match" @Failure 404 {object} models.Error "Can not find ID" @Router /computers/{id} [put]
func UpdateIpxeaccount ¶
UpdateIpxeaccount @Summary Update iPXE account @Description Update a iPXE account @Accept json @Produce json @Param username path string true "Username" @Param ipxeaccount body models.Ipxeaccount true "json format iPXE account" @Success 200 {object} models.Ipxeaccount @Failure 500 {object} models.Error "Unmarshall error" @Failure 400 {object} models.Error "Query username and username miss match" @Failure 404 {object} models.Error "iPXE account not found" @Router /ipxeaccount/{username} [put]
func UploadBootentryFile ¶
Types ¶
This section is empty.