Documentation ¶
Index ¶
- func GetApplicationDockerCompose(options ApplicationOptions) (*types.DockerCompose, error)
- func GetBuiltLocalAppDependencies(appContext *context.AppContext) map[string]*LocalDependency
- func GetBuiltLocalServiceDependencies(serviceConfig types.ServiceConfig, appContext *context.AppContext) map[string]*LocalDependency
- func GetDockerComposeProjectName(appName string) string
- func GetServiceDockerCompose(appContext *context.AppContext, role string, mode types.BuildMode, ...) (*types.DockerCompose, error)
- func GetTestDockerComposeProjectName(appName string) string
- func WriteYML(dir, filename string, file *types.DockerCompose) error
- type ApplicationOptions
- type LocalDependency
- type ServiceComposeBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetApplicationDockerCompose ¶ added in v0.32.0
func GetApplicationDockerCompose(options ApplicationOptions) (*types.DockerCompose, error)
GetApplicationDockerCompose returns the docker compose for a application
func GetBuiltLocalAppDependencies ¶ added in v0.36.0
func GetBuiltLocalAppDependencies(appContext *context.AppContext) map[string]*LocalDependency
GetBuiltLocalAppDependencies returns the LocalDependency objects for application dependencies only
func GetBuiltLocalServiceDependencies ¶ added in v0.36.0
func GetBuiltLocalServiceDependencies(serviceConfig types.ServiceConfig, appContext *context.AppContext) map[string]*LocalDependency
GetBuiltLocalServiceDependencies returns the dependencies for a single service
func GetDockerComposeProjectName ¶
GetDockerComposeProjectName creates a docker compose project name the same way docker-compose mutates the COMPOSE_PROJECT_NAME env var
func GetServiceDockerCompose ¶ added in v0.32.0
func GetServiceDockerCompose(appContext *context.AppContext, role string, mode types.BuildMode, serviceEndpoints endpoints.ServiceEndpoints) (*types.DockerCompose, error)
GetServiceDockerCompose returns the DockerConfigs for a service and its dependencies in docker-compose.yml
func GetTestDockerComposeProjectName ¶ added in v0.29.0
GetTestDockerComposeProjectName creates a docker compose project name for tests
Types ¶
type ApplicationOptions ¶ added in v0.28.4
type ApplicationOptions struct { AppContext *context.AppContext BuildMode types.BuildMode }
ApplicationOptions are the options to
type LocalDependency ¶ added in v0.36.0
type LocalDependency struct {
// contains filtered or unexported fields
}
LocalDependency contains methods that return config information about a local dependency
func NewLocalDependency ¶ added in v0.36.0
func NewLocalDependency(dependencyName string, dependency types.LocalDependency, appContext *context.AppContext) *LocalDependency
NewLocalDependency returns a LocalDependency
func (*LocalDependency) GetDockerConfig ¶ added in v0.36.0
func (g *LocalDependency) GetDockerConfig() (types.DockerConfig, error)
GetDockerConfig returns docker configuration and an error if any
func (*LocalDependency) GetServiceEnvVariables ¶ added in v0.36.0
func (g *LocalDependency) GetServiceEnvVariables() map[string]string
GetServiceEnvVariables returns the environment variables that need to be passed to services that use it
func (*LocalDependency) GetVolumeNames ¶ added in v0.36.0
func (g *LocalDependency) GetVolumeNames() []string
GetVolumeNames returns the named volumes used by this dependency
type ServiceComposeBuilder ¶ added in v0.32.0
type ServiceComposeBuilder struct { AppConfig *types.AppConfig ServiceConfig types.ServiceConfig Mode types.BuildMode ServiceSource types.ServiceSource BuiltAppDependencies map[string]*LocalDependency BuiltServiceDependencies map[string]*LocalDependency Role string AppDir string ServiceEndpoints endpoints.ServiceEndpoints }
ServiceComposeBuilder contains the docker-compose.yml config for a single service
func NewServiceComposeBuilder ¶ added in v0.32.0
func NewServiceComposeBuilder(appContext *context.AppContext, role string, mode types.BuildMode, serviceEndpoints endpoints.ServiceEndpoints) *ServiceComposeBuilder
NewServiceComposeBuilder is ServiceComposeBuilder's constructor