data

package
v2.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 16 Imported by: 5

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"
	APISchemaVersion221 supportedApiVersion = "2.2.1"
	APISchemaVersion222 supportedApiVersion = "2.2.2"
	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

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

MockDevfileData is a mock of DevfileData interface.

func NewMockDevfileData

func NewMockDevfileData(ctrl *gomock.Controller) *MockDevfileData

NewMockDevfileData creates a new mock instance.

func (*MockDevfileData) AddAttributes

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

AddAttributes mocks base method.

func (*MockDevfileData) AddCommands

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

AddCommands mocks base method.

func (*MockDevfileData) AddComponents

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

AddComponents mocks base method.

func (*MockDevfileData) AddEnvVars

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

AddEnvVars mocks base method

func (*MockDevfileData) AddEvents

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

AddEvents mocks base method.

func (*MockDevfileData) AddProjects

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

AddProjects mocks base method.

func (*MockDevfileData) AddStarterProjects

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

AddStarterProjects mocks base method.

func (*MockDevfileData) AddVolumeMounts

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

AddVolumeMounts mocks base method.

func (*MockDevfileData) DeleteCommand

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

DeleteCommand mocks base method.

func (*MockDevfileData) DeleteComponent

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

DeleteComponent mocks base method.

func (*MockDevfileData) DeleteProject

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

DeleteProject mocks base method.

func (*MockDevfileData) DeleteStarterProject

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

DeleteStarterProject mocks base method.

func (*MockDevfileData) DeleteVolumeMount

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

DeleteVolumeMount mocks base method.

func (*MockDevfileData) EXPECT

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

func (*MockDevfileData) GetAttributes

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

GetAttributes mocks base method.

func (*MockDevfileData) GetCommands

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

GetCommands mocks base method.

func (*MockDevfileData) GetComponents

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

GetComponents mocks base method.

func (*MockDevfileData) GetDevfileContainerComponents

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

GetDevfileContainerComponents mocks base method.

func (*MockDevfileData) GetDevfileVolumeComponents

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

GetDevfileVolumeComponents mocks base method.

func (*MockDevfileData) GetDevfileWorkspaceSpec

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

GetDevfileWorkspaceSpec mocks base method.

func (*MockDevfileData) GetDevfileWorkspaceSpecContent

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

GetDevfileWorkspaceSpecContent mocks base method.

func (*MockDevfileData) GetEvents

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

GetEvents mocks base method.

func (*MockDevfileData) GetMetadata

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

GetMetadata mocks base method.

func (*MockDevfileData) GetParent

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

GetParent mocks base method.

func (*MockDevfileData) GetProjects

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

GetProjects mocks base method.

func (*MockDevfileData) GetSchemaVersion

func (m *MockDevfileData) GetSchemaVersion() string

GetSchemaVersion mocks base method.

func (*MockDevfileData) GetStarterProjects

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

GetStarterProjects mocks base method.

func (*MockDevfileData) GetVolumeMountPaths

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

GetVolumeMountPaths mocks base method.

func (*MockDevfileData) RemoveEnvVars

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

RemoveEnvVars mocks base method

func (*MockDevfileData) RemovePorts

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

RemovePorts mocks base method

func (*MockDevfileData) SetDevfileWorkspaceSpec

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

SetDevfileWorkspaceSpec mocks base method.

func (*MockDevfileData) SetDevfileWorkspaceSpecContent

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

SetDevfileWorkspaceSpecContent mocks base method.

func (*MockDevfileData) SetMetadata

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

SetMetadata mocks base method.

func (*MockDevfileData) SetParent

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

SetParent mocks base method.

func (*MockDevfileData) SetPorts

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

SetPorts mocks base method

func (*MockDevfileData) SetSchemaVersion

func (m *MockDevfileData) SetSchemaVersion(version string)

SetSchemaVersion mocks base method.

func (*MockDevfileData) UpdateAttributes

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

UpdateAttributes mocks base method.

func (*MockDevfileData) UpdateCommand

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

UpdateCommand mocks base method.

func (*MockDevfileData) UpdateComponent

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

UpdateComponent mocks base method.

func (*MockDevfileData) UpdateEvents

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

UpdateEvents mocks base method.

func (*MockDevfileData) UpdateProject

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

UpdateProject mocks base method.

func (*MockDevfileData) UpdateStarterProject

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

UpdateStarterProject mocks base method.

type MockDevfileDataMockRecorder

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

MockDevfileDataMockRecorder is the mock recorder for MockDevfileData.

func (*MockDevfileDataMockRecorder) AddAttributes

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

AddAttributes indicates an expected call of AddAttributes.

func (*MockDevfileDataMockRecorder) AddCommands

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

AddCommands indicates an expected call of AddCommands.

func (*MockDevfileDataMockRecorder) AddComponents

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

AddComponents indicates an expected call of AddComponents.

func (*MockDevfileDataMockRecorder) AddEnvVars

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

AddEnvVars indicates an expected call of AddEnvVars

func (*MockDevfileDataMockRecorder) AddEvents

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

