v1alpha1

package
v0.0.0-...-44c4069 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Copyright Axis Communications AB.

For a full list of individual contributors, please see the commit history.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

New returns a new V1Alpha1Application object/struct

func RespondWithError

func RespondWithError(w http.ResponseWriter, code int, message string)

RespondWithError writes a JSON response with an error message and status code to the HTTP ResponseWriter.

func RespondWithJSON

func RespondWithJSON(w http.ResponseWriter, code int, payload interface{})

RespondWithJSON writes a JSON response with a status code to the HTTP ResponseWriter.

Types

type Dataset

type Dataset struct{}

type StartRequest

type StartRequest struct {
	MinimumAmount     int                                                 `json:"minimum_amount"`
	MaximumAmount     int                                                 `json:"maximum_amount"`
	ArtifactIdentity  string                                              `json:"identity"`
	ArtifactID        string                                              `json:"artifact_id"`
	ArtifactCreated   eiffelevents.ArtifactCreatedV3                      `json:"artifact_created,omitempty"`
	ArtifactPublished eiffelevents.ArtifactPublishedV3                    `json:"artifact_published,omitempty"`
	TERCC             eiffelevents.TestExecutionRecipeCollectionCreatedV4 `json:"tercc,omitempty"`
	Context           uuid.UUID                                           `json:"context,omitempty"`
	Dataset           Dataset                                             `json:"dataset,omitempty"`
}

type StartResponse

type StartResponse struct {
	Id uuid.UUID `json:"id"`
}

type StatusRequest

type StatusRequest struct {
	Id uuid.UUID `json:"id"`
}

type StatusResponse

type StatusResponse struct {
	Id     uuid.UUID               `json:"id"`
	Status string                  `json:"status"`
	Iuts   []packageurl.PackageURL `json:"iuts"`
}

type StopRequest

type StopRequest struct {
	Id uuid.UUID `json:"id"`
}

type V1Alpha1Application

type V1Alpha1Application struct {
	// contains filtered or unexported fields
}

func (*V1Alpha1Application) Close

func (a *V1Alpha1Application) Close()

Close does nothing atm. Present for interface coherence

func (V1Alpha1Application) LoadRoutes

func (a V1Alpha1Application) LoadRoutes(router *httprouter.Router)

LoadRoutes loads all the v1alpha1 routes.

type V1Alpha1Handler

type V1Alpha1Handler struct {
	// contains filtered or unexported fields
}

func (V1Alpha1Handler) Selftest

Selftest is a handler to just return 204.

func (V1Alpha1Handler) Start

Start creates a number of IUTs and stores them in the ETCD database returning a checkout ID.

func (V1Alpha1Handler) Status

Status creates a simple DONE Status response with IUTs.

func (V1Alpha1Handler) Stop

Stop deletes the given IUTs from the database and returns an empty response.

Jump to

Keyboard shortcuts

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