From 87eaf241b514bd64cd7c8c9e42dc0dfbe6697860 Mon Sep 17 00:00:00 2001 From: Bastien Chatelard Date: Thu, 28 Nov 2024 11:36:14 +0100 Subject: [PATCH] Bootstrap cog addon --- pkg/koyeb/deploy_addons.go | 2 ++ pkg/koyeb/deploy_addons_cog.go | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 pkg/koyeb/deploy_addons_cog.go diff --git a/pkg/koyeb/deploy_addons.go b/pkg/koyeb/deploy_addons.go index eec5896..f052d6f 100644 --- a/pkg/koyeb/deploy_addons.go +++ b/pkg/koyeb/deploy_addons.go @@ -32,6 +32,8 @@ type Addon interface { func (h *addonsHandler) RegisterAddon(name string) error { switch name { + case "cog": + h.addons = append(h.addons, &cogAddon{}) default: return fmt.Errorf("unknown addon: %s", name) } diff --git a/pkg/koyeb/deploy_addons_cog.go b/pkg/koyeb/deploy_addons_cog.go new file mode 100644 index 0000000..cc5bafe --- /dev/null +++ b/pkg/koyeb/deploy_addons_cog.go @@ -0,0 +1,21 @@ +package koyeb + +import "github.com/koyeb/koyeb-api-client-go/api/v1/koyeb" + +type cogAddon struct{} + +func (c *cogAddon) PreDeploy(ctx *CLIContext, definition *koyeb.DeploymentDefinition) error { + return nil +} + +func (c *cogAddon) PostDeploy(ctx *CLIContext, definition *koyeb.DeploymentDefinition) error { + return nil +} + +func (c *cogAddon) Setup(ctx *CLIContext) error { + return nil +} + +func (c *cogAddon) Cleanup(ctx *CLIContext) error { + return nil +}