forked from winebarrel/gcredstash
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
182 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ | |
*.zip | ||
.DS_Store | ||
*.bak | ||
/site |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,62 @@ | ||
VERSION:=unknown | ||
NAME:=gcredstash | ||
|
||
all: gcredstash | ||
SOURCE:=$(wildcard internal/*.go internal/*/*.go cmd/*/*.go) | ||
DOCS:=$(wildcard docs/*.md mkdocs.yml) | ||
|
||
gcredstash: | ||
CGO_ENABLED=0 go build -v -trimpath -ldflags "-s -w -X github.com/kgaughan/gcredstash/internal.Version=$(VERSION)" -tags netgo -o $@ ./cmd/$@ | ||
.PHONY: build | ||
build: go.mod $(NAME) | ||
|
||
test: | ||
go test -cover -v ./... | ||
.PHONY: tidy | ||
tidy: go.mod fmt | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -rf gcredstash *.gz *.zip dist/ | ||
rm -rf $(NAME) dist site | ||
|
||
$(NAME): $(SOURCE) go.sum | ||
CGO_ENABLED=0 go build -v -tags netgo -trimpath -ldflags '-s -w' -o $@ ./cmd/$@ | ||
|
||
.PHONY: update | ||
update: | ||
go get -u ./... | ||
go mod tidy | ||
|
||
go.sum: go.mod | ||
go mod verify | ||
@touch go.sum | ||
|
||
go.mod: $(SOURCE) | ||
go mod tidy | ||
|
||
.PHONY: fmt | ||
fmt: | ||
go fmt ./... | ||
|
||
.PHONY: lint | ||
lint: | ||
go vet ./... | ||
|
||
mock: | ||
.PHONY: serve-docs | ||
serve-docs: .venv | ||
.venv/bin/mkdocs serve | ||
|
||
.PHONY: docs | ||
docs: .venv $(DOCS) | ||
.venv/bin/mkdocs build | ||
|
||
.venv: requirements.txt | ||
uv venv | ||
uv pip install -r requirements.txt | ||
|
||
%.txt: %.in | ||
uv pip compile $< > $@ | ||
|
||
.PHONY: tests | ||
tests: | ||
go test -cover -v ./... | ||
|
||
.PHONY: mocks | ||
mocks: | ||
go install go.uber.org/mock/[email protected] | ||
mockgen -package mockaws -destination internal/mockaws/dynamodbmock.go github.com/aws/aws-sdk-go/service/dynamodb/dynamodbiface DynamoDBAPI | ||
mockgen -package mockaws -destination internal/mockaws/kmsmock.go github.com/aws/aws-sdk-go/service/kms/kmsiface KMSAPI | ||
|
||
.PHONY: all test clean mock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Commands | ||
|
||
``` | ||
gcredstash manages credentials using AWS Key Management Service (KMS) and DynamoDB | ||
Usage: | ||
gcredstash [command] | ||
Available Commands: | ||
completion Generate the autocompletion script for the specified shell | ||
delete Delete a credential from the store | ||
get Get a credential from the store | ||
getall Get all credentials from the store | ||
help Help about any command | ||
list List credentials and their version | ||
put Put a credential into the store | ||
setup Setup the credential store | ||
template Parse a template file with credentials | ||
Flags: | ||
-h, --help help for gcredstash | ||
-t, --table string DynamoDB table to use for credential storage (default "credential-store") | ||
-v, --version version for gcredstash | ||
Use "gcredstash [command] --help" for more information about a command. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Hello. world! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
site_name: gcredstash | ||
repo_url: https://github.com/kgaughan/gcredstash/ | ||
theme: | ||
name: material | ||
|
||
markdown_extensions: | ||
admonition: {} | ||
attr_list: {} | ||
|
||
nav: | ||
- commands.md | ||
- configuration.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
mkdocs | ||
mkdocs-material | ||
mkdocs-awesome-pages-plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# This file was autogenerated by uv via the following command: | ||
# uv pip compile requirements.in | ||
babel==2.16.0 | ||
# via mkdocs-material | ||
bracex==2.5 | ||
# via wcmatch | ||
certifi==2024.8.30 | ||
# via requests | ||
charset-normalizer==3.3.2 | ||
# via requests | ||
click==8.1.7 | ||
# via mkdocs | ||
colorama==0.4.6 | ||
# via mkdocs-material | ||
ghp-import==2.1.0 | ||
# via mkdocs | ||
idna==3.10 | ||
# via requests | ||
jinja2==3.1.4 | ||
# via | ||
# mkdocs | ||
# mkdocs-material | ||
markdown==3.7 | ||
# via | ||
# mkdocs | ||
# mkdocs-material | ||
# pymdown-extensions | ||
markupsafe==2.1.5 | ||
# via | ||
# jinja2 | ||
# mkdocs | ||
mergedeep==1.3.4 | ||
# via | ||
# mkdocs | ||
# mkdocs-get-deps | ||
mkdocs==1.6.1 | ||
# via | ||
# -r requirements.in | ||
# mkdocs-awesome-pages-plugin | ||
# mkdocs-material | ||
mkdocs-awesome-pages-plugin==2.9.3 | ||
# via -r requirements.in | ||
mkdocs-get-deps==0.2.0 | ||
# via mkdocs | ||
mkdocs-material==9.5.36 | ||
# via -r requirements.in | ||
mkdocs-material-extensions==1.3.1 | ||
# via mkdocs-material | ||
natsort==8.4.0 | ||
# via mkdocs-awesome-pages-plugin | ||
packaging==24.1 | ||
# via mkdocs | ||
paginate==0.5.7 | ||
# via mkdocs-material | ||
pathspec==0.12.1 | ||
# via mkdocs | ||
platformdirs==4.3.6 | ||
# via mkdocs-get-deps | ||
pygments==2.18.0 | ||
# via mkdocs-material | ||
pymdown-extensions==10.9 | ||
# via mkdocs-material | ||
python-dateutil==2.9.0.post0 | ||
# via ghp-import | ||
pyyaml==6.0.2 | ||
# via | ||
# mkdocs | ||
# mkdocs-get-deps | ||
# pymdown-extensions | ||
# pyyaml-env-tag | ||
pyyaml-env-tag==0.1 | ||
# via mkdocs | ||
regex==2024.9.11 | ||
# via mkdocs-material | ||
requests==2.32.3 | ||
# via mkdocs-material | ||
six==1.16.0 | ||
# via python-dateutil | ||
urllib3==2.2.3 | ||
# via requests | ||
watchdog==5.0.2 | ||
# via mkdocs | ||
wcmatch==9.0 | ||
# via mkdocs-awesome-pages-plugin |