ssm-browse: new utility to browse SSM parameters

This is more of an exercise to work out how best to use controllers
This commit is contained in:
Leon Mika 2022-03-29 08:41:27 +11:00
parent 46be54b5fb
commit 0b745a6dfa
14 changed files with 348 additions and 5 deletions

View file

@ -0,0 +1,10 @@
package ssmparameters
import (
"context"
"github.com/lmika/awstools/internal/ssm-browse/models"
)
type SSMProvider interface {
List(ctx context.Context) (*models.SSMParameters, error)
}

View file

@ -0,0 +1,20 @@
package ssmparameters
import (
"context"
"github.com/lmika/awstools/internal/ssm-browse/models"
)
type Service struct {
provider SSMProvider
}
func NewService(provider SSMProvider) *Service {
return &Service{
provider: provider,
}
}
func (s *Service) List(ctx context.Context) (*models.SSMParameters, error) {
return s.provider.List(ctx)
}