data

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Overview

Package data is a generated GoMock package.

Index

Constants

View Source
const (
	APISchemaVersion200 supportedApiVersion = "2.0.0"
	APISchemaVersion210 supportedApiVersion = "2.1.0"
	APISchemaVersion220 supportedApiVersion = "2.2.0"
	APIVersionAlpha2    supportedApiVersion = "v1alpha2"
)

Supported devfile API versions

Variables

This section is empty.

Functions

func GetDevfileJSONSchema

func GetDevfileJSONSchema(version string) (string, error)

GetDevfileJSONSchema returns the devfile JSON schema of the supported apiVersion

func IsApiVersionSupported

func IsApiVersionSupported(version string) bool

IsApiVersionSupported returns true if the API version is supported

Types

type DevfileData

type DevfileData interface {
	GetSchemaVersion() string
	SetSchemaVersion(version string)
	GetMetadata() devfilepkg.DevfileMetadata
	SetMetadata(metadata devfilepkg.DevfileMetadata)

	GetAttributes() (attributes.Attributes, error)
	AddAttributes(key string, value interface{}) error
	UpdateAttributes(key string, value interface{}) error

	GetParent() *v1.Parent
	SetParent(parent *v1.Parent)

	GetEvents() v1.Events
	AddEvents(events v1.Events) error
	UpdateEvents(postStart, postStop, preStart, preStop []string)

	GetComponents(common.DevfileOptions) ([]v1.Component, error)
	AddComponents(components []v1.Component) error
	UpdateComponent(component v1.Component) error
	DeleteComponent(name string) error

	GetProjects(common.DevfileOptions) ([]v1.Project, error)
	AddProjects(projects []v1.Project) error
	UpdateProject(project v1.Project) error
	DeleteProject(name string) error

	GetStarterProjects(common.DevfileOptions) ([]v1.StarterProject, error)
	AddStarterProjects(projects []v1.StarterProject) error
	UpdateStarterProject(project v1.StarterProject) error
	DeleteStarterProject(name string) error

	GetCommands(common.DevfileOptions) ([]v1.Command, error)
	AddCommands(commands []v1.Command) error
	UpdateCommand(command v1.Command) error
	DeleteCommand(id string) error

	AddVolumeMounts(containerName string, volumeMounts []v1.VolumeMount) error
	DeleteVolumeMount(name string) error
	GetVolumeMountPaths(mountName, containerName string) ([]string, error)

	GetDevfileWorkspaceSpecContent() *v1.DevWorkspaceTemplateSpecContent
	SetDevfileWorkspaceSpecContent(content v1.DevWorkspaceTemplateSpecContent)
	GetDevfileWorkspaceSpec() *v1.DevWorkspaceTemplateSpec
	SetDevfileWorkspaceSpec(spec v1.DevWorkspaceTemplateSpec)

	GetDevfileContainerComponents(common.DevfileOptions) ([]v1.Component, error)
	GetDevfileVolumeComponents(common.DevfileOptions) ([]v1.Component, error)

	// containers
	RemoveEnvVars(containerEnvMap map[string][]string) error
	SetPorts(containerPortsMap map[string][]string) error
	AddEnvVars(containerEnvMap map[string][]v1.EnvVar) error
	RemovePorts(containerPortsMap map[string][]string) error
}

DevfileData is an interface that defines functions for Devfile data operations

func NewDevfileData

func NewDevfileData(version string) (obj DevfileData, err error)

NewDevfileData returns relevant devfile struct for the provided API version

type MockDevfileData added in v1.1.0

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

MockDevfileData is a mock of DevfileData interface.

func NewMockDevfileData added in v1.1.0

func NewMockDevfileData(ctrl *gomock.Controller) *MockDevfileData

NewMockDevfileData creates a new mock instance.

func (*MockDevfileData) AddAttributes added in v1.1.0

func (m *MockDevfileData) AddAttributes(key string, value interface{}) error

AddAttributes mocks base method.

func (*MockDevfileData) AddCommands added in v1.1.0

func (m *MockDevfileData) AddCommands(commands []v1alpha2.Command) error

AddCommands mocks base method.

func (*MockDevfileData) AddComponents added in v1.1.0

func (m *MockDevfileData) AddComponents(components []v1alpha2.Component) error

AddComponents mocks base method.

func (*MockDevfileData) AddEnvVars added in v1.3.0

func (m *MockDevfileData) AddEnvVars(containerEnvMap map[string][]v1alpha2.EnvVar) error

AddEnvVars mocks base method

func (*MockDevfileData) AddEvents added in v1.1.0

func (m *MockDevfileData) AddEvents(events v1alpha2.Events) error