AddEvents indicates an expected call of AddEvents.

func (*MockDevfileDataMockRecorder) AddProjects

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

AddProjects indicates an expected call of AddProjects.

func (*MockDevfileDataMockRecorder) AddStarterProjects

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

AddStarterProjects indicates an expected call of AddStarterProjects.

func (*MockDevfileDataMockRecorder) AddVolumeMounts

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

AddVolumeMounts indicates an expected call of AddVolumeMounts.

func (*MockDevfileDataMockRecorder) DeleteCommand

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

DeleteCommand indicates an expected call of DeleteCommand.

func (*MockDevfileDataMockRecorder) DeleteComponent

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

DeleteComponent indicates an expected call of DeleteComponent.

func (*MockDevfileDataMockRecorder) DeleteProject

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

DeleteProject indicates an expected call of DeleteProject.

func (*MockDevfileDataMockRecorder) DeleteStarterProject

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

DeleteStarterProject indicates an expected call of DeleteStarterProject.

func (*MockDevfileDataMockRecorder) DeleteVolumeMount

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

DeleteVolumeMount indicates an expected call of DeleteVolumeMount.

func (*MockDevfileDataMockRecorder) GetAttributes

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

GetAttributes indicates an expected call of GetAttributes.

func (*MockDevfileDataMockRecorder) GetCommands

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

GetCommands indicates an expected call of GetCommands.

func (*MockDevfileDataMockRecorder) GetComponents

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

GetComponents indicates an expected call of GetComponents.

func (*MockDevfileDataMockRecorder) GetDevfileContainerComponents

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

GetDevfileContainerComponents indicates an expected call of GetDevfileContainerComponents.

func (*MockDevfileDataMockRecorder) GetDevfileVolumeComponents

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

GetDevfileVolumeComponents indicates an expected call of GetDevfileVolumeComponents.

func (*MockDevfileDataMockRecorder) GetDevfileWorkspaceSpec

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

GetDevfileWorkspaceSpec indicates an expected call of GetDevfileWorkspaceSpec.

func (*MockDevfileDataMockRecorder) GetDevfileWorkspaceSpecContent

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

GetDevfileWorkspaceSpecContent indicates an expected call of GetDevfileWorkspaceSpecContent.

func (*MockDevfileDataMockRecorder) GetEvents

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

GetEvents indicates an expected call of GetEvents.

func (*MockDevfileDataMockRecorder) GetMetadata

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

GetMetadata indicates an expected call of GetMetadata.

func (*MockDevfileDataMockRecorder) GetParent

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

GetParent indicates an expected call of GetParent.

func (*MockDevfileDataMockRecorder) GetProjects

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

GetProjects indicates an expected call of GetProjects.

func (*MockDevfileDataMockRecorder) GetSchemaVersion

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

GetSchemaVersion indicates an expected call of GetSchemaVersion.

func (*MockDevfileDataMockRecorder) GetStarterProjects

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

GetStarterProjects indicates an expected call of GetStarterProjects.

func (*MockDevfileDataMockRecorder) GetVolumeMountPaths

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

GetVolumeMountPaths indicates an expected call of GetVolumeMountPaths.

func (*MockDevfileDataMockRecorder) RemoveEnvVars

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

RemoveEnvVars indicates an expected call of RemoveEnvVars

func (*MockDevfileDataMockRecorder) RemovePorts

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

RemovePorts indicates an expected call of RemovePorts

func (*MockDevfileDataMockRecorder) SetDevfileWorkspaceSpec

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

SetDevfileWorkspaceSpec indicates an expected call of SetDevfileWorkspaceSpec.

func (*MockDevfileDataMockRecorder) SetDevfileWorkspaceSpecContent

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

SetDevfileWorkspaceSpecContent indicates an expected call of SetDevfileWorkspaceSpecContent.

func (*MockDevfileDataMockRecorder) SetMetadata

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

SetMetadata indicates an expected call of SetMetadata.

func (*MockDevfileDataMockRecorder) SetParent

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

SetParent indicates an expected call of SetParent.

func (*MockDevfileDataMockRecorder) SetPorts

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

SetPorts indicates an expected call of SetPorts

func (*MockDevfileDataMockRecorder) SetSchemaVersion

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

SetSchemaVersion indicates an expected call of SetSchemaVersion.

func (*MockDevfileDataMockRecorder) UpdateAttributes

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

UpdateAttributes indicates an expected call of UpdateAttributes.

func (*MockDevfileDataMockRecorder) UpdateCommand

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

UpdateCommand indicates an expected call of UpdateCommand.

func (*MockDevfileDataMockRecorder) UpdateComponent

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

UpdateComponent indicates an expected call of UpdateComponent.

func (*MockDevfileDataMockRecorder) UpdateEvents

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

UpdateEvents indicates an expected call of UpdateEvents.

func (*MockDevfileDataMockRecorder) UpdateProject

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

UpdateProject indicates an expected call of UpdateProject.

func (*MockDevfileDataMockRecorder) UpdateStarterProject

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