openapi

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrTypeAssertionError is thrown when type an interface does not match the asserted type
	ErrTypeAssertionError = errors.New("unable to assert type")
)

Functions

func AssertDataSpecRequired

func AssertDataSpecRequired(obj DataSpec) error

AssertDataSpecRequired checks if the required fields are not zero-ed

func AssertJobSpecRequired

func AssertJobSpecRequired(obj JobSpec) error

AssertJobSpecRequired checks if the required fields are not zero-ed

func AssertJobStatusRequired added in v0.1.2

func AssertJobStatusRequired(obj JobStatus) error

AssertJobStatusRequired checks if the required fields are not zero-ed

func AssertOptimizerRequired added in v0.1.2

func AssertOptimizerRequired(obj Optimizer) error

AssertOptimizerRequired checks if the required fields are not zero-ed

func AssertRecurseDataSpecRequired

func AssertRecurseDataSpecRequired(objSlice interface{}) error

AssertRecurseDataSpecRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of DataSpec (e.g. [][]DataSpec), otherwise ErrTypeAssertionError is thrown.

func AssertRecurseInterfaceRequired

func AssertRecurseInterfaceRequired(obj interface{}, callback func(interface{}) error) error

AssertInterfaceRequired recursively checks each struct in a slice against the callback. This method traverse nested slices in a preorder fashion.

func AssertRecurseJobSpecRequired

func AssertRecurseJobSpecRequired(objSlice interface{}) error

AssertRecurseJobSpecRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of JobSpec (e.g. [][]JobSpec), otherwise ErrTypeAssertionError is thrown.

func AssertRecurseJobStatusRequired added in v0.1.2

func AssertRecurseJobStatusRequired(objSlice interface{}) error

AssertRecurseJobStatusRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of JobStatus (e.g. [][]JobStatus), otherwise ErrTypeAssertionError is thrown.

func AssertRecurseOptimizerRequired added in v0.1.2

func AssertRecurseOptimizerRequired(objSlice interface{}) error

AssertRecurseOptimizerRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of Optimizer (e.g. [][]Optimizer), otherwise ErrTypeAssertionError is thrown.

func AssertRecurseSelectorRequired

func AssertRecurseSelectorRequired(objSlice interface{}) error

AssertRecurseSelectorRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of Selector (e.g. [][]Selector), otherwise ErrTypeAssertionError is thrown.

func AssertRecurseTaskInfoRequired

func AssertRecurseTaskInfoRequired(objSlice interface{}) error

AssertRecurseTaskInfoRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of TaskInfo (e.g. [][]TaskInfo), otherwise ErrTypeAssertionError is thrown.

func AssertRecurseTaskStatusRequired added in v0.1.2

func AssertRecurseTaskStatusRequired(objSlice interface{}) error

AssertRecurseTaskStatusRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of TaskStatus (e.g. [][]TaskStatus), otherwise ErrTypeAssertionError is thrown.

func AssertRecurseTaskTypeRequired

func AssertRecurseTaskTypeRequired(objSlice interface{}) error

AssertRecurseTaskTypeRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of TaskType (e.g. [][]TaskType), otherwise ErrTypeAssertionError is thrown.

func AssertRecurseValueRequired

func AssertRecurseValueRequired(value reflect.Value, callback func(interface{}) error) error

AssertNestedValueRequired checks each struct in the nested slice against the callback. This method traverse nested slices in a preorder fashion.

func AssertSelectorRequired

func AssertSelectorRequired(obj Selector) error

AssertSelectorRequired checks if the required fields are not zero-ed

func AssertTaskInfoRequired

func AssertTaskInfoRequired(obj TaskInfo) error

AssertTaskInfoRequired checks if the required fields are not zero-ed

func AssertTaskStatusRequired added in v0.1.2

func AssertTaskStatusRequired(obj TaskStatus) error

AssertTaskStatusRequired checks if the required fields are not zero-ed

func AssertTaskTypeRequired

func AssertTaskTypeRequired(obj TaskType) error

AssertTaskTypeRequired checks if the required fields are not zero-ed

func DefaultErrorHandler

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

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

func IsZeroValue(val interface{}) bool

