Skip to content

Commit

Permalink
sawsy v0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
danielcmessias committed Oct 27, 2022
1 parent 3e7eced commit fc75097
Show file tree
Hide file tree
Showing 86 changed files with 5,050 additions and 1,803 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: lint
on:
push:
pull_request:
branches:
- main

permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
pull-requests: read

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ^1

- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: golangci-lint command line arguments.
#args:
# Optional: show only new issues if it's a pull request. The default value is `false`.
only-new-issues: true
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lfq
sawsy
13 changes: 13 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
run:
tests: false
max-issues-per-linter: 0
max-same-issues: 0

linters:
enable:
- exportloopref
- goimports
- predeclared
- unconvert
- unparam
- whitespace
6 changes: 3 additions & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ before:
- go mod vendor

builds:
- binary: lfq
- binary: sawsy
goos:
- darwin
- linux
Expand All @@ -24,8 +24,8 @@ universal_binaries:

brews:
-
name: lfq
homepage: "https://github.com/danielcmessias/lfq"
name: sawsy
homepage: "https://github.com/danielcmessias/sawsy"
tap:
owner: danielcmessias
name: homebrew-tap
Expand Down
64 changes: 54 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,32 @@
# lfq (Lake Formation Query)
# sawsy

An AWS Lake Formation Dashboard for your Terminal.
<p>
<a href="https://github.com/danielcmessias/sawsy/releases"><img src="https://img.shields.io/github/release/danielcmessias/sawsy.svg" alt="Latest Release"></a>
<a href="https://github.com/danielcmessias/sawsy/actions"><img src="https://github.com/danielcmessias/sawsy/workflows/goreleaser/badge.svg" alt="Build Status"></a>
</p>

![lfq preview 1](./img/preview01.png)
![lfq preview 2](./img/preview02.png)
An AWS Console for your Terminal

More cool things to come (maybe).
*it's not just good, it's saucy!*


![RDS Instances](./img/01.png)
![Monitoring an RDS instance](./img/02.png)
![S3 Objects](./img/03.png)
![Glue Script](./img/04.png)

More cool things to come (maybe). Definitely need to add a GIF instead of a bunch of images here!

# Install

Brew:

```sh
brew tap danielcmessias/tap
brew install danielcmessias/tap/lfq
brew install danielcmessias/tap/sawsy
```

Or download a [binary release](https://github.com/danielcmessias/lfq/releases):
Or download a [binary release](https://github.com/danielcmessias/sawsy/releases):

Or build it yourself:

Expand All @@ -26,14 +36,48 @@ go build

# Usage

Make sure you have AWS credentials set. Press `?` to toggle help.
Make sure you have AWS credentials set. Press `?` to toggle help$.

To switch services press `s`. You can launch directly to a particular service like

```sh
sawsy rds
```

# AWS Services Supported

I've started with the barebones of services that are useful to me. It's pretty
fast to add new views that just list tabular data. Beyond that takes some more work.

| Services | Status |
|---|---|
| Glue | Partially implemented |
| IAM | Partially implemented |
| Lake Formation | Partially implemented. |
| Lambda | Bare bones only. |
| RDS | Partially implemented. |
| S3 | Partially implemented. |


# Issues

**Q: I don't see the fancy icons in the nav-bar**

**A:** You need a [font](https://www.nerdfonts.com/font-downloads) with icons and a terminal that supports it.

<details>
<summary>Want to just hide the icons?</summary>

Create a new file `touch ~/.sawsy.yml` and add the following config:

```yaml
theme:
showIcons: false
```
This is the only config available for now.
</details>
**Q: The layout is behaving weird**
Expand All @@ -45,11 +89,11 @@ Make sure you have AWS credentials set. Press `?` to toggle help.
**A:** Bad luck, no customization yet. In the meanwhile you can jump on the [Dracula](https://draculatheme.com/) bandwagon.
**Q: Anything else?**
**A:** It's a bug.
**A:** It's a bug. Issue reports welcome!
# Contributing
Yes please.
Yes please!
---
Expand Down
22 changes: 9 additions & 13 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
# Fixes

# SMALL
- Better error handling in client
- Cleanup client generally

- [x] Render current account (`sts:GetCallerId`) on the right of tabs view
- Highlight the selected column's cell more visibly (for linking out to resource links?)
- [x] Bundling the search box into the table component (optional to disable), so each table owns the search text
# Features

# MEDIUM

- Use termenv for colors
- Link out to useful pages on Enter press (e.g. open browser at s3 location)
- Show LF-Tags for table columns (probably on Schema tab)

# LARGE

- Cache results between sessions
- (S) Highlight the selected column's cell more visibly (for linking out to resource links?)
- (M) Custom theming
- (M) Link out to useful pages on Enter press (e.g. open browser at s3 location)
- (M) Lake Fomration: Show LF-Tags for table columns (probably on Schema tab)
- (L) Cache results between sessions?
38 changes: 38 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package config

import (
"os"
"path/filepath"

"gopkg.in/yaml.v3"
)

type Config struct {
Theme ThemeConfig `yaml:"theme"`
}

type ThemeConfig struct {
ShowIcons bool `yaml:"showIcons"`
}

func ReadConfig() (Config, error) {
config := getDefaultConfig()

homeDir, err := os.UserHomeDir()
if err != nil {
return config, err
}
path := filepath.Join(homeDir, ".sawsy.yml")

data, err := os.ReadFile(path)
if err != nil {
return config, err
}

err = yaml.Unmarshal(data, &config)
if err != nil {
return config, err
}

return config, nil
}
9 changes: 9 additions & 0 deletions config/default.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package config

func getDefaultConfig() Config {
return Config{
Theme: ThemeConfig{
ShowIcons: true,
},
}
}
Loading

0 comments on commit fc75097

Please sign in to comment.