github.com/replicatedhq/ship@v0.55.0/pkg/lifecycle/interfaces.go (about) 1 package lifecycle 2 3 import ( 4 "context" 5 6 "github.com/replicatedhq/ship/pkg/api" 7 "github.com/replicatedhq/ship/pkg/lifecycle/daemon/daemontypes" 8 "github.com/replicatedhq/ship/pkg/lifecycle/render/planner" 9 ) 10 11 type DoWithProgress func(progress daemontypes.Progress) 12 type DoWithMessage func(progress daemontypes.Message) 13 14 type Messenger interface { 15 Execute(ctx context.Context, release *api.Release, step *api.Message) error 16 } 17 18 type Renderer interface { 19 Execute(ctx context.Context, release *api.Release, step *api.Render) error 20 WithStatusReceiver(receiver daemontypes.StatusReceiver) Renderer 21 WithPlanner(planner planner.Planner) Renderer 22 } 23 24 type Terraformer interface { 25 Execute(ctx context.Context, release api.Release, step api.Terraform, confirmChan chan bool) error 26 WithStatusReceiver(receiver daemontypes.StatusReceiver) Terraformer 27 } 28 29 type HelmIntro interface { 30 Execute(context.Context, *api.Release, *api.HelmIntro) error 31 } 32 33 type HelmValues interface { 34 Execute(context.Context, *api.Release, *api.HelmValues) error 35 } 36 37 type Kustomizer interface { 38 PreExecute(ctx context.Context, step api.Step) error 39 Execute(ctx context.Context, release *api.Release, step api.Kustomize) error 40 } 41 42 type KustomizeIntro interface { 43 Execute(ctx context.Context, release *api.Release, step api.KustomizeIntro) error 44 } 45 46 type Unforker interface { 47 PreExecute(ctx context.Context, step api.Step) error 48 Execute(ctx context.Context, release *api.Release, step api.Unfork) error 49 } 50 51 type KubectlApply interface { 52 Execute(ctx context.Context, release api.Release, step api.KubectlApply, confirmChan chan bool) error 53 WithStatusReceiver(receiver daemontypes.StatusReceiver) KubectlApply 54 } 55 56 // Config is a thing that can resolve configuration options 57 type Config interface { 58 ResolveConfig(context.Context, *api.Release) (map[string]interface{}, error) 59 }