api

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Overview

Package api Code generated by swaggo/swag. DO NOT EDIT

Copyright (C) NHR@FAU, University Erlangen-Nuremberg. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

View Source
var SwaggerInfo = &swag.Spec{
	Version:          "1.0.0",
	Host:             "localhost:8080",
	BasePath:         "/api",
	Schemes:          []string{},
	Title:            "ClusterCockpit REST API",
	Description:      "API for batch job control.",
	InfoInstanceName: "swagger",
	SwaggerTemplate:  docTemplate,
	LeftDelim:        "{{",
	RightDelim:       "}}",
}

SwaggerInfo holds exported Swagger Info so clients can modify it

Functions

This section is empty.

Types

type ApiReturnedUser added in v1.2.0

type ApiReturnedUser struct {
	Username string   `json:"username"`
	Name     string   `json:"name"`
	Roles    []string `json:"roles"`
	Email    string   `json:"email"`
	Projects []string `json:"projects"`
}

type ApiTag

type ApiTag struct {
	// Tag Type
	Type string `json:"type" example:"Debug"`
	Name string `json:"name" example:"Testjob"` // Tag Name
}

ApiTag model

type DeleteJobApiRequest

type DeleteJobApiRequest struct {
	JobId     *int64  `json:"jobId" validate:"required" example:"123000"` // Cluster Job ID of job
	Cluster   *string `json:"cluster" example:"fritz"`                    // Cluster of job
	StartTime *int64  `json:"startTime" example:"1649723812"`             // Start Time of job as epoch
}

DeleteJobApiRequest model

type DeleteJobApiResponse

type DeleteJobApiResponse struct {
	Message string `json:"msg"`
}

DeleteJobApiResponse model

type EditMetaRequest added in v1.3.0

type EditMetaRequest struct {
	Key   string `json:"key" example:"jobScript"`
	Value string `json:"value" example:"bash script"`
}

ApiMeta model

type ErrorResponse

type ErrorResponse struct {
	// Statustext of Errorcode
	Status string `json:"status"`
	Error  string `json:"error"` // Error Message
}

ErrorResponse model

type GetClustersApiResponse added in v1.3.0

type GetClustersApiResponse struct {
	Clusters []*schema.Cluster `json:"clusters"` // Array of clusters
}

GetClustersApiResponse model

type GetCompleteJobApiResponse added in v1.3.0

type GetCompleteJobApiResponse struct {
	Meta *schema.Job
	Data schema.JobData
}

type GetJobApiRequest

type GetJobApiRequest []string

type GetJobApiResponse

type GetJobApiResponse struct {
	Meta *schema.Job
	Data []*JobMetricWithName
}

type GetJobsApiResponse

type GetJobsApiResponse struct {
	Jobs  []*schema.JobMeta `json:"jobs"`  // Array of jobs
	Items int               `json:"items"` // Number of jobs returned
	Page  int               `json:"page"`  // Page id returned
}

GetJobsApiResponse model

type JobMetricWithName

type JobMetricWithName struct {
	Metric *schema.JobMetric  `json:"metric"`
	Name   string             `json:"name"`
	Scope  schema.MetricScope `json:"scope"`
}

type RestApi

type RestApi struct {
	JobRepository   *repository.JobRepository
	Resolver        *graph.Resolver
	Authentication  *auth.Authentication
	MachineStateDir string
	RepositoryMutex sync.Mutex
}

func (*RestApi) MountRoutes

func (api *RestApi) MountRoutes(r *mux.Router)

type StartJobApiResponse

type StartJobApiResponse struct {
	// Database ID of new job
	DBID int64 `json:"id"`
}

StartJobApiResponse model

type StopJobApiRequest

type StopJobApiRequest struct {
	JobId     *int64          `json:"jobId" example:"123000"`
	Cluster   *string         `json:"cluster" example:"fritz"`
	StartTime *int64          `json:"startTime" example:"1649723812"`
	State     schema.JobState `json:"jobState" validate:"required" example:"completed"`
	StopTime  int64           `json:"stopTime" validate:"required" example:"1649763839"`
}

StopJobApiRequest model

type TagJobApiRequest

type TagJobApiRequest []*ApiTag

type UpdateUserApiResponse added in v1.2.0

type UpdateUserApiResponse struct {
	Message string `json:"msg"`
}

UpdateUserApiResponse model

Jump to

Keyboard shortcuts

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