AddEvents mocks base method.

func (*MockDevfileData) AddProjects added in v1.1.0

func (m *MockDevfileData) AddProjects(projects []v1alpha2.Project) error

AddProjects mocks base method.

func (*MockDevfileData) AddStarterProjects added in v1.1.0

func (m *MockDevfileData) AddStarterProjects(projects []v1alpha2.StarterProject) error

AddStarterProjects mocks base method.

func (*MockDevfileData) AddVolumeMounts added in v1.1.0

func (m *MockDevfileData) AddVolumeMounts(containerName string, volumeMounts []v1alpha2.VolumeMount) error

AddVolumeMounts mocks base method.

func (*MockDevfileData) DeleteCommand added in v1.1.0

func (m *MockDevfileData) DeleteCommand(id string) error

DeleteCommand mocks base method.

func (*MockDevfileData) DeleteComponent added in v1.1.0

func (m *MockDevfileData) DeleteComponent(name string) error

DeleteComponent mocks base method.

func (*MockDevfileData) DeleteProject added in v1.1.0

func (m *MockDevfileData) DeleteProject(name string) error

DeleteProject mocks base method.

func (*MockDevfileData) DeleteStarterProject added in v1.1.0

func (m *MockDevfileData) DeleteStarterProject(name string) error

DeleteStarterProject mocks base method.

func (*MockDevfileData) DeleteVolumeMount added in v1.1.0

func (m *MockDevfileData) DeleteVolumeMount(name string) error

DeleteVolumeMount mocks base method.

func (*MockDevfileData) EXPECT added in v1.1.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockDevfileData) GetAttributes added in v1.1.0

func (m *MockDevfileData) GetAttributes() (attributes.Attributes, error)

GetAttributes mocks base method.

func (*MockDevfileData) GetCommands added in v1.1.0

func (m *MockDevfileData) GetCommands(arg0 common.DevfileOptions) ([]v1alpha2.Command, error)

GetCommands mocks base method.

func (*MockDevfileData) GetComponents added in v1.1.0

func (m *MockDevfileData) GetComponents(arg0 common.DevfileOptions) ([]v1alpha2.Component, error)

GetComponents mocks base method.

func (*MockDevfileData) GetDevfileContainerComponents added in v1.1.0

func (m *MockDevfileData) GetDevfileContainerComponents(arg0 common.DevfileOptions) ([]v1alpha2.Component, error)

GetDevfileContainerComponents mocks base method.

func (*MockDevfileData) GetDevfileVolumeComponents added in v1.1.0

func (m *MockDevfileData) GetDevfileVolumeComponents(arg0 common.DevfileOptions) ([]v1alpha2.Component, error)

GetDevfileVolumeComponents mocks base method.

func (*MockDevfileData) GetDevfileWorkspaceSpec added in v1.1.0

func (m *MockDevfileData) GetDevfileWorkspaceSpec() *v1alpha2.DevWorkspaceTemplateSpec

GetDevfileWorkspaceSpec mocks base method.

func (*MockDevfileData) GetDevfileWorkspaceSpecContent added in v1.1.0

func (m *MockDevfileData) GetDevfileWorkspaceSpecContent() *v1alpha2.DevWorkspaceTemplateSpecContent

GetDevfileWorkspaceSpecContent mocks base method.

func (*MockDevfileData) GetEvents added in v1.1.0

func (m *MockDevfileData) GetEvents() v1alpha2.Events

GetEvents mocks base method.

func (*MockDevfileData) GetMetadata added in v1.1.0

func (m *MockDevfileData) GetMetadata() devfile.DevfileMetadata

GetMetadata mocks base method.

func (*MockDevfileData) GetParent added in v1.1.0

func (m *MockDevfileData) GetParent() *v1alpha2.Parent

GetParent mocks base method.

func (*MockDevfileData) GetProjects added in v1.1.0

func (m *MockDevfileData) GetProjects(arg0 common.DevfileOptions) ([]v1alpha2.Project, error)

GetProjects mocks base method.

func (*MockDevfileData) GetSchemaVersion added in v1.1.0

func (m *MockDevfileData) GetSchemaVersion() string

GetSchemaVersion mocks base method.

func (*MockDevfileData) GetStarterProjects added in v1.1.0

func (m *MockDevfileData) GetStarterProjects(arg0 common.DevfileOptions) ([]v1alpha2.StarterProject, error)

GetStarterProjects mocks base method.

func (*MockDevfileData) GetVolumeMountPaths added in v1.1.0

func (m *MockDevfileData) GetVolumeMountPaths(mountName, containerName string) ([]string, error)