IsZeroValue checks if the val is the zero-ed value.

func Logger

func Logger(inner http.Handler, name string) http.Handler

func NewRouter

func NewRouter(routers ...Router) *mux.Router

NewRouter creates a new router for any number of api routers

func ReadFormFileToTempFile

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

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

Types

type BaseModel

type BaseModel struct {
	Name string `json:"name"`

	Version int32 `json:"version"`
}

type Channel

type Channel struct {
	Name string `json:"name"`

	Description string `json:"description,omitempty"`

	Pair []string `json:"pair"`

	GroupBy ChannelGroupBy `json:"groupBy,omitempty"`

	FuncTags map[string][]string `json:"funcTags,omitempty"`

	IsUnidirectional bool `json:"isUnidirectional,omitempty"`
}

Channel - Defines how different roles are connected.

type ChannelGroupBy

type ChannelGroupBy struct {
	Type string `json:"type"`

	Value []string `json:"value"`
}

type CommBackend

type CommBackend string
const (
	MQTT CommBackend = "mqtt"
	P2P  CommBackend = "p2p"
)

List of CommBackend

type Connector

type Connector struct {
	Name string `json:"name"`

	Description string `json:"description,omitempty"`

	Connection map[string]interface{} `json:"connection"`
}

type DataSpec

type DataSpec struct {
	FromUser map[string]int32 `json:"fromUser,omitempty"`

	FromSystem []string `json:"fromSystem,omitempty"`
}

type DatasetInfo

type DatasetInfo struct {
	Id string `json:"id,omitempty"`

	UserId string `json:"userId,omitempty"`

	Name string `json:"name,omitempty"`

	Description string `json:"description,omitempty"`

	Url string `json:"url"`

	DataFormat string `json:"dataFormat"`

	Realm string `json:"realm"`

	IsPublic bool `json:"isPublic,omitempty"`
}

DatasetInfo - dataset meta information

type DatasetsApiController

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

A DatasetsApiController binds http requests to an api service and writes the service results to the http response

func (*DatasetsApiController) CreateDataset

func (c *DatasetsApiController) CreateDataset(w http.ResponseWriter, r *http.Request)

CreateDataset - Create meta info for a new dataset.

func (*DatasetsApiController) GetAllDatasets

func (c *DatasetsApiController) GetAllDatasets(w http.ResponseWriter, r *http.Request)

GetAllDatasets - Get the meta info on all the datasets

func (*DatasetsApiController) GetDataset

func (c *DatasetsApiController) GetDataset(w http.ResponseWriter, r *http.Request)

GetDataset - Get dataset meta information

func (*DatasetsApiController) GetDatasets

func (c *DatasetsApiController) GetDatasets(w http.ResponseWriter, r *http.Request)

GetDatasets - Get the meta info on all the datasets owned by user

func (*DatasetsApiController) Routes

func (c *DatasetsApiController) Routes() Routes

Routes returns all of the api route for the DatasetsApiController

func (*DatasetsApiController) UpdateDataset

func (c *DatasetsApiController) UpdateDataset(w http.ResponseWriter, r *http.Request)

UpdateDataset - Update meta info for a given dataset

type DatasetsApiRouter

type DatasetsApiRouter interface {
	CreateDataset(http.ResponseWriter, *http.Request)
	GetAllDatasets(http.ResponseWriter, *http.Request)
	GetDataset(http.ResponseWriter, *http.Request)
	GetDatasets(http.ResponseWriter, *http.Request)
	UpdateDataset(http.ResponseWriter, *http.Request)
}

DatasetsApiRouter defines the required methods for binding the api requests to a responses for the DatasetsApi The DatasetsApiRouter implementation should parse necessary information from the http request, pass the data to a DatasetsApiServicer to perform the required actions, then write the service results to the http response.

type DatasetsApiServicer

type DatasetsApiServicer interface {
	CreateDataset(context.Context, string, DatasetInfo) (ImplResponse, error)
	GetAllDatasets(context.Context, int32) (ImplResponse, error)
	GetDataset(context.Context, string, string) (ImplResponse, error)
	GetDatasets(context.Context, string, int32) (ImplResponse, error)
	UpdateDataset(context.Context, string, string, DatasetInfo) (ImplResponse, error)
}

