api_server

package
v1.7.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: Apache-2.0 Imports: 36 Imported by: 2

Documentation

Index

Constants

View Source
const (
	ExperimentForDefaultTest     = "EXPERIMENT_DEFAULT"
	ExperimentForClientErrorTest = "EXPERIMENT_CLIENT_ERROR"
)
View Source
const (
	JobForDefaultTest     = "JOB_DEFAULT"
	JobForClientErrorTest = "JOB_CLIENT_ERROR"
)
View Source
const (
	PipelineForDefaultTest     = "PIPELINE_ID_10"
	PipelineForClientErrorTest = "PIPELINE_ID_11"
	PipelineValidURL           = "http://www.mydomain.com/foo.yaml"
	PipelineInvalidURL         = "foobar.something"
)
View Source
const (
	FileForDefaultTest     = "./samples/parameters.yaml"
	FileForClientErrorTest = "./samples/hello-world.yaml"

	ClientErrorString  = "Error with client"
	InvalidFakeRequest = "Invalid fake request, don't know how to handle '%s' in the fake client."
)
View Source
const (
	RunForDefaultTest     = "RUN_DEFAULT"
	RunForClientErrorTest = "RUN_CLIENT_ERROR"
)

Variables

PassThroughAuth never manipulates the request

Functions

func CreateErrorCouldNotRecoverAPIStatus

func CreateErrorCouldNotRecoverAPIStatus(err error) error

func CreateErrorFromAPIStatus

func CreateErrorFromAPIStatus(error string, code int32) error

func NewHTTPRuntime

func NewHTTPRuntime(clientConfig clientcmd.ClientConfig, debug bool) (
	*httptransport.Runtime, error)

Types

type ExperimentClient

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

func NewExperimentClient

func NewExperimentClient(clientConfig clientcmd.ClientConfig, debug bool) (
	*ExperimentClient, error)

func (*ExperimentClient) Archive

func (c *ExperimentClient) Archive(parameters *params.ArchiveExperimentParams) error

func (*ExperimentClient) Create

func (*ExperimentClient) Delete

func (c *ExperimentClient) Delete(parameters *params.DeleteExperimentParams) error

func (*ExperimentClient) Get

func (*ExperimentClient) List

func (*ExperimentClient) ListAll

func (c *ExperimentClient) ListAll(parameters *params.ListExperimentParams, maxResultSize int) (
	[]*model.APIExperiment, error)

func (*ExperimentClient) Unarchive

func (c *ExperimentClient) Unarchive(parameters *params.UnarchiveExperimentParams) error

type ExperimentClientFake

type ExperimentClientFake struct{}

func NewExperimentClientFake

func NewExperimentClientFake() *ExperimentClientFake

func (*ExperimentClientFake) Archive

func (*ExperimentClientFake) Create

func (*ExperimentClientFake) Get

func (*ExperimentClientFake) List

func (*ExperimentClientFake) ListAll

func (*ExperimentClientFake) Unarchive

type ExperimentInterface

type ExperimentInterface interface {
	Create(params *params.CreateExperimentParams) (*model.APIExperiment, error)
	Get(params *params.GetExperimentParams) (*model.APIExperiment, error)
	List(params *params.ListExperimentParams) ([]*model.APIExperiment, int, string, error)
	ListAll(params *params.ListExperimentParams, maxResultSize int) ([]*model.APIExperiment, error)
	Archive(params *params.ArchiveExperimentParams) error
	Unarchive(params *params.UnarchiveExperimentParams) error
}

type JobClient

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

func NewJobClient

func NewJobClient(clientConfig clientcmd.ClientConfig, debug bool) (
	*JobClient, error)

func (*JobClient) Create

func (c *JobClient) Create(parameters *params.CreateJobParams) (*model.APIJob,
	error)

func (*JobClient) Delete

func (c *JobClient) Delete(parameters *params.DeleteJobParams) error

func (*JobClient) Disable

func (c *JobClient) Disable(parameters *params.DisableJobParams) error

func (*JobClient) Enable

func (c *JobClient) Enable(parameters *params.EnableJobParams) error

func (*JobClient) Get

func (c *JobClient) Get(parameters *params.GetJobParams) (*model.APIJob,
	error)

func (*JobClient) List

func (c *JobClient) List(parameters *params.ListJobsParams) (
	[]*model.APIJob, int, string, error)

func (*JobClient) ListAll

func (c *JobClient) ListAll(parameters *params.ListJobsParams, maxResultSize int) (
	[]*model.APIJob, error)