GetVolumeMountPaths mocks base method.

func (*MockDevfileData) RemoveEnvVars added in v1.3.0

func (m *MockDevfileData) RemoveEnvVars(containerEnvMap map[string][]string) error

RemoveEnvVars mocks base method

func (*MockDevfileData) RemovePorts added in v1.3.0

func (m *MockDevfileData) RemovePorts(containerPortsMap map[string][]string) error

RemovePorts mocks base method

func (*MockDevfileData) SetDevfileWorkspaceSpec added in v1.1.0

func (m *MockDevfileData) SetDevfileWorkspaceSpec(spec v1alpha2.DevWorkspaceTemplateSpec)

SetDevfileWorkspaceSpec mocks base method.

func (*MockDevfileData) SetDevfileWorkspaceSpecContent added in v1.1.0

func (m *MockDevfileData) SetDevfileWorkspaceSpecContent(content v1alpha2.DevWorkspaceTemplateSpecContent)

SetDevfileWorkspaceSpecContent mocks base method.

func (*MockDevfileData) SetMetadata added in v1.1.0

func (m *MockDevfileData) SetMetadata(metadata devfile.DevfileMetadata)

SetMetadata mocks base method.

func (*MockDevfileData) SetParent added in v1.1.0

func (m *MockDevfileData) SetParent(parent *v1alpha2.Parent)

SetParent mocks base method.

func (*MockDevfileData) SetPorts added in v1.3.0

func (m *MockDevfileData) SetPorts(containerPortsMap map[string][]string) error

SetPorts mocks base method

func (*MockDevfileData) SetSchemaVersion added in v1.1.0

func (m *MockDevfileData) SetSchemaVersion(version string)

SetSchemaVersion mocks base method.

func (*MockDevfileData) UpdateAttributes added in v1.1.0

func (m *MockDevfileData) UpdateAttributes(key string, value interface{}) error

UpdateAttributes mocks base method.

func (*MockDevfileData) UpdateCommand added in v1.1.0

func (m *MockDevfileData) UpdateCommand(command v1alpha2.Command) error

UpdateCommand mocks base method.

func (*MockDevfileData) UpdateComponent added in v1.1.0

func (m *MockDevfileData) UpdateComponent(component v1alpha2.Component) error

UpdateComponent mocks base method.

func (*MockDevfileData) UpdateEvents added in v1.1.0

func (m *MockDevfileData) UpdateEvents(postStart, postStop, preStart, preStop []string)

UpdateEvents mocks base method.

func (*MockDevfileData) UpdateProject added in v1.1.0

func (m *MockDevfileData) UpdateProject(project v1alpha2.Project) error

UpdateProject mocks base method.

func (*MockDevfileData) UpdateStarterProject added in v1.1.0

func (m *MockDevfileData) UpdateStarterProject(project v1alpha2.StarterProject) error

UpdateStarterProject mocks base method.

type MockDevfileDataMockRecorder added in v1.1.0

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

MockDevfileDataMockRecorder is the mock recorder for MockDevfileData.

func (*MockDevfileDataMockRecorder) AddAttributes added in v1.1.0

func (mr *MockDevfileDataMockRecorder) AddAttributes(key, value interface{}) *gomock.Call

AddAttributes indicates an expected call of AddAttributes.

func (*MockDevfileDataMockRecorder) AddCommands added in v1.1.0

func (mr *MockDevfileDataMockRecorder) AddCommands(commands interface{}) *gomock.Call

AddCommands indicates an expected call of AddCommands.

func (*MockDevfileDataMockRecorder) AddComponents added in v1.1.0

func (mr *MockDevfileDataMockRecorder) AddComponents(components interface{}) *gomock.Call

AddComponents indicates an expected call of AddComponents.

func (*MockDevfileDataMockRecorder) AddEnvVars added in v1.3.0

func (mr *MockDevfileDataMockRecorder) AddEnvVars(containerEnvMap interface{}) *gomock.Call

AddEnvVars indicates an expected call of AddEnvVars

func (*MockDevfileDataMockRecorder) AddEvents added in v1.1.0

func (mr *MockDevfileDataMockRecorder) AddEvents(events interface{}) *gomock.Call

AddEvents indicates an expected call of AddEvents.

func (*MockDevfileDataMockRecorder) AddProjects added in v1.1.0

func (mr *MockDevfileDataMockRecorder) AddProjects(projects interface{}) *gomock.Call

AddProjects indicates an expected call of AddProjects.

func (*MockDevfileDataMockRecorder) AddStarterProjects added in v1.1.0

func (mr *MockDevfileDataMockRecorder) AddStarterProjects(projects interface{}) *gomock.Call

AddStarterProjects indicates an expected call of AddStarterProjects.

func (*MockDevfileDataMockRecorder) AddVolumeMounts added in v1.1.0

func (mr *MockDevfileDataMockRecorder) AddVolumeMounts(containerName, volumeMounts interface{}) *gomock.Call

AddVolumeMounts indicates an expected call of AddVolumeMounts.

func (*MockDevfileDataMockRecorder) DeleteCommand added in v1.1.0

func (mr *MockDevfileDataMockRecorder) DeleteCommand(id interface{}) *gomock.Call

DeleteCommand indicates an expected call of DeleteCommand.

func (*MockDevfileDataMockRecorder) DeleteComponent added in v1.1.0

func (mr *MockDevfileDataMockRecorder) DeleteComponent(name interface{}) *gomock.Call

DeleteComponent indicates an expected call of DeleteComponent.

func (*MockDevfileDataMockRecorder) DeleteProject added in v1.1.0

func (mr *MockDevfileDataMockRecorder) DeleteProject(name interface{}) *gomock.Call

DeleteProject indicates an expected call of DeleteProject.

func (*MockDevfileDataMockRecorder) DeleteStarterProject added in v1.1.0

func (mr *MockDevfileDataMockRecorder) DeleteStarterProject(name interface{}) *gomock.Call

DeleteStarterProject indicates an expected call of DeleteStarterProject.

func (*MockDevfileDataMockRecorder) DeleteVolumeMount added in v1.1.0

func (mr *MockDevfileDataMockRecorder) DeleteVolumeMount(name interface{}) *gomock.Call

DeleteVolumeMount indicates an expected call of DeleteVolumeMount.

func (*MockDevfileDataMockRecorder) GetAttributes added in v1.1.0

func (mr *MockDevfileDataMockRecorder) GetAttributes() *gomock.Call

GetAttributes indicates an expected call of GetAttributes.

func (*MockDevfileDataMockRecorder) GetCommands added in v1.1.0

func (mr *MockDevfileDataMockRecorder) GetCommands(arg0 interface{}) *gomock.Call

GetCommands indicates an expected call of GetCommands.

func (*MockDevfileDataMockRecorder) GetComponents added in v1.1.0

func (mr *MockDevfileDataMockRecorder) GetComponents(arg0 interface{}) *gomock.Call

GetComponents indicates an expected call of GetComponents.

func (*MockDevfileDataMockRecorder) GetDevfileContainerComponents added in v1.1.0

func (mr *MockDevfileDataMockRecorder) GetDevfileContainerComponents(arg0 interface{}) *gomock.Call

GetDevfileContainerComponents indicates an expected call of GetDevfileContainerComponents.

func (*MockDevfileDataMockRecorder) GetDevfileVolumeComponents added in v1.1.0

func (mr *MockDevfileDataMockRecorder) GetDevfileVolumeComponents(arg0 interface{}) *gomock.Call

GetDevfileVolumeComponents indicates an expected call of GetDevfileVolumeComponents.

func (*MockDevfileDataMockRecorder) GetDevfileWorkspaceSpec added in v1.1.0

func (mr *MockDevfileDataMockRecorder) GetDevfileWorkspaceSpec() *gomock.Call

GetDevfileWorkspaceSpec indicates an expected call of GetDevfileWorkspaceSpec.

func (*MockDevfileDataMockRecorder) GetDevfileWorkspaceSpecContent added in v1.1.0

func (mr *MockDevfileDataMockRecorder) GetDevfileWorkspaceSpecContent() *gomock.Call

GetDevfileWorkspaceSpecContent indicates an expected call of GetDevfileWorkspaceSpecContent.

func (*MockDevfileDataMockRecorder) GetEvents added in v1.1.0

func (mr *MockDevfileDataMockRecorder) GetEvents() *gomock.Call

GetEvents indicates an expected call of GetEvents.

func (*MockDevfileDataMockRecorder) GetMetadata added in v1.1.0

func (mr *MockDevfileDataMockRecorder) GetMetadata() *gomock.Call

GetMetadata indicates an expected call of GetMetadata.

func (*MockDevfileDataMockRecorder) GetParent added in v1.1.0

func (mr *MockDevfileDataMockRecorder) GetParent() *gomock.Call

GetParent indicates an expected call of GetParent.

func (*MockDevfileDataMockRecorder) GetProjects added in v1.1.0

func (mr *MockDevfileDataMockRecorder) GetProjects(arg0 interface{}) *gomock.Call

GetProjects indicates an expected call of GetProjects.

func (*MockDevfileDataMockRecorder) GetSchemaVersion added in v1.1.0

