server

package
v0.0.0-...-9f7285a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IndexReplacePlaceholder = `<!--INJECT GENERATED CODE HERE FROM BACKEND-->`

Functions

func CreateKHIServer

func CreateKHIServer(inspectionServer *inspection.InspectionTaskServer, config *ServerConfig) *gin.Engine

Types

type GetInspectionTaskFeatureResponse

type GetInspectionTaskFeatureResponse struct {
	Features []inspection.FeatureListItem `json:"features"`
}

type GetInspectionTasksResponse

type GetInspectionTasksResponse struct {
	Tasks      map[string]SerializedMetadata `json:"tasks"`
	ServerStat *ServerStat                   `json:"serverStat"`
}

GetInspectionTasksResponse is the type of the response for /api/v2/inspection/tasks

type GetInspectionTypesResponse

type GetInspectionTypesResponse struct {
	Types []*inspection.InspectionType `json:"types"`
}

GetInspectionTypesResponse is the type of the response for /api/v2/inspection/types

type PostInspectionTaskDryRunRequest

type PostInspectionTaskDryRunRequest = map[string]any

type PostInspectionTaskResponse

type PostInspectionTaskResponse struct {
	InspectionId string `json:"inspectionId"`
}

type PutInspectionTaskFeatureRequest

type PutInspectionTaskFeatureRequest struct {
	Features []string `json:"features"`
}

type PutInspectionTaskFeatureResponse

type PutInspectionTaskFeatureResponse struct {
}

type ResourceMonitor

type ResourceMonitor interface {
	GetUsedMemory() int
}

type ResourceMonitorImpl

type ResourceMonitorImpl struct {
}

func (*ResourceMonitorImpl) GetUsedMemory

func (r *ResourceMonitorImpl) GetUsedMemory() int

GetUsedMemory implements ResourceMonitor.

type ResourceMonitorMock

type ResourceMonitorMock struct {
	UsedMemory int
}

func (*ResourceMonitorMock) GetUsedMemory

func (r *ResourceMonitorMock) GetUsedMemory() int

GetUsedMemory implements ResourceMonitor.

type SerializedMetadata

type SerializedMetadata = map[string]any

type ServerConfig

type ServerConfig struct {
	ViewerMode       bool
	StaticFolderPath string
	ResourceMonitor  ResourceMonitor
	ServerBasePath   string
}

type ServerStat

type ServerStat struct {
	TotalMemoryAvailable int `json:"totalMemoryAvailable"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL