Documentation
¶
Index ¶
- func NewSSMClient(ctx context.Context, retries int) (*ssm.Client, error)
- type DefaultSSMConnector
- type DestinationRule
- type DestinationType
- type DestinationTypeEnvOptions
- type DestinationTypeFileOptions
- type EnvExporter
- type Exporter
- type FileExporter
- type Parameter
- type ParameterLevel
- type ParameterRule
- type ParameterStore
- func (c ParameterStore) FindByName(name string) *Parameter
- func (c ParameterStore) Retrieve(path string, level ParameterLevel) ([]Parameter, error)
- func (c ParameterStore) SearchByPath(path string, recursive bool) []Parameter
- func (c *ParameterStore) Store(ctx context.Context, rules []ParameterRule) error
- type Rule
- type SSMConnector
- type SSMWrap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DefaultSSMConnector ¶
type DefaultSSMConnector struct{}
type DestinationRule ¶
type DestinationRule struct { Type DestinationType // To is address of destination. To string TypeEnvOptions *DestinationTypeEnvOptions TypeFileOptions *DestinationTypeFileOptions }
func (DestinationRule) String ¶
func (r DestinationRule) String() string
type DestinationType ¶
type DestinationType string
const ( DestinationTypeEnv DestinationType = "env" DestinationTypeFile DestinationType = "file" )
type DestinationTypeEnvOptions ¶
type DestinationTypeEnvOptions struct { // Prefix is a prefix for environment variable. // For example, if Prefix is PREFIX, then the environment variable name will be PREFIX_NAME. Prefix string // EntirePath is a flag to export entire path as environment variable name. // For example, if EntirePath is true and the path is /a/b/c, then the environment variable name will be A_B_C. // If EntirePath is false, then the environment variable name will be C. EntirePath bool }
func (DestinationTypeEnvOptions) String ¶
func (o DestinationTypeEnvOptions) String() string
type DestinationTypeFileOptions ¶
type DestinationTypeFileOptions struct { // Mode is a file mode of exported file. // If Mode is 0, then the default file mode is used defined in FileExporter. Mode fs.FileMode // Uid is a user id of exported file. // If Uid is 0, then the default user id is used defined in FileExporter. Uid int // Gid is a group id of exported file. // If Gid is 0, then the default group id is used defined in FileExporter. Gid int }
func (DestinationTypeFileOptions) String ¶
func (o DestinationTypeFileOptions) String() string
type EnvExporter ¶
type EnvExporter struct {
Name string
}
func NewEnvExporter ¶
func NewEnvExporter(name string) *EnvExporter
func (EnvExporter) Address ¶
func (e EnvExporter) Address() string
func (EnvExporter) Export ¶
func (e EnvExporter) Export(value string) error
type FileExporter ¶
func NewFileExporter ¶
func NewFileExporter(path string) *FileExporter
func (FileExporter) Address ¶
func (e FileExporter) Address() string
func (FileExporter) Export ¶
func (e FileExporter) Export(v string) error
type ParameterLevel ¶
type ParameterLevel int
const ( // ParameterLevelStrict means the path will be searched strictly. ParameterLevelStrict ParameterLevel = 0 // ParameterLevelUnder means the path will be searched just under the path. ParameterLevelUnder ParameterLevel = 1 // ParameterLevelAll means the path will be searched under the path recursively. ParameterLevelAll ParameterLevel = 2 )
type ParameterRule ¶
type ParameterRule struct { // Path is the target path on SSM Parameter Store. Path string // Level means how deep the path should be searched. Level ParameterLevel }
func NewParameterRule ¶
func NewParameterRule(path string) (*ParameterRule, error)
NewParameterRule creates a new ParameterRule. The path should be a valid path format. If the path ends with `/*`, the level will be `ParameterLevelUnder`. If the path ends with `/**/*`, the level will be `ParameterLevelAll`. Otherwise, the level will be `ParameterLevelStrict`.
func (ParameterRule) Equals ¶ added in v2.1.0
func (r1 ParameterRule) Equals(r2 ParameterRule) bool
func (ParameterRule) IsCovers ¶ added in v2.1.0
func (r1 ParameterRule) IsCovers(r2 ParameterRule) bool
func (ParameterRule) String ¶
func (r ParameterRule) String() string
type ParameterStore ¶
type ParameterStore struct { Parameters []Parameter // contains filtered or unexported fields }
func NewParameterStore ¶
func NewParameterStore(client *ssm.Client, conn SSMConnector) *ParameterStore
func (ParameterStore) FindByName ¶
func (c ParameterStore) FindByName(name string) *Parameter
func (ParameterStore) Retrieve ¶
func (c ParameterStore) Retrieve(path string, level ParameterLevel) ([]Parameter, error)
func (ParameterStore) SearchByPath ¶
func (c ParameterStore) SearchByPath(path string, recursive bool) []Parameter
func (*ParameterStore) Store ¶
func (c *ParameterStore) Store(ctx context.Context, rules []ParameterRule) error
type Rule ¶
type Rule struct { ParameterRule ParameterRule DestinationRule DestinationRule }
func (Rule) Execute ¶
func (r Rule) Execute(store ParameterStore) error
type SSMConnector ¶
type SSMConnector interface {
// contains filtered or unexported methods
}
Click to show internal directories.
Click to hide internal directories.