posh-providers/stackitcloud/stackit
2025-09-22 10:25:50 +02:00
..
cluster.go feat(stackitcloud/stackit): add provider 2024-07-16 22:52:10 +02:00
command.go fix: stackit provider 2024-07-29 11:57:05 +02:00
config_test.go feat: use json required 2025-09-22 07:05:37 +02:00
config.base.json feat: generate schema 2025-09-19 16:29:28 +02:00
config.go feat(stackitcloud/stackit): add provider 2024-07-16 22:52:10 +02:00
config.schema.json feat: update schema 2025-09-22 10:25:50 +02:00
project.go feat(stackitcloud/stackit): add provider 2024-07-16 22:52:10 +02:00
README.md feat(stackitcloud/stackit): add provider 2024-07-16 22:52:10 +02:00
stackit.go feat(stackitcloud/stackit): add provider 2024-07-16 22:52:10 +02:00

POSH stackit provider

Usage

Plugin

package main

import (
  "github.com/foomo/posh-providers/kubernets/kubectl"
  "github.com/foomo/posh-providers/stackitcloud/stackit"
  "github.com/foomo/posh/pkg/cache"
  "github.com/foomo/posh/pkg/command"
)

type Plugin struct {
  l        log.Logger
  cache    cache.Cache
  stackit  *stackit.Stackit
  kubectl  *kubectl.Kubectl
  commands command.Commands
}

func New(l log.Logger) (plugin.Plugin, error) {
  var err error
  inst := &Plugin{
    l:        l,
    cache:    &cache.MemoryCache{},
    commands: command.Commands{},
  }

  // ...

  inst.kubectl, err = kubectl.New(l, inst.cache)
  if err != nil {
    return nil, errors.Wrap(err, "failed to create kubectl")
  }

  inst.stackit, err = stackit.New(l, inst.cache)
  if err != nil {
    return nil, errors.Wrap(err, "failed to create stackit")
  }

  // ...

  inst.commands.Add(stackit.NewCommand(l, inst.cache, inst.stackit, inst.kubectl))

  // ...

  return inst, nil
}

Config

## stackit
stackit:
  projects:
    my-project:
      id: 123456-123456-123456
      clusters:
        dev:
          name: my-project-dev-cluster

Ownbrew

To install binary locally, add:

ownbrew:
  packages:
    ## https://github.com/stackitcloud/stackit-cli/releases
    - name: stackit
      tap: foomo/tap/stackitcloud/stackit-cli
      version: 0.9.0