DatasetsApiServicer defines the api actions for the DatasetsApi service This interface intended to stay up to date with the openapi yaml used to generate it, while the service implementation can ignored with the .openapi-generator-ignore file and updated with the logic required for the API.

type Design

type Design struct {
	Name string `json:"name"`

	Description string `json:"description,omitempty"`

	Id string `json:"id"`

	UserId string `json:"userId,omitempty"`

	Schemas []DesignSchema `json:"schemas"`
}

Design - Design template details along with all the schemas.

type DesignCodesApiController

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

A DesignCodesApiController binds http requests to an api service and writes the service results to the http response

func (*DesignCodesApiController) CreateDesignCode

func (c *DesignCodesApiController) CreateDesignCode(w http.ResponseWriter, r *http.Request)

CreateDesignCode - Upload a new design code

func (*DesignCodesApiController) GetDesignCode

func (c *DesignCodesApiController) GetDesignCode(w http.ResponseWriter, r *http.Request)

GetDesignCode - Get a zipped design code file owned by user

func (*DesignCodesApiController) Routes

func (c *DesignCodesApiController) Routes() Routes

Routes returns all of the api route for the DesignCodesApiController

func (*DesignCodesApiController) UpdateDesignCode

func (c *DesignCodesApiController) UpdateDesignCode(w http.ResponseWriter, r *http.Request)

UpdateDesignCode - Update a design code

type DesignCodesApiRouter

type DesignCodesApiRouter interface {
	CreateDesignCode(http.ResponseWriter, *http.Request)
	GetDesignCode(http.ResponseWriter, *http.Request)
	UpdateDesignCode(http.ResponseWriter, *http.Request)
}

DesignCodesApiRouter defines the required methods for binding the api requests to a responses for the DesignCodesApi The DesignCodesApiRouter implementation should parse necessary information from the http request, pass the data to a DesignCodesApiServicer to perform the required actions, then write the service results to the http response.

type DesignCodesApiServicer

type DesignCodesApiServicer interface {
	CreateDesignCode(context.Context, string, string, string, string, *os.File) (ImplResponse, error)
	GetDesignCode(context.Context, string, string, string) (ImplResponse, error)
	UpdateDesignCode(context.Context, string, string, string, string, string, *os.File) (ImplResponse, error)
}

DesignCodesApiServicer defines the api actions for the DesignCodesApi service This interface intended to stay up to date with the openapi yaml used to generate it, while the service implementation can ignored with the .openapi-generator-ignore file and updated with the logic required for the API.

type DesignInfo

type DesignInfo struct {
	Name string `json:"name"`

	Description string `json:"description,omitempty"`

	Id string `json:"id"`

	UserId string `json:"userId,omitempty"`
}

DesignInfo - Only basic desgin information.

type DesignSchema

type DesignSchema struct {
	Version string `json:"version"`

	Name string `json:"name"`

	Description string `json:"description,omitempty"`

	Roles []Role `json:"roles"`

	Channels []Channel `json:"channels"`

	Connectors []Connector `json:"connectors,omitempty"`
}

DesignSchema - Schema to define the roles and their connections

type DesignSchemas

type DesignSchemas struct {
	Schemas []DesignSchema `json:"schemas"`
}

DesignSchemas - A collection of design schemas related to design template

type DesignSchemasApiController

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

A DesignSchemasApiController binds http requests to an api service and writes the service results to the http response

func (*DesignSchemasApiController) CreateDesignSchema

func (c *DesignSchemasApiController) CreateDesignSchema(w http.ResponseWriter, r *http.Request)

CreateDesignSchema - Update a design schema

func (*DesignSchemasApiController) GetDesignSchema

func (c *DesignSchemasApiController) GetDesignSchema(w http.ResponseWriter, r *http.Request)

GetDesignSchema - Get a design schema owned by user

func (*DesignSchemasApiController) GetDesignSchemas

func (c *DesignSchemasApiController) GetDesignSchemas(w http.ResponseWriter, r *http.Request)

GetDesignSchemas - Get all design schemas in a design

func (*DesignSchemasApiController) Routes

func (c *DesignSchemasApiController) Routes() Routes

Routes returns all of the api route for the DesignSchemasApiController

func (*DesignSchemasApiController) UpdateDesignSchema

func (c *DesignSchemasApiController) UpdateDesignSchema(w http.ResponseWriter, r *http.Request)

UpdateDesignSchema - Update a schema for a given design

type DesignSchemasApiRouter

type DesignSchemasApiRouter interface {
	CreateDesignSchema(http.ResponseWriter, *http.Request)
	GetDesignSchema(http.ResponseWriter, *http.Request)
	GetDesignSchemas(http.ResponseWriter, *http.Request)
	UpdateDesignSchema(http.ResponseWriter, *http.Request)
}

DesignSchemasApiRouter defines the required methods for binding the api requests to a responses for the DesignSchemasApi The DesignSchemasApiRouter implementation should parse necessary information from the http request, pass the data to a DesignSchemasApiServicer to perform the required actions, then write the service results to the http response.

type DesignSchemasApiServicer

type DesignSchemasApiServicer interface {
	CreateDesignSchema(context.Context, string, string, DesignSchema) (ImplResponse, error)
	GetDesignSchema(context.Context, string, string, string) (ImplResponse, error)
	GetDesignSchemas(context.Context, string, string) (ImplResponse, error)
	UpdateDesignSchema(context.Context, string, string, string, DesignSchema) (ImplResponse, error)
}

DesignSchemasApiServicer defines the api actions for the DesignSchemasApi service This interface intended to stay up to date with the openapi yaml used to generate it, while the service implementation can ignored with the .openapi-generator-ignore file and updated with the logic required for the API.

type DesignsApiController

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

A DesignsApiController binds http requests to an api service and writes the service results to the http response

func (*DesignsApiController) CreateDesign

func (c *DesignsApiController) CreateDesign(w http.ResponseWriter, r *http.Request)

CreateDesign - Create a new design template.

func (*DesignsApiController) GetDesign

func (c *DesignsApiController) GetDesign(w http.ResponseWriter, r *http.Request)

GetDesign - Get design template information

func (*DesignsApiController) GetDesigns

func (c *DesignsApiController) GetDesigns(w http.ResponseWriter, r *http.Request)

GetDesigns - Get list of all the designs created by the user.

func (*DesignsApiController) Routes

func (c *DesignsApiController) Routes() Routes

Routes returns all of the api route for the DesignsApiController

type DesignsApiRouter

type DesignsApiRouter interface {
	CreateDesign(http.ResponseWriter, *http.Request)
	GetDesign(http.ResponseWriter, *http.Request)
	GetDesigns(http.ResponseWriter, *http.Request)
}

DesignsApiRouter defines the required methods for binding the api requests to a responses for the DesignsApi The DesignsApiRouter implementation should parse necessary information from the http request, pass the data to a DesignsApiServicer to perform the required actions, then write the service results to the http response.

type DesignsApiServicer

type DesignsApiServicer interface {
	CreateDesign(context.Context, string, DesignInfo) (ImplResponse, error)
	GetDesign(context.Context, string, string) (ImplResponse, error)
	GetDesigns(context.Context, string, int32) (ImplResponse, error)
}

DesignsApiServicer defines the api actions for the DesignsApi service This interface intended to stay up to date with the openapi yaml used to generate it, while the service implementation can ignored with the .openapi-generator-ignore file and updated with the logic required for the API.

type Error

type Error struct {
	Code int32 `json:"code"`

	Message string `json:"message"`
}

Error - Generic error object.

type ErrorHandler

type ErrorHandler func(w http.ResponseWriter, r *http.Request, err error, result *ImplResponse)

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 ImplResponse

type ImplResponse struct {
	Code int
	Body interface{}
}

Implementation response defines an error code with the associated body

func Response

func Response(code int, body interface{}) ImplResponse

Response return a ImplResponse struct filled

type JobPriority

type JobPriority string
const (
	LOW    JobPriority = "low"
	MEDIUM JobPriority = "medium"
	HIGH   JobPriority = "high"
)

List of JobPriority

type JobSpec

