当前位置: 首页>>代码示例>>Golang>>正文


Golang app.WithProject函数代码示例

本文整理汇总了Golang中github.com/docker/libcompose/cli/app.WithProject函数的典型用法代码示例。如果您正苦于以下问题:Golang WithProject函数的具体用法?Golang WithProject怎么用?Golang WithProject使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了WithProject函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: PsCommand

func PsCommand(factory app.ProjectFactory) cli.Command {
	return cli.Command{
		Name:   "ps",
		Usage:  "List containers",
		Action: app.WithProject(factory, app.ProjectPs),
	}
}
开发者ID:nathanleclaire,项目名称:libcompose,代码行数:7,代码来源:command.go

示例2: PullCommand

// PullCommand defines the libcompose pull subcommand.
func PullCommand(factory app.ProjectFactory) cli.Command {
	return cli.Command{
		Name:   "pull",
		Usage:  "Pulls images for services",
		Action: app.WithProject(factory, app.ProjectPull),
	}
}
开发者ID:pirater,项目名称:os,代码行数:8,代码来源:command.go

示例3: UpCommand

// UpCommand defines the libcompose up subcommand.
func UpCommand(factory app.ProjectFactory) cli.Command {
	return cli.Command{
		Name:   "up",
		Usage:  "Bring all services up",
		Action: app.WithProject(factory, app.ProjectUp),
		Flags: []cli.Flag{
			cli.BoolFlag{
				Name:  "d",
				Usage: "Do not block and log",
			},
			cli.BoolFlag{
				Name:  "no-build",
				Usage: "Don't build an image, even if it's missing.",
			},
			cli.BoolFlag{
				Name:  "no-recreate",
				Usage: "If containers already exist, don't recreate them. Incompatible with --force-recreate.",
			},
			cli.BoolFlag{
				Name:  "force-recreate",
				Usage: "Recreate containers even if their configuration and image haven't changed. Incompatible with --no-recreate.",
			},
		},
	}
}
开发者ID:kunalkushwaha,项目名称:libcompose,代码行数:26,代码来源:command.go

示例4: BuildCommand

// BuildCommand defines the libcompose build subcommand.
func BuildCommand(factory app.ProjectFactory) cli.Command {
	return cli.Command{
		Name:   "build",
		Usage:  "Build or rebuild services.",
		Action: app.WithProject(factory, app.ProjectBuild),
	}
}
开发者ID:pirater,项目名称:os,代码行数:8,代码来源:command.go

示例5: CreateCommand

// CreateCommand defines the libcompose create subcommand.
func CreateCommand(factory app.ProjectFactory) cli.Command {
	return cli.Command{
		Name:   "create",
		Usage:  "Create all services but do not start",
		Action: app.WithProject(factory, app.ProjectCreate),
	}
}
开发者ID:pirater,项目名称:os,代码行数:8,代码来源:command.go

示例6: UnpauseCommand

// UnpauseCommand defines the libcompose unpause subcommand.
func UnpauseCommand(factory app.ProjectFactory) cli.Command {
	return cli.Command{
		Name:  "unpause",
		Usage: "Unpause services.",
		// ArgsUsage: "[SERVICE...]",
		Action: app.WithProject(factory, app.ProjectUnpause),
	}
}
开发者ID:schmunk42,项目名称:libcompose,代码行数:9,代码来源:command.go

示例7: DownCommand

// DownCommand defines the libcompose stop subcommand.
func DownCommand(factory app.ProjectFactory) cli.Command {
	return cli.Command{
		Name:   "down",
		Usage:  "Stop and remove containers, networks, images, and volumes",
		Action: app.WithProject(factory, app.ProjectDown),
		Flags:  []cli.Flag{},
	}
}
开发者ID:kunalkushwaha,项目名称:libcompose,代码行数:9,代码来源:command.go

示例8: RunCommand

// RunCommand defines the libcompose run subcommand.
func RunCommand(factory app.ProjectFactory) cli.Command {
	return cli.Command{
		Name:   "run",
		Usage:  "Run a one-off command",
		Action: app.WithProject(factory, app.ProjectRun),
		Flags:  []cli.Flag{},
	}
}
开发者ID:kunalkushwaha,项目名称:libcompose,代码行数:9,代码来源:command.go

