insssm

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

README

SSM Package

This is a simple aws ssm packet wrapper.

Currently, we use env variables to disable ssm client initialization for local development and testing purposes.

Usage in Apps

package main

import (
	"fmt"
	"os"
	
	"github.com/useinsider/go-pkg/insssm"
)

func main() {
	_ = os.Setenv("ENV", "NOT-LOCAL")
	insssm.Init()
	
	value := insssm.Get("/SOME/SSM/KEY")
	fmt.Printf("value: %s", value)
}


Documentation

Index

Constants

This section is empty.

Variables

View Source
var ParameterStore *awsssm.ParameterStore

ParameterStore is the aws client for parameter store

Functions

func Get

func Get(key string) string

Get is the main function for ssm, it takes the key and returns the value. It's wrapped with cacheable function so if it already called and ttl is still valid, it will use the cached value to return instead of reaching the aws servers.

func Init

func Init()

Init If environment variable called "ENV" is set to value "LOCAL", Init function will not run.

Types

This section is empty.

Jump to

Keyboard shortcuts

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