type JobSpec struct {
	Id string `json:"id,omitempty"`

	UserId string `json:"userId,omitempty"`

	DesignId string `json:"designId"`

	SchemaVersion string `json:"schemaVersion"`

	CodeVersion string `json:"codeVersion"`

	DataSpec DataSpec `json:"dataSpec,omitempty"`

	Optimizer Optimizer `json:"optimizer,omitempty"`

	Selector Selector `json:"selector,omitempty"`

	Priority JobPriority `json:"priority,omitempty"`

	Backend CommBackend `json:"backend,omitempty"`

	MaxRunTime int32 `json:"maxRunTime,omitempty"`

	BaseModel BaseModel `json:"baseModel,omitempty"`

	Hyperparameters map[string]interface{} `json:"hyperparameters,omitempty"`

	Dependencies []string `json:"dependencies,omitempty"`
}

JobSpec - Job specification

type JobState

type JobState string
const (
	READY      JobState = "ready"
	STARTING   JobState = "starting"
	APPLYING   JobState = "applying"
	DEPLOYING  JobState = "deploying"
	STOPPING   JobState = "stopping"
	RUNNING    JobState = "running"
	FAILED     JobState = "failed"
	TERMINATED JobState = "terminated"
	COMPLETED  JobState = "completed"
)

List of JobState

type JobStatus

type JobStatus struct {
	Id string `json:"id"`

	State JobState `json:"state"`

	CreatedAt time.Time `json:"createdAt,omitempty"`

	StartedAt time.Time `json:"startedAt,omitempty"`

	UpdatedAt time.Time `json:"updatedAt,omitempty"`

	EndedAt time.Time `json:"endedAt,omitempty"`
}

JobStatus - Job status

type JobsApiController

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

JobsApiController binds http requests to an api service and writes the service results to the http response

func (*JobsApiController) CreateJob

func (c *JobsApiController) CreateJob(w http.ResponseWriter, r *http.Request)

CreateJob - Create a new job specification

func (*JobsApiController) DeleteJob

func (c *JobsApiController) DeleteJob(w http.ResponseWriter, r *http.Request)

DeleteJob - Delete job specification

func (*JobsApiController) GetJob

GetJob - Get a job specification

func (*JobsApiController) GetJobStatus

func (c *JobsApiController) GetJobStatus(w http.ResponseWriter, r *http.Request)

GetJobStatus - Get job status of a given jobId

func (*JobsApiController) GetJobs

func (c *JobsApiController) GetJobs(w http.ResponseWriter, r *http.Request)

GetJobs - Get status info on all the jobs owned by user

func (*JobsApiController) GetTask

func (c *JobsApiController) GetTask(w http.ResponseWriter, r *http.Request)

GetTask - Get a job task for a given job and task

func (*JobsApiController) GetTaskInfo added in v0.1.2

func (c *JobsApiController) GetTaskInfo(w http.ResponseWriter, r *http.Request)

GetTaskInfo - Get the info of a task in a job

func (*JobsApiController) GetTasksInfo

func (c *JobsApiController) GetTasksInfo(w http.ResponseWriter, r *http.Request)

GetTasksInfo - Get the info of tasks in a job

func (*JobsApiController) Routes

func (c *JobsApiController) Routes() Routes

Routes returns all of the api route for the JobsApiController

func (*JobsApiController) UpdateJob

func (c *JobsApiController) UpdateJob(w http.ResponseWriter, r *http.Request)

UpdateJob - Update a job specification

func (*JobsApiController) UpdateJobStatus

func (c *JobsApiController) UpdateJobStatus(w http.ResponseWriter, r *http.Request)

UpdateJobStatus - Update the status of a job

func (*JobsApiController) UpdateTaskStatus

func (c *JobsApiController) UpdateTaskStatus(w http.ResponseWriter, r *http.Request)

UpdateTaskStatus - Update the status of a task

type JobsApiOption

type JobsApiOption func(*JobsApiController)

JobsApiOption for how the controller is set up.

func WithJobsApiErrorHandler

func WithJobsApiErrorHandler(h ErrorHandler) JobsApiOption

WithJobsApiErrorHandler inject ErrorHandler into controller

type JobsApiRouter

