Help us shape the future of Go! Take the 2026 Go Developer Survey

conversion

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AdminUserID represents the default user id of service.
	AdminUserID string = "admin"

	// AdminUsername represents the default username of service.
	AdminUsername string = "admin"
)

Variables

This section is empty.

Functions

func ConvertPipelineParamsToVersion

func ConvertPipelineParamsToVersion(performParams *newapi.PipelinePerformParams) *api.Version

ConvertPipelineParamsToVersion converts the pipeline perform params to run the pipeline.

func ConvertPipelineToService

func ConvertPipelineToService(projectName string, pipeline *newapi.Pipeline) (*api.Service, error)

ConvertPipelineToService converts the pipeline to service, as the running of pipeline dependents on service. This is just a workaround, the pipeline will can be run directly in the future.

func ConvertVersionToPipelineRecord

func ConvertVersionToPipelineRecord(version *api.Version) (*newapi.PipelineRecord, error)

ConvertVersionToPipelineRecord converts the version to pipeline record.

Types

type Build

type Build struct {
	ContextDir     string `yaml:"context_dir,omitempty"`
	DockerfileName string `yaml:"dockerfile_name,omitempty"`
}

Build represents the config of Build in caicloud YAML.

type Config

type Config struct {
	PreBuild    *PreBuild    `yaml:"pre_build,omitempty"`
	Build       *Build       `yaml:"build,omitempty"`
	Integration *Integration `yaml:"integration,omitempty"`
}

Config represents the config of caicloud YAML.

type Integration

type Integration struct {
	Services    map[string]Service `yaml:"services,omitempty"`
	Image       string             `yaml:"image,omitempty"`
	Environment []string           `yaml:"environment,omitempty"`
	Commands    []string           `yaml:"commands,omitempty"`
}

Integration represents the config of Integration in caicloud YAML.

type PreBuild

type PreBuild struct {
	Image       string   `yaml:"image"`
	Environment []string `yaml:"environment,omitempty"`
	Commands    []string `yaml:"commands"`
	Outputs     []string `yaml:"outputs"`
}

PreBuild represents the config of preBuild in caicloud YAML.

type Service

type Service struct {
	// Image represents the image of service, can not be empty.
	Image       string   `yaml:"image"`
	Environment []string `yaml:"environment,omitempty"`
	Commands    []string `yaml:"commmands,omitempty"`
}

Service represents the dependent service in integration test.

Jump to

Keyboard shortcuts

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