var ( // ErrTypeAssertionError is thrown when type an interface does not match the asserted type ErrTypeAssertionError = errors.New("unable to assert type") )
func AssertAnnotationRequired(obj Annotation) error
AssertAnnotationRequired checks if the required fields are not zero-ed
func AssertApplyCommandRequired(obj ApplyCommand) error
AssertApplyCommandRequired checks if the required fields are not zero-ed
func AssertCommandRequired(obj Command) error
AssertCommandRequired checks if the required fields are not zero-ed
func AssertComponentCommandPostRequestRequired(obj ComponentCommandPostRequest) error
AssertComponentCommandPostRequestRequired checks if the required fields are not zero-ed
func AssertComponentGet200ResponseRequired(obj ComponentGet200Response) error
AssertComponentGet200ResponseRequired checks if the required fields are not zero-ed
func AssertCompositeCommandRequired(obj CompositeCommand) error
AssertCompositeCommandRequired checks if the required fields are not zero-ed
func AssertContainerRequired(obj Container) error
AssertContainerRequired checks if the required fields are not zero-ed
func AssertDevfileContentRequired(obj DevfileContent) error
AssertDevfileContentRequired checks if the required fields are not zero-ed
func AssertDevfileGet200ResponseRequired(obj DevfileGet200Response) error
AssertDevfileGet200ResponseRequired checks if the required fields are not zero-ed
func AssertDevfilePutRequestRequired(obj DevfilePutRequest) error
AssertDevfilePutRequestRequired checks if the required fields are not zero-ed
func AssertDevstateApplyCommandCommandNamePatchRequestRequired(obj DevstateApplyCommandCommandNamePatchRequest) error
AssertDevstateApplyCommandCommandNamePatchRequestRequired checks if the required fields are not zero-ed
func AssertDevstateApplyCommandPostRequestRequired(obj DevstateApplyCommandPostRequest) error
AssertDevstateApplyCommandPostRequestRequired checks if the required fields are not zero-ed
func AssertDevstateChartGet200ResponseRequired(obj DevstateChartGet200Response) error
AssertDevstateChartGet200ResponseRequired checks if the required fields are not zero-ed
func AssertDevstateCommandCommandNameMovePostRequestRequired(obj DevstateCommandCommandNameMovePostRequest) error
AssertDevstateCommandCommandNameMovePostRequestRequired checks if the required fields are not zero-ed
func AssertDevstateCommandCommandNameSetDefaultPostRequestRequired(obj DevstateCommandCommandNameSetDefaultPostRequest) error
AssertDevstateCommandCommandNameSetDefaultPostRequestRequired checks if the required fields are not zero-ed
func AssertDevstateCompositeCommandCommandNamePatchRequestRequired(obj DevstateCompositeCommandCommandNamePatchRequest) error
AssertDevstateCompositeCommandCommandNamePatchRequestRequired checks if the required fields are not zero-ed
func AssertDevstateCompositeCommandPostRequestRequired(obj DevstateCompositeCommandPostRequest) error
AssertDevstateCompositeCommandPostRequestRequired checks if the required fields are not zero-ed
func AssertDevstateContainerContainerNamePatchRequestRequired(obj DevstateContainerContainerNamePatchRequest) error
AssertDevstateContainerContainerNamePatchRequestRequired checks if the required fields are not zero-ed
func AssertDevstateContainerPostRequestRequired(obj DevstateContainerPostRequest) error
AssertDevstateContainerPostRequestRequired checks if the required fields are not zero-ed
func AssertDevstateDevfilePutRequestRequired(obj DevstateDevfilePutRequest) error
AssertDevstateDevfilePutRequestRequired checks if the required fields are not zero-ed
func AssertDevstateEventsPutRequestRequired(obj DevstateEventsPutRequest) error
AssertDevstateEventsPutRequestRequired checks if the required fields are not zero-ed
func AssertDevstateExecCommandCommandNamePatchRequestRequired(obj DevstateExecCommandCommandNamePatchRequest) error
AssertDevstateExecCommandCommandNamePatchRequestRequired checks if the required fields are not zero-ed
func AssertDevstateExecCommandPostRequestRequired(obj DevstateExecCommandPostRequest) error
AssertDevstateExecCommandPostRequestRequired checks if the required fields are not zero-ed
func AssertDevstateImageImageNamePatchRequestRequired(obj DevstateImageImageNamePatchRequest) error
AssertDevstateImageImageNamePatchRequestRequired checks if the required fields are not zero-ed
func AssertDevstateImagePostRequestRequired(obj DevstateImagePostRequest) error
AssertDevstateImagePostRequestRequired checks if the required fields are not zero-ed
func AssertDevstateQuantityValidPostRequestRequired(obj DevstateQuantityValidPostRequest) error
AssertDevstateQuantityValidPostRequestRequired checks if the required fields are not zero-ed
func AssertDevstateResourcePostRequestRequired(obj DevstateResourcePostRequest) error
AssertDevstateResourcePostRequestRequired checks if the required fields are not zero-ed
func AssertDevstateResourceResourceNamePatchRequestRequired(obj DevstateResourceResourceNamePatchRequest) error
AssertDevstateResourceResourceNamePatchRequestRequired checks if the required fields are not zero-ed
func AssertDevstateVolumePostRequestRequired(obj DevstateVolumePostRequest) error
AssertDevstateVolumePostRequestRequired checks if the required fields are not zero-ed
func AssertDevstateVolumeVolumeNamePatchRequestRequired(obj DevstateVolumeVolumeNamePatchRequest) error
AssertDevstateVolumeVolumeNamePatchRequestRequired checks if the required fields are not zero-ed
func AssertEndpointRequired(obj Endpoint) error
AssertEndpointRequired checks if the required fields are not zero-ed
func AssertEnvRequired(obj Env) error
AssertEnvRequired checks if the required fields are not zero-ed
func AssertEventsRequired(obj Events) error
AssertEventsRequired checks if the required fields are not zero-ed
func AssertExecCommandRequired(obj ExecCommand) error
AssertExecCommandRequired checks if the required fields are not zero-ed
func AssertGeneralErrorRequired(obj GeneralError) error
AssertGeneralErrorRequired checks if the required fields are not zero-ed
func AssertGeneralSuccessRequired(obj GeneralSuccess) error
AssertGeneralSuccessRequired checks if the required fields are not zero-ed
func AssertImageCommandRequired(obj ImageCommand) error
AssertImageCommandRequired checks if the required fields are not zero-ed
func AssertImageRequired(obj Image) error
AssertImageRequired checks if the required fields are not zero-ed
func AssertInstanceGet200ResponseRequired(obj InstanceGet200Response) error
AssertInstanceGet200ResponseRequired checks if the required fields are not zero-ed
func AssertMetadataRequestRequired(obj MetadataRequest) error
AssertMetadataRequestRequired checks if the required fields are not zero-ed
func AssertMetadataRequired(obj Metadata) error
AssertMetadataRequired checks if the required fields are not zero-ed
func AssertRecurseAnnotationRequired(objSlice interface{}) error
AssertRecurseAnnotationRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of Annotation (e.g. [][]Annotation), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseApplyCommandRequired(objSlice interface{}) error
AssertRecurseApplyCommandRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of ApplyCommand (e.g. [][]ApplyCommand), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseCommandRequired(objSlice interface{}) error
AssertRecurseCommandRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of Command (e.g. [][]Command), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseComponentCommandPostRequestRequired(objSlice interface{}) error
AssertRecurseComponentCommandPostRequestRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of ComponentCommandPostRequest (e.g. [][]ComponentCommandPostRequest), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseComponentGet200ResponseRequired(objSlice interface{}) error
AssertRecurseComponentGet200ResponseRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of ComponentGet200Response (e.g. [][]ComponentGet200Response), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseCompositeCommandRequired(objSlice interface{}) error
AssertRecurseCompositeCommandRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of CompositeCommand (e.g. [][]CompositeCommand), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseContainerRequired(objSlice interface{}) error
AssertRecurseContainerRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of Container (e.g. [][]Container), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseDevfileContentRequired(objSlice interface{}) error
AssertRecurseDevfileContentRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of DevfileContent (e.g. [][]DevfileContent), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseDevfileGet200ResponseRequired(objSlice interface{}) error
AssertRecurseDevfileGet200ResponseRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of DevfileGet200Response (e.g. [][]DevfileGet200Response), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseDevfilePutRequestRequired(objSlice interface{}) error
AssertRecurseDevfilePutRequestRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of DevfilePutRequest (e.g. [][]DevfilePutRequest), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseDevstateApplyCommandCommandNamePatchRequestRequired(objSlice interface{}) error
AssertRecurseDevstateApplyCommandCommandNamePatchRequestRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of DevstateApplyCommandCommandNamePatchRequest (e.g. [][]DevstateApplyCommandCommandNamePatchRequest), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseDevstateApplyCommandPostRequestRequired(objSlice interface{}) error
AssertRecurseDevstateApplyCommandPostRequestRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of DevstateApplyCommandPostRequest (e.g. [][]DevstateApplyCommandPostRequest), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseDevstateChartGet200ResponseRequired(objSlice interface{}) error
AssertRecurseDevstateChartGet200ResponseRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of DevstateChartGet200Response (e.g. [][]DevstateChartGet200Response), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseDevstateCommandCommandNameMovePostRequestRequired(objSlice interface{}) error
AssertRecurseDevstateCommandCommandNameMovePostRequestRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of DevstateCommandCommandNameMovePostRequest (e.g. [][]DevstateCommandCommandNameMovePostRequest), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseDevstateCommandCommandNameSetDefaultPostRequestRequired(objSlice interface{}) error
AssertRecurseDevstateCommandCommandNameSetDefaultPostRequestRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of DevstateCommandCommandNameSetDefaultPostRequest (e.g. [][]DevstateCommandCommandNameSetDefaultPostRequest), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseDevstateCompositeCommandCommandNamePatchRequestRequired(objSlice interface{}) error
AssertRecurseDevstateCompositeCommandCommandNamePatchRequestRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of DevstateCompositeCommandCommandNamePatchRequest (e.g. [][]DevstateCompositeCommandCommandNamePatchRequest), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseDevstateCompositeCommandPostRequestRequired(objSlice interface{}) error
AssertRecurseDevstateCompositeCommandPostRequestRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of DevstateCompositeCommandPostRequest (e.g. [][]DevstateCompositeCommandPostRequest), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseDevstateContainerContainerNamePatchRequestRequired(objSlice interface{}) error
AssertRecurseDevstateContainerContainerNamePatchRequestRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of DevstateContainerContainerNamePatchRequest (e.g. [][]DevstateContainerContainerNamePatchRequest), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseDevstateContainerPostRequestRequired(objSlice interface{}) error
AssertRecurseDevstateContainerPostRequestRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of DevstateContainerPostRequest (e.g. [][]DevstateContainerPostRequest), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseDevstateDevfilePutRequestRequired(objSlice interface{}) error
AssertRecurseDevstateDevfilePutRequestRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of DevstateDevfilePutRequest (e.g. [][]DevstateDevfilePutRequest), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseDevstateEventsPutRequestRequired(objSlice interface{}) error
AssertRecurseDevstateEventsPutRequestRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of DevstateEventsPutRequest (e.g. [][]DevstateEventsPutRequest), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseDevstateExecCommandCommandNamePatchRequestRequired(objSlice interface{}) error
AssertRecurseDevstateExecCommandCommandNamePatchRequestRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of DevstateExecCommandCommandNamePatchRequest (e.g. [][]DevstateExecCommandCommandNamePatchRequest), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseDevstateExecCommandPostRequestRequired(objSlice interface{}) error
AssertRecurseDevstateExecCommandPostRequestRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of DevstateExecCommandPostRequest (e.g. [][]DevstateExecCommandPostRequest), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseDevstateImageImageNamePatchRequestRequired(objSlice interface{}) error
AssertRecurseDevstateImageImageNamePatchRequestRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of DevstateImageImageNamePatchRequest (e.g. [][]DevstateImageImageNamePatchRequest), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseDevstateImagePostRequestRequired(objSlice interface{}) error
AssertRecurseDevstateImagePostRequestRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of DevstateImagePostRequest (e.g. [][]DevstateImagePostRequest), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseDevstateQuantityValidPostRequestRequired(objSlice interface{}) error
AssertRecurseDevstateQuantityValidPostRequestRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of DevstateQuantityValidPostRequest (e.g. [][]DevstateQuantityValidPostRequest), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseDevstateResourcePostRequestRequired(objSlice interface{}) error
AssertRecurseDevstateResourcePostRequestRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of DevstateResourcePostRequest (e.g. [][]DevstateResourcePostRequest), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseDevstateResourceResourceNamePatchRequestRequired(objSlice interface{}) error
AssertRecurseDevstateResourceResourceNamePatchRequestRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of DevstateResourceResourceNamePatchRequest (e.g. [][]DevstateResourceResourceNamePatchRequest), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseDevstateVolumePostRequestRequired(objSlice interface{}) error
AssertRecurseDevstateVolumePostRequestRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of DevstateVolumePostRequest (e.g. [][]DevstateVolumePostRequest), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseDevstateVolumeVolumeNamePatchRequestRequired(objSlice interface{}) error
AssertRecurseDevstateVolumeVolumeNamePatchRequestRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of DevstateVolumeVolumeNamePatchRequest (e.g. [][]DevstateVolumeVolumeNamePatchRequest), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseEndpointRequired(objSlice interface{}) error
AssertRecurseEndpointRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of Endpoint (e.g. [][]Endpoint), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseEnvRequired(objSlice interface{}) error
AssertRecurseEnvRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of Env (e.g. [][]Env), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseEventsRequired(objSlice interface{}) error
AssertRecurseEventsRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of Events (e.g. [][]Events), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseExecCommandRequired(objSlice interface{}) error
AssertRecurseExecCommandRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of ExecCommand (e.g. [][]ExecCommand), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseGeneralErrorRequired(objSlice interface{}) error
AssertRecurseGeneralErrorRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of GeneralError (e.g. [][]GeneralError), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseGeneralSuccessRequired(objSlice interface{}) error
AssertRecurseGeneralSuccessRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of GeneralSuccess (e.g. [][]GeneralSuccess), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseImageCommandRequired(objSlice interface{}) error
AssertRecurseImageCommandRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of ImageCommand (e.g. [][]ImageCommand), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseImageRequired(objSlice interface{}) error
AssertRecurseImageRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of Image (e.g. [][]Image), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseInstanceGet200ResponseRequired(objSlice interface{}) error
AssertRecurseInstanceGet200ResponseRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of InstanceGet200Response (e.g. [][]InstanceGet200Response), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseInterfaceRequired(obj interface{}, callback func(interface{}) error) error
AssertRecurseInterfaceRequired recursively checks each struct in a slice against the callback. This method traverse nested slices in a preorder fashion.
func AssertRecurseMetadataRequestRequired(objSlice interface{}) error
AssertRecurseMetadataRequestRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of MetadataRequest (e.g. [][]MetadataRequest), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseMetadataRequired(objSlice interface{}) error
AssertRecurseMetadataRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of Metadata (e.g. [][]Metadata), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseResourceRequired(objSlice interface{}) error
AssertRecurseResourceRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of Resource (e.g. [][]Resource), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseTelemetryGet200ResponseRequired(objSlice interface{}) error
AssertRecurseTelemetryGet200ResponseRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of TelemetryGet200Response (e.g. [][]TelemetryGet200Response), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseTelemetryResponseRequired(objSlice interface{}) error
AssertRecurseTelemetryResponseRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of TelemetryResponse (e.g. [][]TelemetryResponse), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseValueRequired(value reflect.Value, callback func(interface{}) error) error
AssertRecurseValueRequired checks each struct in the nested slice against the callback. This method traverse nested slices in a preorder fashion.
func AssertRecurseVolumeMountRequired(objSlice interface{}) error
AssertRecurseVolumeMountRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of VolumeMount (e.g. [][]VolumeMount), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseVolumeRequired(objSlice interface{}) error
AssertRecurseVolumeRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of Volume (e.g. [][]Volume), otherwise ErrTypeAssertionError is thrown.
func AssertResourceRequired(obj Resource) error
AssertResourceRequired checks if the required fields are not zero-ed
func AssertTelemetryGet200ResponseRequired(obj TelemetryGet200Response) error
AssertTelemetryGet200ResponseRequired checks if the required fields are not zero-ed
func AssertTelemetryResponseRequired(obj TelemetryResponse) error
AssertTelemetryResponseRequired checks if the required fields are not zero-ed
func AssertVolumeMountRequired(obj VolumeMount) error
AssertVolumeMountRequired checks if the required fields are not zero-ed
func AssertVolumeRequired(obj Volume) error
AssertVolumeRequired checks if the required fields are not zero-ed
func DefaultErrorHandler(w http.ResponseWriter, r *http.Request, err error, result *ImplResponse)
DefaultErrorHandler defines the default logic on how to handle errors from the controller. Any errors from parsing request params will return a StatusBadRequest. Otherwise, the error code originating from the servicer will be used.
func EncodeJSONResponse(i interface{}, status *int, w http.ResponseWriter) error
EncodeJSONResponse uses the json encoder to write an interface to the http response with an optional status code
func IsZeroValue(val interface{}) bool
IsZeroValue checks if the val is the zero-ed value.
func Logger(inner http.Handler, name string) http.Handler
func NewRouter(routers ...Router) *mux.Router
NewRouter creates a new router for any number of api routers
func ReadFormFileToTempFile(r *http.Request, key string) (*os.File, error)
ReadFormFileToTempFile reads file data from a request form and writes it to a temporary file
func ReadFormFilesToTempFiles(r *http.Request, key string) ([]*os.File, error)
ReadFormFilesToTempFiles reads files array data from a request form and writes it to a temporary files
type Annotation struct { Deployment map[string]string `json:"deployment"` Service map[string]string `json:"service"` }
type ApplyCommand struct { Component string `json:"component"` }
type Command struct { Name string `json:"name"` Group string `json:"group"` Default bool `json:"default,omitempty"` Type string `json:"type"` Exec ExecCommand `json:"exec,omitempty"` Apply ApplyCommand `json:"apply,omitempty"` Image ImageCommand `json:"image,omitempty"` Composite CompositeCommand `json:"composite,omitempty"` }
type ComponentCommandPostRequest struct { // Name of the command that should be executed Name string `json:"name,omitempty"` }
type ComponentGet200Response struct { // Description of the component. This is the same as output of 'odo describe component -o json' Component map[string]interface{} `json:"component,omitempty"` }
type CompositeCommand struct { Commands []string `json:"commands"` Parallel bool `json:"parallel"` }
type Container struct { Name string `json:"name"` Image string `json:"image"` Command []string `json:"command"` Args []string `json:"args"` MemoryRequest string `json:"memoryRequest"` MemoryLimit string `json:"memoryLimit"` CpuRequest string `json:"cpuRequest"` CpuLimit string `json:"cpuLimit"` VolumeMounts []VolumeMount `json:"volumeMounts"` Annotation Annotation `json:"annotation"` Endpoints []Endpoint `json:"endpoints"` Env []Env `json:"env"` ConfigureSources bool `json:"configureSources"` MountSources bool `json:"mountSources"` SourceMapping string `json:"sourceMapping"` }
DefaultApiController binds http requests to an api service and writes the service results to the http response
type DefaultApiController struct {
// contains filtered or unexported fields
}
func (c *DefaultApiController) ComponentCommandPost(w http.ResponseWriter, r *http.Request)
ComponentCommandPost -
func (c *DefaultApiController) ComponentGet(w http.ResponseWriter, r *http.Request)
ComponentGet -
func (c *DefaultApiController) DevfileGet(w http.ResponseWriter, r *http.Request)
DevfileGet -
func (c *DefaultApiController) DevfilePut(w http.ResponseWriter, r *http.Request)
DevfilePut -
func (c *DefaultApiController) InstanceDelete(w http.ResponseWriter, r *http.Request)
InstanceDelete -
func (c *DefaultApiController) InstanceGet(w http.ResponseWriter, r *http.Request)
InstanceGet -
func (c *DefaultApiController) Routes() Routes
Routes returns all the api routes for the DefaultApiController
func (c *DefaultApiController) TelemetryGet(w http.ResponseWriter, r *http.Request)
TelemetryGet -
DefaultApiOption for how the controller is set up.
type DefaultApiOption func(*DefaultApiController)
func WithDefaultApiErrorHandler(h ErrorHandler) DefaultApiOption
WithDefaultApiErrorHandler inject ErrorHandler into controller
DefaultApiRouter defines the required methods for binding the api requests to a responses for the DefaultApi The DefaultApiRouter implementation should parse necessary information from the http request, pass the data to a DefaultApiServicer to perform the required actions, then write the service results to the http response.
type DefaultApiRouter interface { ComponentCommandPost(http.ResponseWriter, *http.Request) ComponentGet(http.ResponseWriter, *http.Request) DevfileGet(http.ResponseWriter, *http.Request) DevfilePut(http.ResponseWriter, *http.Request) InstanceDelete(http.ResponseWriter, *http.Request) InstanceGet(http.ResponseWriter, *http.Request) TelemetryGet(http.ResponseWriter, *http.Request) }
DefaultApiServicer defines the api actions for the DefaultApi service This interface intended to stay up to date with the openapi yaml used to generate it, while the service implementation can be ignored with the .openapi-generator-ignore file and updated with the logic required for the API.
type DefaultApiServicer interface { ComponentCommandPost(context.Context, ComponentCommandPostRequest) (ImplResponse, error) ComponentGet(context.Context) (ImplResponse, error) DevfileGet(context.Context) (ImplResponse, error) DevfilePut(context.Context, DevfilePutRequest) (ImplResponse, error) InstanceDelete(context.Context) (ImplResponse, error) InstanceGet(context.Context) (ImplResponse, error) TelemetryGet(context.Context) (ImplResponse, error) }
type DevfileContent struct { Content string `json:"content"` Version string `json:"version"` Commands []Command `json:"commands"` Containers []Container `json:"containers"` Images []Image `json:"images"` Resources []Resource `json:"resources"` Volumes []Volume `json:"volumes"` Events Events `json:"events"` Metadata Metadata `json:"metadata"` }
type DevfileGet200Response struct { Content string `json:"content,omitempty"` }
type DevfilePutRequest struct { Content string `json:"content"` }
DevstateApiController binds http requests to an api service and writes the service results to the http response
type DevstateApiController struct {
// contains filtered or unexported fields
}
func (c *DevstateApiController) DevstateApplyCommandCommandNamePatch(w http.ResponseWriter, r *http.Request)
DevstateApplyCommandCommandNamePatch -
func (c *DevstateApiController) DevstateApplyCommandPost(w http.ResponseWriter, r *http.Request)
DevstateApplyCommandPost -
func (c *DevstateApiController) DevstateChartGet(w http.ResponseWriter, r *http.Request)
DevstateChartGet -
func (c *DevstateApiController) DevstateCommandCommandNameDelete(w http.ResponseWriter, r *http.Request)
DevstateCommandCommandNameDelete -
func (c *DevstateApiController) DevstateCommandCommandNameMovePost(w http.ResponseWriter, r *http.Request)
DevstateCommandCommandNameMovePost -
func (c *DevstateApiController) DevstateCommandCommandNameSetDefaultPost(w http.ResponseWriter, r *http.Request)
DevstateCommandCommandNameSetDefaultPost -
func (c *DevstateApiController) DevstateCommandCommandNameUnsetDefaultPost(w http.ResponseWriter, r *http.Request)
DevstateCommandCommandNameUnsetDefaultPost -
func (c *DevstateApiController) DevstateCompositeCommandCommandNamePatch(w http.ResponseWriter, r *http.Request)
DevstateCompositeCommandCommandNamePatch -
func (c *DevstateApiController) DevstateCompositeCommandPost(w http.ResponseWriter, r *http.Request)
DevstateCompositeCommandPost -
func (c *DevstateApiController) DevstateContainerContainerNameDelete(w http.ResponseWriter, r *http.Request)
DevstateContainerContainerNameDelete -
func (c *DevstateApiController) DevstateContainerContainerNamePatch(w http.ResponseWriter, r *http.Request)
DevstateContainerContainerNamePatch -
func (c *DevstateApiController) DevstateContainerPost(w http.ResponseWriter, r *http.Request)
DevstateContainerPost -
func (c *DevstateApiController) DevstateDevfileDelete(w http.ResponseWriter, r *http.Request)
DevstateDevfileDelete -
func (c *DevstateApiController) DevstateDevfileGet(w http.ResponseWriter, r *http.Request)
DevstateDevfileGet -
func (c *DevstateApiController) DevstateDevfilePut(w http.ResponseWriter, r *http.Request)
DevstateDevfilePut -
func (c *DevstateApiController) DevstateEventsPut(w http.ResponseWriter, r *http.Request)
DevstateEventsPut -
func (c *DevstateApiController) DevstateExecCommandCommandNamePatch(w http.ResponseWriter, r *http.Request)
DevstateExecCommandCommandNamePatch -
func (c *DevstateApiController) DevstateExecCommandPost(w http.ResponseWriter, r *http.Request)
DevstateExecCommandPost -
func (c *DevstateApiController) DevstateImageImageNameDelete(w http.ResponseWriter, r *http.Request)
DevstateImageImageNameDelete -
func (c *DevstateApiController) DevstateImageImageNamePatch(w http.ResponseWriter, r *http.Request)
DevstateImageImageNamePatch -
func (c *DevstateApiController) DevstateImagePost(w http.ResponseWriter, r *http.Request)
DevstateImagePost -
func (c *DevstateApiController) DevstateMetadataPut(w http.ResponseWriter, r *http.Request)
DevstateMetadataPut -
func (c *DevstateApiController) DevstateQuantityValidPost(w http.ResponseWriter, r *http.Request)
DevstateQuantityValidPost -
func (c *DevstateApiController) DevstateResourcePost(w http.ResponseWriter, r *http.Request)
DevstateResourcePost -
func (c *DevstateApiController) DevstateResourceResourceNameDelete(w http.ResponseWriter, r *http.Request)
DevstateResourceResourceNameDelete -
func (c *DevstateApiController) DevstateResourceResourceNamePatch(w http.ResponseWriter, r *http.Request)
DevstateResourceResourceNamePatch -
func (c *DevstateApiController) DevstateVolumePost(w http.ResponseWriter, r *http.Request)
DevstateVolumePost -
func (c *DevstateApiController) DevstateVolumeVolumeNameDelete(w http.ResponseWriter, r *http.Request)
DevstateVolumeVolumeNameDelete -
func (c *DevstateApiController) DevstateVolumeVolumeNamePatch(w http.ResponseWriter, r *http.Request)
DevstateVolumeVolumeNamePatch -
func (c *DevstateApiController) Routes() Routes
Routes returns all the api routes for the DevstateApiController
DevstateApiOption for how the controller is set up.
type DevstateApiOption func(*DevstateApiController)
func WithDevstateApiErrorHandler(h ErrorHandler) DevstateApiOption
WithDevstateApiErrorHandler inject ErrorHandler into controller
DevstateApiRouter defines the required methods for binding the api requests to a responses for the DevstateApi The DevstateApiRouter implementation should parse necessary information from the http request, pass the data to a DevstateApiServicer to perform the required actions, then write the service results to the http response.
type DevstateApiRouter interface { DevstateApplyCommandCommandNamePatch(http.ResponseWriter, *http.Request) DevstateApplyCommandPost(http.ResponseWriter, *http.Request) DevstateChartGet(http.ResponseWriter, *http.Request) DevstateCommandCommandNameDelete(http.ResponseWriter, *http.Request) DevstateCommandCommandNameMovePost(http.ResponseWriter, *http.Request) DevstateCommandCommandNameSetDefaultPost(http.ResponseWriter, *http.Request) DevstateCommandCommandNameUnsetDefaultPost(http.ResponseWriter, *http.Request) DevstateCompositeCommandCommandNamePatch(http.ResponseWriter, *http.Request) DevstateCompositeCommandPost(http.ResponseWriter, *http.Request) DevstateContainerContainerNameDelete(http.ResponseWriter, *http.Request) DevstateContainerContainerNamePatch(http.ResponseWriter, *http.Request) DevstateContainerPost(http.ResponseWriter, *http.Request) DevstateDevfileDelete(http.ResponseWriter, *http.Request) DevstateDevfileGet(http.ResponseWriter, *http.Request) DevstateDevfilePut(http.ResponseWriter, *http.Request) DevstateEventsPut(http.ResponseWriter, *http.Request) DevstateExecCommandCommandNamePatch(http.ResponseWriter, *http.Request) DevstateExecCommandPost(http.ResponseWriter, *http.Request) DevstateImageImageNameDelete(http.ResponseWriter, *http.Request) DevstateImageImageNamePatch(http.ResponseWriter, *http.Request) DevstateImagePost(http.ResponseWriter, *http.Request) DevstateMetadataPut(http.ResponseWriter, *http.Request) DevstateQuantityValidPost(http.ResponseWriter, *http.Request) DevstateResourcePost(http.ResponseWriter, *http.Request) DevstateResourceResourceNameDelete(http.ResponseWriter, *http.Request) DevstateResourceResourceNamePatch(http.ResponseWriter, *http.Request) DevstateVolumePost(http.ResponseWriter, *http.Request) DevstateVolumeVolumeNameDelete(http.ResponseWriter, *http.Request) DevstateVolumeVolumeNamePatch(http.ResponseWriter, *http.Request) }
DevstateApiServicer defines the api actions for the DevstateApi service This interface intended to stay up to date with the openapi yaml used to generate it, while the service implementation can be ignored with the .openapi-generator-ignore file and updated with the logic required for the API.
type DevstateApiServicer interface { DevstateApplyCommandCommandNamePatch(context.Context, string, DevstateApplyCommandCommandNamePatchRequest) (ImplResponse, error) DevstateApplyCommandPost(context.Context, DevstateApplyCommandPostRequest) (ImplResponse, error) DevstateChartGet(context.Context) (ImplResponse, error) DevstateCommandCommandNameDelete(context.Context, string) (ImplResponse, error) DevstateCommandCommandNameMovePost(context.Context, string, DevstateCommandCommandNameMovePostRequest) (ImplResponse, error) DevstateCommandCommandNameSetDefaultPost(context.Context, string, DevstateCommandCommandNameSetDefaultPostRequest) (ImplResponse, error) DevstateCommandCommandNameUnsetDefaultPost(context.Context, string) (ImplResponse, error) DevstateCompositeCommandCommandNamePatch(context.Context, string, DevstateCompositeCommandCommandNamePatchRequest) (ImplResponse, error) DevstateCompositeCommandPost(context.Context, DevstateCompositeCommandPostRequest) (ImplResponse, error) DevstateContainerContainerNameDelete(context.Context, string) (ImplResponse, error) DevstateContainerContainerNamePatch(context.Context, string, DevstateContainerContainerNamePatchRequest) (ImplResponse, error) DevstateContainerPost(context.Context, DevstateContainerPostRequest) (ImplResponse, error) DevstateDevfileDelete(context.Context) (ImplResponse, error) DevstateDevfileGet(context.Context) (ImplResponse, error) DevstateDevfilePut(context.Context, DevstateDevfilePutRequest) (ImplResponse, error) DevstateEventsPut(context.Context, DevstateEventsPutRequest) (ImplResponse, error) DevstateExecCommandCommandNamePatch(context.Context, string, DevstateExecCommandCommandNamePatchRequest) (ImplResponse, error) DevstateExecCommandPost(context.Context, DevstateExecCommandPostRequest) (ImplResponse, error) DevstateImageImageNameDelete(context.Context, string) (ImplResponse, error) DevstateImageImageNamePatch(context.Context, string, DevstateImageImageNamePatchRequest) (ImplResponse, error) DevstateImagePost(context.Context, DevstateImagePostRequest) (ImplResponse, error) DevstateMetadataPut(context.Context, MetadataRequest) (ImplResponse, error) DevstateQuantityValidPost(context.Context, DevstateQuantityValidPostRequest) (ImplResponse, error) DevstateResourcePost(context.Context, DevstateResourcePostRequest) (ImplResponse, error) DevstateResourceResourceNameDelete(context.Context, string) (ImplResponse, error) DevstateResourceResourceNamePatch(context.Context, string, DevstateResourceResourceNamePatchRequest) (ImplResponse, error) DevstateVolumePost(context.Context, DevstateVolumePostRequest) (ImplResponse, error) DevstateVolumeVolumeNameDelete(context.Context, string) (ImplResponse, error) DevstateVolumeVolumeNamePatch(context.Context, string, DevstateVolumeVolumeNamePatchRequest) (ImplResponse, error) }
type DevstateApplyCommandCommandNamePatchRequest struct { Component string `json:"component,omitempty"` }
type DevstateApplyCommandPostRequest struct { // Name of the command Name string `json:"name,omitempty"` Component string `json:"component,omitempty"` }
type DevstateChartGet200Response struct { // chart in mermaid format Chart string `json:"chart"` }
type DevstateCommandCommandNameMovePostRequest struct { // Initial group of the command FromGroup string `json:"fromGroup,omitempty"` // Initial index of the command in the group FromIndex int32 `json:"fromIndex,omitempty"` // Target group of the command ToGroup string `json:"toGroup,omitempty"` // Target index of the command in the group ToIndex int32 `json:"toIndex,omitempty"` }
type DevstateCommandCommandNameSetDefaultPostRequest struct { // group of the command Group string `json:"group,omitempty"` }
type DevstateCompositeCommandCommandNamePatchRequest struct { Parallel bool `json:"parallel,omitempty"` Commands []string `json:"commands,omitempty"` }
type DevstateCompositeCommandPostRequest struct { // Name of the command Name string `json:"name,omitempty"` Parallel bool `json:"parallel,omitempty"` Commands []string `json:"commands,omitempty"` }
type DevstateContainerContainerNamePatchRequest struct { // Container image Image string `json:"image"` // Entrypoint of the container Command []string `json:"command,omitempty"` // Args passed to the Container entrypoint Args []string `json:"args,omitempty"` // Environment variables to define Env []Env `json:"env,omitempty"` // Requested memory for the deployed container MemReq string `json:"memReq,omitempty"` // Memory limit for the deployed container MemLimit string `json:"memLimit,omitempty"` // Requested CPU for the deployed container CpuReq string `json:"cpuReq,omitempty"` // CPU limit for the deployed container CpuLimit string `json:"cpuLimit,omitempty"` // Volume to mount into the container filesystem VolumeMounts []VolumeMount `json:"volumeMounts,omitempty"` // If false, mountSources and sourceMapping values are not considered ConfigureSources bool `json:"configureSources,omitempty"` // If true, sources are mounted into container's filesystem MountSources bool `json:"mountSources,omitempty"` // Specific directory on which to mount sources SourceMapping string `json:"sourceMapping,omitempty"` Annotation Annotation `json:"annotation,omitempty"` // Endpoints exposed by the container Endpoints []Endpoint `json:"endpoints,omitempty"` }
type DevstateContainerPostRequest struct { // Name of the container Name string `json:"name"` // Container image Image string `json:"image"` // Entrypoint of the container Command []string `json:"command,omitempty"` // Args passed to the Container entrypoint Args []string `json:"args,omitempty"` // Environment variables to define Env []Env `json:"env,omitempty"` // Requested memory for the deployed container MemReq string `json:"memReq,omitempty"` // Memory limit for the deployed container MemLimit string `json:"memLimit,omitempty"` // Requested CPU for the deployed container CpuReq string `json:"cpuReq,omitempty"` // CPU limit for the deployed container CpuLimit string `json:"cpuLimit,omitempty"` // Volume to mount into the container filesystem VolumeMounts []VolumeMount `json:"volumeMounts,omitempty"` // If false, mountSources and sourceMapping values are not considered ConfigureSources bool `json:"configureSources,omitempty"` // If true, sources are mounted into container's filesystem MountSources bool `json:"mountSources,omitempty"` // Specific directory on which to mount sources SourceMapping string `json:"sourceMapping,omitempty"` Annotation Annotation `json:"annotation,omitempty"` // Endpoints exposed by the container Endpoints []Endpoint `json:"endpoints,omitempty"` }
type DevstateDevfilePutRequest struct { Content string `json:"content"` }
type DevstateEventsPutRequest struct { EventName string `json:"eventName,omitempty"` Commands []string `json:"commands,omitempty"` }
type DevstateExecCommandCommandNamePatchRequest struct { Component string `json:"component,omitempty"` CommandLine string `json:"commandLine,omitempty"` WorkingDir string `json:"workingDir,omitempty"` HotReloadCapable bool `json:"hotReloadCapable,omitempty"` }
type DevstateExecCommandPostRequest struct { // Name of the command Name string `json:"name,omitempty"` Component string `json:"component,omitempty"` CommandLine string `json:"commandLine,omitempty"` WorkingDir string `json:"workingDir,omitempty"` HotReloadCapable bool `json:"hotReloadCapable,omitempty"` }
type DevstateImageImageNamePatchRequest struct { ImageName string `json:"imageName,omitempty"` Args []string `json:"args,omitempty"` BuildContext string `json:"buildContext,omitempty"` RootRequired bool `json:"rootRequired,omitempty"` Uri string `json:"uri,omitempty"` AutoBuild string `json:"autoBuild,omitempty"` }
type DevstateImagePostRequest struct { // Name of the image Name string `json:"name,omitempty"` ImageName string `json:"imageName,omitempty"` Args []string `json:"args,omitempty"` BuildContext string `json:"buildContext,omitempty"` RootRequired bool `json:"rootRequired,omitempty"` Uri string `json:"uri,omitempty"` AutoBuild string `json:"autoBuild,omitempty"` }
type DevstateQuantityValidPostRequest struct { Quantity string `json:"quantity"` }
type DevstateResourcePostRequest struct { // Name of the resource Name string `json:"name,omitempty"` Inlined string `json:"inlined,omitempty"` Uri string `json:"uri,omitempty"` DeployByDefault string `json:"deployByDefault,omitempty"` }
type DevstateResourceResourceNamePatchRequest struct { Inlined string `json:"inlined,omitempty"` Uri string `json:"uri,omitempty"` DeployByDefault string `json:"deployByDefault,omitempty"` }
type DevstateVolumePostRequest struct { // Name of the volume Name string `json:"name,omitempty"` // Minimal size of the volume Size string `json:"size,omitempty"` // True if the Volume is Ephemeral Ephemeral bool `json:"ephemeral,omitempty"` }
type DevstateVolumeVolumeNamePatchRequest struct { // Minimal size of the volume Size string `json:"size,omitempty"` // True if the Volume is Ephemeral Ephemeral bool `json:"ephemeral,omitempty"` }
type Endpoint struct { Name string `json:"name"` Exposure string `json:"exposure,omitempty"` Path string `json:"path,omitempty"` Protocol string `json:"protocol,omitempty"` Secure bool `json:"secure,omitempty"` TargetPort int32 `json:"targetPort"` }
type Env struct { Name string `json:"name"` Value string `json:"value"` }
ErrorHandler defines the required method for handling error. You may implement it and inject this into a controller if you would like errors to be handled differently from the DefaultErrorHandler
type ErrorHandler func(w http.ResponseWriter, r *http.Request, err error, result *ImplResponse)
type Events struct { PreStart []string `json:"preStart,omitempty"` PostStart []string `json:"postStart,omitempty"` PreStop []string `json:"preStop,omitempty"` PostStop []string `json:"postStop,omitempty"` }
type ExecCommand struct { Component string `json:"component"` CommandLine string `json:"commandLine"` WorkingDir string `json:"workingDir"` HotReloadCapable bool `json:"hotReloadCapable"` }
type GeneralError struct { Message string `json:"message,omitempty"` }
type GeneralSuccess struct { Message string `json:"message,omitempty"` }
type Image struct { Name string `json:"name"` ImageName string `json:"imageName"` Args []string `json:"args"` BuildContext string `json:"buildContext"` RootRequired bool `json:"rootRequired"` Uri string `json:"uri"` AutoBuild string `json:"autoBuild"` // true if the image is not referenced in any command Orphan bool `json:"orphan"` }
type ImageCommand struct { Component string `json:"component"` }
ImplResponse response defines an error code with the associated body
type ImplResponse struct { Code int Body interface{} }
func Response(code int, body interface{}) ImplResponse
Response return a ImplResponse struct filled
type InstanceGet200Response struct { // Directory on which this 'odo dev' instance is running ComponentDirectory string `json:"componentDirectory,omitempty"` // PID of the this 'odo dev' instance. Pid int32 `json:"pid,omitempty"` }
type Metadata struct { Name string `json:"name"` Version string `json:"version"` DisplayName string `json:"displayName"` Description string `json:"description"` Tags string `json:"tags"` Architectures string `json:"architectures"` Icon string `json:"icon"` GlobalMemoryLimit string `json:"globalMemoryLimit"` ProjectType string `json:"projectType"` Language string `json:"language"` Website string `json:"website"` Provider string `json:"provider"` SupportUrl string `json:"supportUrl"` }
type MetadataRequest struct { Name string `json:"name,omitempty"` Version string `json:"version,omitempty"` DisplayName string `json:"displayName,omitempty"` Description string `json:"description,omitempty"` Tags string `json:"tags,omitempty"` Architectures string `json:"architectures,omitempty"` Icon string `json:"icon,omitempty"` GlobalMemoryLimit string `json:"globalMemoryLimit,omitempty"` ProjectType string `json:"projectType,omitempty"` Language string `json:"language,omitempty"` Website string `json:"website,omitempty"` Provider string `json:"provider,omitempty"` SupportUrl string `json:"supportUrl,omitempty"` }
ParsingError indicates that an error has occurred when parsing request parameters
type ParsingError struct { Err error }
func (e *ParsingError) Error() string
func (e *ParsingError) Unwrap() error
RequiredError indicates that an error has occurred when parsing request parameters
type RequiredError struct { Field string }
func (e *RequiredError) Error() string
type Resource struct { Name string `json:"name"` Inlined string `json:"inlined,omitempty"` Uri string `json:"uri,omitempty"` DeployByDefault string `json:"deployByDefault"` // true if the resource is not referenced in any command Orphan bool `json:"orphan"` }
A Route defines the parameters for an api endpoint
type Route struct { Name string Method string Pattern string HandlerFunc http.HandlerFunc }
Router defines the required methods for retrieving api routes
type Router interface { Routes() Routes }
func NewDefaultApiController(s DefaultApiServicer, opts ...DefaultApiOption) Router
NewDefaultApiController creates a default api controller
func NewDevstateApiController(s DevstateApiServicer, opts ...DevstateApiOption) Router
NewDevstateApiController creates a default api controller
Routes are a collection of defined api endpoints
type Routes []Route
type TelemetryGet200Response struct { Enabled bool `json:"enabled"` Apikey string `json:"apikey,omitempty"` Userid string `json:"userid,omitempty"` }
type TelemetryResponse struct { Enabled bool `json:"enabled"` Apikey string `json:"apikey,omitempty"` Userid string `json:"userid,omitempty"` }
type Volume struct { Name string `json:"name"` Ephemeral bool `json:"ephemeral,omitempty"` Size string `json:"size,omitempty"` }
type VolumeMount struct { Name string `json:"name"` Path string `json:"path"` }