Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #5 from da-ar/Scaffolds
Browse files Browse the repository at this point in the history
Additional Scaffolding
  • Loading branch information
michaeltlombardi authored Oct 28, 2021
2 parents 13c9988 + 5b1340f commit 0893ae1
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/prm/backend.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//nolint:structcheck,unused
package prm

type BackendI interface {
GetTool(toolName string, prmConfig Config) (Tool, error)
Validate(tool *Tool) (ToolExitCode, error)
Exec(tool *Tool, args []string) (ToolExitCode, error)
}
21 changes: 21 additions & 0 deletions pkg/prm/backends/docker.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package backends

import "github.com/puppetlabs/prm/pkg/prm"

type Docker struct {
}

func (*Docker) GetTool(toolName string, prmConfig prm.Config) (prm.Tool, error) {
// TODO
return prm.Tool{}, nil
}

func (*Docker) Validate(tool *prm.Tool) (prm.ToolExitCode, error) {
// TODO
return prm.FAILURE, nil
}

func (*Docker) Exec(tool *prm.Tool, args []string) (prm.ToolExitCode, error) {
// TODO
return prm.FAILURE, nil
}
9 changes: 9 additions & 0 deletions pkg/prm/config.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//nolint:structcheck,unused
package prm

import "github.com/Masterminds/semver"

type Config struct {
puppetVersion semver.Version
backend BackendI
}

0 comments on commit 0893ae1

Please sign in to comment.