示例9: PullCommand

// PullCommand defines the libcompose pull subcommand.
func PullCommand(factory app.ProjectFactory) cli.Command {
	return cli.Command{
		Name:   "pull",
		Usage:  "Pulls images for services",
		Action: app.WithProject(factory, app.ProjectPull),
		Flags: []cli.Flag{
			cli.BoolFlag{
				Name:  "ignore-pull-failures",
				Usage: "Pull what it can and ignores images with pull failures.",
			},
		},
	}
}
开发者ID:haj,项目名称:kompose,代码行数:14,代码来源:command.go

示例10: UpCommand

func UpCommand(factory app.ProjectFactory) cli.Command {
	return cli.Command{
		Name:   "up",
		Usage:  "Bring all services up",
		Action: app.WithProject(factory, app.ProjectUp),
		Flags: []cli.Flag{
			cli.BoolFlag{
				Name:  "d",
				Usage: "Do not block and log",
			},
		},
	}
}
开发者ID:nathanleclaire,项目名称:libcompose,代码行数:13,代码来源:command.go

示例11: ConfigCommand

// ConfigCommand defines the libcompose config subcommand
func ConfigCommand(factory app.ProjectFactory) cli.Command {
	return cli.Command{
		Name:   "config",
		Usage:  "Validate and view the compose file.",
		Action: app.WithProject(factory, app.ProjectConfig),
		Flags: []cli.Flag{
			cli.BoolFlag{
				Name:  "quiet,q",
				Usage: "Only validate the configuration, don't print anything.",
			},
		},
	}
}
开发者ID:vdemeester,项目名称:rancher-compose,代码行数:14,代码来源:command.go

示例12: LogsCommand

// LogsCommand defines the libcompose logs subcommand.
func LogsCommand(factory app.ProjectFactory) cli.Command {
	return cli.Command{
		Name:   "logs",
		Usage:  "Get service logs",
		Action: app.WithProject(factory, app.ProjectLog),
		Flags: []cli.Flag{
			cli.BoolFlag{
				Name:  "follow",
				Usage: "Follow log output.",
			},
		},
	}
}
开发者ID:jainvipin,项目名称:libcompose,代码行数:14,代码来源:command.go

示例13: RmCommand

func RmCommand(factory app.ProjectFactory) cli.Command {
	return cli.Command{
		Name:   "rm",
		Usage:  "Delete services",
		Action: app.WithProject(factory, app.ProjectDelete),
		Flags: []cli.Flag{
			cli.BoolFlag{
				Name:  "force,f",
				Usage: "Allow deletion of all services",
			},
		},
	}
}
开发者ID:nathanleclaire,项目名称:libcompose,代码行数:13,代码来源:command.go

示例14: PsCommand

// PsCommand defines the libcompose ps subcommand.
func PsCommand(factory app.ProjectFactory) cli.Command {
	return cli.Command{
		Name:   "ps",
		Usage:  "List containers",
		Action: app.WithProject(factory, app.ProjectPs),
		Flags: []cli.Flag{
			cli.BoolFlag{
				Name:  "q",
				Usage: "Only display IDs",
			},
		},
	}
}
开发者ID:pirater,项目名称:os,代码行数:14,代码来源:command.go

示例15: RunCommand

// RunCommand defines the libcompose run subcommand.
func RunCommand(factory app.ProjectFactory) cli.Command {
	return cli.Command{
		Name:   "run",
		Usage:  "Run a one-off command",
		Action: app.WithProject(factory, app.ProjectRun),
		Flags: []cli.Flag{
			cli.BoolFlag{
				Name:  "d",
				Usage: "Detached mode: Run container in the background, print new container name.",
			},
		},
	}
}
开发者ID:jainvipin,项目名称:libcompose,代码行数:14,代码来源:command.go


注:本文中的github.com/docker/libcompose/cli/app.WithProject函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。