service

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Impl

type Impl struct {
	SSMClient SSMClient
}

Impl will be the implementation of the Service interface

func (*Impl) GetParameters

func (svc *Impl) GetParameters(searchPath string) (map[string]string, error)

GetParameters fetches all of the parameters under a path into a map

func (*Impl) PutParameters

func (svc *Impl) PutParameters(path string, params map[string]string, overwrite bool) error

PutParameters saves all of the parameters from a map to a path

type SSMClient

type SSMClient interface {
	GetParametersByPathPages(getParametersByPathInput *ssm.GetParametersByPathInput, fn func(resp *ssm.GetParametersByPathOutput, lastPage bool) bool) error
	PutParameter(input *ssm.PutParameterInput) (*ssm.PutParameterOutput, error)
}

SSMClient abstracts out the single function used within the ssmiface

type Service

type Service interface {
	GetParameters(searchPath string) (map[string]string, error)
	PutParameters(path string, params map[string]string, overwrite bool) error
}

Service will abstract out calls to AWS

func New

func New() (Service, error)

New creates a new service

func NewFromClient

func NewFromClient(ssmClient SSMClient) (Service, error)

NewFromClient creates a new service from an implementation of the SSMClient

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL