acl

package
v0.0.0-...-b937e2b Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientSet

type ClientSet struct {
	SSM    *ssm.SSM
	Consul *consulapi.Client
	// contains filtered or unexported fields
}

ClientSet represents a collection of clients

func NewClientSet

func NewClientSet(i *ClientSetInput) (*ClientSet, error)

NewClientSet creates a new client collection

func (*ClientSet) Bootstrap

func (c *ClientSet) Bootstrap(consulTokenParam string) (string, error)

Bootstrap performs a Consul ACL bootstrap and saves the resulting token to an SSM parameter

func (*ClientSet) GetStringParameter

func (c *ClientSet) GetStringParameter(name string, failNotFound bool) (*string, error)

GetStringParameter reads a SSM parameter and returns a string

func (*ClientSet) PutStringParameter

func (c *ClientSet) PutStringParameter(name, value string) (err error)

PutStringParameter writes a SSM parameter as a string

func (*ClientSet) Sync

func (c *ClientSet) Sync(i *SyncInput) error

Sync syncronizes ACLS with AWS SSM

type ClientSetInput

type ClientSetInput struct {
	ConsulTokenParam string
	KMSKeyID         string
	Overwrite        bool
	Insecure         bool
}

ClientSetInput is used as input for the NewClientSet function

type SyncInput

type SyncInput struct {
	ACLDefinitionPrefix string
	ACLIDPrefix         string
	PageSize            int64
	OnlyIfConsulLeader  bool
}

SyncInput is the input for the Sync function

Jump to

Keyboard shortcuts

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