type JobClientFake

type JobClientFake struct{}

func NewJobClientFake

func NewJobClientFake() *JobClientFake

func (*JobClientFake) Create

func (c *JobClientFake) Create(params *jobparams.CreateJobParams) (
	*jobmodel.APIJob, error)

func (*JobClientFake) Delete

func (c *JobClientFake) Delete(params *jobparams.DeleteJobParams) error

func (*JobClientFake) Disable

func (c *JobClientFake) Disable(params *jobparams.DisableJobParams) error

func (*JobClientFake) Enable

func (c *JobClientFake) Enable(params *jobparams.EnableJobParams) error

func (*JobClientFake) Get

func (*JobClientFake) List

func (*JobClientFake) ListAll

func (c *JobClientFake) ListAll(params *jobparams.ListJobsParams,
	maxResultSize int) ([]*jobmodel.APIJob, error)

type JobInterface

type JobInterface interface {
	Create(params *params.CreateJobParams) (*model.APIJob, error)
	Get(params *params.GetJobParams) (*model.APIJob, error)
	Delete(params *params.DeleteJobParams) error
	Enable(params *params.EnableJobParams) error
	Disable(params *params.DisableJobParams) error
	List(params *params.ListJobsParams) ([]*model.APIJob, int, string, error)
	ListAll(params *params.ListJobsParams, maxResultSize int) ([]*model.APIJob, error)
}

type PipelineClient

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

func NewPipelineClient

func NewPipelineClient(clientConfig clientcmd.ClientConfig, debug bool) (
	*PipelineClient, error)

func (*PipelineClient) Create

func (c *PipelineClient) Create(parameters *params.CreatePipelineParams) (*model.APIPipeline,
	error)

func (*PipelineClient) CreatePipelineVersion

func (c *PipelineClient) CreatePipelineVersion(parameters *params.CreatePipelineVersionParams) (*model.APIPipelineVersion,
	error)

func (*PipelineClient) Delete

func (c *PipelineClient) Delete(parameters *params.DeletePipelineParams) error

func (*PipelineClient) Get

func (*PipelineClient) GetPipelineVersion

func (c *PipelineClient) GetPipelineVersion(parameters *params.GetPipelineVersionParams) (*model.APIPipelineVersion,
	error)

func (*PipelineClient) GetPipelineVersionTemplate

func (c *PipelineClient) GetPipelineVersionTemplate(parameters *params.GetPipelineVersionTemplateParams) (
	*workflowapi.Workflow, error)

func (*PipelineClient) GetTemplate

func (c *PipelineClient) GetTemplate(parameters *params.GetTemplateParams) (
	*workflowapi.Workflow, error)

func (*PipelineClient) List

func (c *PipelineClient) List(parameters *params.ListPipelinesParams) (
	[]*model.APIPipeline, int, string, error)

func (*PipelineClient) ListAll

func (c *PipelineClient) ListAll(parameters *params.ListPipelinesParams, maxResultSize int) (
	[]*model.APIPipeline, error)

func (*PipelineClient) ListPipelineVersions

func (c *PipelineClient) ListPipelineVersions(parameters *params.ListPipelineVersionsParams) (
	[]*model.APIPipelineVersion, int, string, error)

func (*PipelineClient) UpdateDefaultVersion

func (c *PipelineClient) UpdateDefaultVersion(parameters *params.UpdatePipelineDefaultVersionParams) error

type PipelineClientFake

type PipelineClientFake struct{}

func NewPipelineClientFake

func NewPipelineClientFake() *PipelineClientFake

func (*PipelineClientFake) Create

func (*PipelineClientFake) Delete

func (*PipelineClientFake) Get

func (*PipelineClientFake) GetTemplate

func (*PipelineClientFake) List

func (*PipelineClientFake) ListAll

func (c *PipelineClientFake) ListAll(params *pipelineparams.ListPipelinesParams,
	maxResultSize int) ([]*pipelinemodel.APIPipeline, error)

func (*PipelineClientFake) UpdateDefaultVersion

func (c *PipelineClientFake) UpdateDefaultVersion(params *params.UpdatePipelineDefaultVersionParams) error

type PipelineInterface

type PipelineInterface interface {
	Create(params *params.CreatePipelineParams) (*model.APIPipeline, error)
	Get(params *params.GetPipelineParams) (*model.APIPipeline, error)
	Delete(params *params.DeletePipelineParams) error
	GetTemplate(params *params.GetTemplateParams) (*workflowapi.Workflow, error)
	List(params *params.ListPipelinesParams) ([]*model.APIPipeline, int, string, error)
	ListAll(params *params.ListPipelinesParams, maxResultSize int) (
		[]*model.APIPipeline, error)
	UpdateDefaultVersion(params *params.UpdatePipelineDefaultVersionParams) error
}

type PipelineUploadClient

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

func NewPipelineUploadClient

func NewPipelineUploadClient(clientConfig clientcmd.ClientConfig, debug bool) (
	*PipelineUploadClient, error)

func (*PipelineUploadClient) Upload

func (*PipelineUploadClient) UploadFile

func (c *PipelineUploadClient) UploadFile(filePath string, parameters *params.UploadPipelineParams) (
	*model.APIPipeline, error)

func (*PipelineUploadClient) UploadPipelineVersion

func (c *PipelineUploadClient) UploadPipelineVersion(filePath string, parameters *params.UploadPipelineVersionParams) (*model.APIPipelineVersion,
	error)

UploadPipelineVersion uploads pipeline version from local file.

type PipelineUploadClientFake

type PipelineUploadClientFake struct{}

func NewPipelineUploadClientFake

func NewPipelineUploadClientFake() *PipelineUploadClientFake

func (*PipelineUploadClientFake) UploadFile

func (c *PipelineUploadClientFake) UploadFile(filePath string,
	parameters *params.UploadPipelineParams) (*model.APIPipeline, error)

type PipelineUploadInterface

type PipelineUploadInterface interface {
	UploadFile(filePath string, parameters *params.UploadPipelineParams) (*model.APIPipeline, error)
}

type RunClient

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

func NewRunClient

func NewRunClient(clientConfig clientcmd.ClientConfig, debug bool) (
	*RunClient, error)

func (*RunClient) Archive

func (c *RunClient) Archive(parameters *params.ArchiveRunParams) error

func (*RunClient) Create

func (*RunClient) Delete

func (c *RunClient) Delete(parameters *params.DeleteRunParams) error

func (*RunClient) Get

func (*RunClient) List

func (c *RunClient) List(parameters *params.ListRunsParams) (
	[]*model.APIRun, int, string, error)

func (*RunClient) ListAll

func (c *RunClient) ListAll(parameters *params.ListRunsParams, maxResultSize int) (
	[]*model.APIRun, error)

func (*RunClient) Terminate

func (c *RunClient) Terminate(parameters *params.TerminateRunParams) error

func (*RunClient) Unarchive

func (c *RunClient) Unarchive(parameters *params.UnarchiveRunParams) error

type RunClientFake

type RunClientFake struct{}

func NewRunClientFake

func NewRunClientFake() *RunClientFake

func (*RunClientFake) Archive

func (c *RunClientFake) Archive(params *runparams.ArchiveRunParams) error

func (*RunClientFake) Get

func (*RunClientFake) List

func (*RunClientFake) ListAll

func (c *RunClientFake) ListAll(params *runparams.ListRunsParams, maxResultSize int) (
	[]*runmodel.APIRun, error)

func (*RunClientFake) Terminate

func (c *RunClientFake) Terminate(params *runparams.TerminateRunParams) error

func (*RunClientFake) Unarchive

func (c *RunClientFake) Unarchive(params *runparams.UnarchiveRunParams) error

type RunInterface

type RunInterface interface {
	Archive(params *params.ArchiveRunParams) error
	Get(params *params.GetRunParams) (*model.APIRunDetail, *workflowapi.Workflow, error)
	List(params *params.ListRunsParams) ([]*model.APIRun, int, string, error)
	ListAll(params *params.ListRunsParams, maxResultSize int) ([]*model.APIRun, error)
	Unarchive(params *params.UnarchiveRunParams) error
	Terminate(params *params.TerminateRunParams) error
}

type VisualizationArguments

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

type VisualizationClient

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

func NewVisualizationClient

func NewVisualizationClient(clientConfig clientcmd.ClientConfig, debug bool) (
	*VisualizationClient, error)

func (*VisualizationClient) Create

type VisualizationClientFake

type VisualizationClientFake struct{}

func NewVisualizationClientFake

func NewVisualizationClientFake() *VisualizationClientFake

func (*VisualizationClientFake) Create

type VisualizationInterface

type VisualizationInterface interface {
	Create(params *params.CreateVisualizationParams) (*model.APIVisualization, error)
}

Jump to

Keyboard shortcuts

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