func (mr *MockDevfileDataMockRecorder) GetSchemaVersion() *gomock.Call

GetSchemaVersion indicates an expected call of GetSchemaVersion.

func (*MockDevfileDataMockRecorder) GetStarterProjects added in v1.1.0

func (mr *MockDevfileDataMockRecorder) GetStarterProjects(arg0 interface{}) *gomock.Call

GetStarterProjects indicates an expected call of GetStarterProjects.

func (*MockDevfileDataMockRecorder) GetVolumeMountPaths added in v1.1.0

func (mr *MockDevfileDataMockRecorder) GetVolumeMountPaths(mountName, containerName interface{}) *gomock.Call

GetVolumeMountPaths indicates an expected call of GetVolumeMountPaths.

func (*MockDevfileDataMockRecorder) RemoveEnvVars added in v1.3.0

func (mr *MockDevfileDataMockRecorder) RemoveEnvVars(containerEnvMap interface{}) *gomock.Call

RemoveEnvVars indicates an expected call of RemoveEnvVars

func (*MockDevfileDataMockRecorder) RemovePorts added in v1.3.0

func (mr *MockDevfileDataMockRecorder) RemovePorts(containerPortsMap interface{}) *gomock.Call

RemovePorts indicates an expected call of RemovePorts

func (*MockDevfileDataMockRecorder) SetDevfileWorkspaceSpec added in v1.1.0

func (mr *MockDevfileDataMockRecorder) SetDevfileWorkspaceSpec(spec interface{}) *gomock.Call

SetDevfileWorkspaceSpec indicates an expected call of SetDevfileWorkspaceSpec.

func (*MockDevfileDataMockRecorder) SetDevfileWorkspaceSpecContent added in v1.1.0

func (mr *MockDevfileDataMockRecorder) SetDevfileWorkspaceSpecContent(content interface{}) *gomock.Call

SetDevfileWorkspaceSpecContent indicates an expected call of SetDevfileWorkspaceSpecContent.

func (*MockDevfileDataMockRecorder) SetMetadata added in v1.1.0

func (mr *MockDevfileDataMockRecorder) SetMetadata(metadata interface{}) *gomock.Call

SetMetadata indicates an expected call of SetMetadata.

func (*MockDevfileDataMockRecorder) SetParent added in v1.1.0

func (mr *MockDevfileDataMockRecorder) SetParent(parent interface{}) *gomock.Call

SetParent indicates an expected call of SetParent.

func (*MockDevfileDataMockRecorder) SetPorts added in v1.3.0

func (mr *MockDevfileDataMockRecorder) SetPorts(containerPortsMap interface{}) *gomock.Call

SetPorts indicates an expected call of SetPorts

func (*MockDevfileDataMockRecorder) SetSchemaVersion added in v1.1.0

func (mr *MockDevfileDataMockRecorder) SetSchemaVersion(version interface{}) *gomock.Call

SetSchemaVersion indicates an expected call of SetSchemaVersion.

func (*MockDevfileDataMockRecorder) UpdateAttributes added in v1.1.0

func (mr *MockDevfileDataMockRecorder) UpdateAttributes(key, value interface{}) *gomock.Call

UpdateAttributes indicates an expected call of UpdateAttributes.

func (*MockDevfileDataMockRecorder) UpdateCommand added in v1.1.0

func (mr *MockDevfileDataMockRecorder) UpdateCommand(command interface{}) *gomock.Call

UpdateCommand indicates an expected call of UpdateCommand.

func (*MockDevfileDataMockRecorder) UpdateComponent added in v1.1.0

func (mr *MockDevfileDataMockRecorder) UpdateComponent(component interface{}) *gomock.Call

UpdateComponent indicates an expected call of UpdateComponent.

func (*MockDevfileDataMockRecorder) UpdateEvents added in v1.1.0

func (mr *MockDevfileDataMockRecorder) UpdateEvents(postStart, postStop, preStart, preStop interface{}) *gomock.Call

UpdateEvents indicates an expected call of UpdateEvents.

func (*MockDevfileDataMockRecorder) UpdateProject added in v1.1.0

func (mr *MockDevfileDataMockRecorder) UpdateProject(project interface{}) *gomock.Call

UpdateProject indicates an expected call of UpdateProject.

func (*MockDevfileDataMockRecorder) UpdateStarterProject added in v1.1.0

func (mr *MockDevfileDataMockRecorder) UpdateStarterProject(project interface{}) *gomock.Call

UpdateStarterProject indicates an expected call of UpdateStarterProject.

Directories

Path Synopsis
v2

Jump to

Keyboard shortcuts

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