Documentation
¶
Index ¶
- Variables
- func CreateKHIServer(engine *gin.Engine, inspectionServer *coreinspection.InspectionTaskServer, ...) *gin.Engine
- type GetInspectionFeatureResponse
- type GetInspectionTypesResponse
- type GetInspectionsResponse
- type PatchInspectionFeatureRequest
- type PostInspectionDryRunRequest
- type PostInspectionResponse
- type PutInspectionFeatureRequest
- type PutInspectionFeatureResponse
- type ResourceMonitor
- type ResourceMonitorImpl
- type ResourceMonitorMock
- type SerializedMetadata
- type ServerConfig
- type ServerFactory
- type ServerStat
Constants ¶
This section is empty.
Variables ¶
var IndexReplacePlaceholder = `<!--INJECT GENERATED CODE HERE FROM BACKEND-->`
Functions ¶
func CreateKHIServer ¶
func CreateKHIServer(engine *gin.Engine, inspectionServer *coreinspection.InspectionTaskServer, serverConfig *ServerConfig) *gin.Engine
Types ¶
type GetInspectionFeatureResponse ¶
type GetInspectionFeatureResponse struct {
Features []coreinspection.FeatureListItem `json:"features"`
}
type GetInspectionTypesResponse ¶
type GetInspectionTypesResponse struct {
Types []*coreinspection.InspectionType `json:"types"`
}
GetInspectionTypesResponse is the type of the response for /api/v3/inspection/types
type GetInspectionsResponse ¶
type GetInspectionsResponse struct {
Inspections map[string]SerializedMetadata `json:"inspections"`
ServerStat *ServerStat `json:"serverStat"`
}
GetInspectionsResponse is the type of the response for /api/v3/inspection
type PostInspectionResponse ¶
type PostInspectionResponse struct {
InspectionID string `json:"inspectionID"`
}
type PutInspectionFeatureRequest ¶
type PutInspectionFeatureRequest struct {
Features []string `json:"features"`
}
type PutInspectionFeatureResponse ¶
type PutInspectionFeatureResponse 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 ServerConfig ¶
type ServerConfig struct {
ViewerMode bool
StaticFolderPath string
ResourceMonitor ResourceMonitor
ServerBasePath string
UploadFileStore *upload.UploadFileStore
}
type ServerFactory ¶
ServerFactory is responsible for creating and configuring Gin engine instances.
var DefaultServerFactory *ServerFactory = &ServerFactory{}
DefaultServerFactory is the default instance of ServerFactory. This instance Options will be modified to extend the behavior of the gin server.
func (*ServerFactory) AddOptions ¶
func (s *ServerFactory) AddOptions(opt ...option.Option)
AddOptions adds one or more Option instances to the factory's configuration.
func (*ServerFactory) CreateInstance ¶
func (s *ServerFactory) CreateInstance(mode string) (*gin.Engine, error)
CreateInstance creates a new Gin engine and applies all registered options to it. It returns the configured Gin engine or an error if any option fails to apply.
type ServerStat ¶
type ServerStat struct {
TotalMemoryAvailable int `json:"totalMemoryAvailable"`
}