type JobsApiRouter interface {
	CreateJob(http.ResponseWriter, *http.Request)
	DeleteJob(http.ResponseWriter, *http.Request)
	GetJob(http.ResponseWriter, *http.Request)
	GetJobStatus(http.ResponseWriter, *http.Request)
	GetJobs(http.ResponseWriter, *http.Request)
	GetTask(http.ResponseWriter, *http.Request)
	GetTaskInfo(http.ResponseWriter, *http.Request)
	GetTasksInfo(http.ResponseWriter, *http.Request)
	UpdateJob(http.ResponseWriter, *http.Request)
	UpdateJobStatus(http.ResponseWriter, *http.Request)
	UpdateTaskStatus(http.ResponseWriter, *http.Request)
}

JobsApiRouter defines the required methods for binding the api requests to a responses for the JobsApi The JobsApiRouter implementation should parse necessary information from the http request, pass the data to a JobsApiServicer to perform the required actions, then write the service results to the http response.

type JobsApiServicer

JobsApiServicer defines the api actions for the JobsApi service This interface intended to stay up to date with the openapi yaml used to generate it, while the service implementation can ignored with the .openapi-generator-ignore file and updated with the logic required for the API.

type Optimizer added in v0.1.2

type Optimizer struct {
	Sort string `json:"sort,omitempty"`

	Kwargs map[string]interface{} `json:"kwargs,omitempty"`
}

type ParsingError

type ParsingError struct {
	Err error
}

ParsingError indicates that an error has occurred when parsing request parameters

func (*ParsingError) Error

func (e *ParsingError) Error() string

func (*ParsingError) Unwrap

func (e *ParsingError) Unwrap() error

type RequiredError

type RequiredError struct {
	Field string
}

RequiredError indicates that an error has occurred when parsing request parameters

func (*RequiredError) Error

func (e *RequiredError) Error() string

type Role

type Role struct {
	Name string `json:"name"`

	Description string `json:"description,omitempty"`

	IsDataConsumer bool `json:"isDataConsumer,omitempty"`

	Replica int32 `json:"replica,omitempty"`
}

Role - Define the role of a compute unit

type Route

type Route struct {
	Name        string
	Method      string
	Pattern     string
	HandlerFunc http.HandlerFunc
}

A Route defines the parameters for an api endpoint

type Router

type Router interface {
	Routes() Routes
}

Router defines the required methods for retrieving api routes

func NewDatasetsApiController

func NewDatasetsApiController(s DatasetsApiServicer) Router

NewDatasetsApiController creates a default api controller

func NewDesignCodesApiController

func NewDesignCodesApiController(s DesignCodesApiServicer) Router

NewDesignCodesApiController creates a default api controller

func NewDesignSchemasApiController

func NewDesignSchemasApiController(s DesignSchemasApiServicer) Router

NewDesignSchemasApiController creates a default api controller

func NewDesignsApiController

func NewDesignsApiController(s DesignsApiServicer) Router

NewDesignsApiController creates a default api controller

func NewJobsApiController

func NewJobsApiController(s JobsApiServicer, opts ...JobsApiOption) Router

NewJobsApiController creates a default api controller

type Routes

type Routes []Route

Routes are a collection of defined api endpoints

type Selector

type Selector struct {
	Sort string `json:"sort,omitempty"`

	Kwargs map[string]interface{} `json:"kwargs,omitempty"`
}

type TaskInfo

type TaskInfo struct {
	JobId string `json:"jobId,omitempty"`

	TaskId string `json:"taskId,omitempty"`

	Role string `json:"role,omitempty"`

	Type TaskType `json:"type,omitempty"`

	Key string `json:"key,omitempty"`

	State JobState `json:"state,omitempty"`

	Log string `json:"log,omitempty"`

	Timestamp time.Time `json:"timestamp,omitempty"`
}

TaskInfo - Task information

type TaskStatus

type TaskStatus struct {
	State JobState `json:"state,omitempty"`

	Log string `json:"log,omitempty"`

	Timestamp time.Time `json:"timestamp,omitempty"`
}

TaskStatus - Task status

type TaskType

type TaskType string
const (
	USER   TaskType = "user"
	SYSTEM TaskType = "system"
)

List of TaskType

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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