Skip to content

Commit

Permalink
chore: reorganizing imports
Browse files Browse the repository at this point in the history
  • Loading branch information
felangga committed Jul 14, 2024
1 parent db19e66 commit e5070be
Show file tree
Hide file tree
Showing 21 changed files with 35 additions and 33 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ https://github.com/user-attachments/assets/acc4be04-6be6-4743-ad30-ddfe1bcc229d
## Install
You can visit the [Release Page](https://github.com/felangga/chiko/releases), and select the version that you want to download, the architecture and the operating system that you are using.

### Homebrew
Currently `chiko` is not available on the `homebrew-core`, so you can install directly from our repository by using:
```
brew install felangga/chiko/chiko
```

## Features
- List all gRPC methods using server reflections
- Generate sample request payload
Expand Down
4 changes: 1 addition & 3 deletions cmd/chiko/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package main

import (
"chiko/pkg/ui"
)
import "github.com/felangga/chiko/pkg/ui"

func main() {
err := ui.NewUI().Run()
Expand Down
5 changes: 2 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module chiko
module github.com/felangga/chiko

go 1.22.5

Expand All @@ -17,8 +17,7 @@ require (
github.com/cncf/xds/go v0.0.0-20231109132714-523115ebc101 // indirect
github.com/envoyproxy/go-control-plane v0.11.1 // indirect
github.com/envoyproxy/protoc-gen-validate v1.0.2 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/lithammer/fuzzysearch v1.1.8 // indirect
github.com/lithammer/fuzzysearch v1.1.8
golang.org/x/net v0.22.0 // indirect
golang.org/x/sync v0.6.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 // indirect
Expand Down
4 changes: 0 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU=
github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/jhump/protoreflect v1.16.0 h1:54fZg+49widqXYQ0b+usAFHbMkBGR4PpXrsHc8+TBDg=
github.com/jhump/protoreflect v1.16.0/go.mod h1:oYPd7nPvcBw/5wlDfm/AVmU9zH9BgqGCI469pGxfj/8=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/lithammer/fuzzysearch v1.1.8 h1:/HIuJnjHuXS8bKaiTMeeDlW2/AyIWk2brx1V8LFgLN4=
github.com/lithammer/fuzzysearch v1.1.8/go.mod h1:IdqeyBClc3FFqSzYq/MXESsS4S0FsZ5ajtkr5xPLts4=
github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
Expand All @@ -57,8 +55,6 @@ github.com/rivo/uniseg v0.3.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUc
github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis=
github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/sahilm/fuzzy v0.1.1 h1:ceu5RHF8DGgoi+/dR5PsECjCDH1BE3Fnmpo7aVXOdRA=
github.com/sahilm/fuzzy v0.1.1/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
Expand Down
4 changes: 1 addition & 3 deletions pkg/controller/bookmark/bookmark.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package bookmark

import (
"chiko/pkg/entity"
)
import "github.com/felangga/chiko/pkg/entity"

type Bookmark struct {
Categories *[]entity.Category
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/bookmark/load_bookmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"os"

"chiko/pkg/entity"
"github.com/felangga/chiko/pkg/entity"
)

// LoadBookmarks is used to load bookmarks from bookmark file
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/bookmark/save_bookmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"os"

"chiko/pkg/entity"
"github.com/felangga/chiko/pkg/entity"
)

// SaveBookmark is used to save the bookmark object to file by encoding the object with JSON.
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/grpc/check_grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/jhump/protoreflect/grpcreflect"
reflectpb "google.golang.org/grpc/reflection/grpc_reflection_v1alpha"

"chiko/pkg/entity"
"github.com/felangga/chiko/pkg/entity"
)

// CheckGRPC will check if the server supports server reflection and list all available services and methods
Expand Down
3 changes: 2 additions & 1 deletion pkg/controller/grpc/grpc.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package grpc

import (
"chiko/pkg/entity"
"context"

"github.com/google/uuid"

"github.com/felangga/chiko/pkg/entity"
)

type GRPC struct {
Expand Down
4 changes: 2 additions & 2 deletions pkg/controller/grpc/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import (
"fmt"
"strings"

"chiko/pkg/entity"

"github.com/golang/protobuf/jsonpb"
"github.com/golang/protobuf/proto"
"github.com/jhump/protoreflect/desc"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"

"github.com/felangga/chiko/pkg/entity"
)

type handler struct {
Expand Down
4 changes: 2 additions & 2 deletions pkg/entity/session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package entity_test
import (
"testing"

"chiko/pkg/entity"

"github.com/google/go-cmp/cmp"

"github.com/felangga/chiko/pkg/entity"
)

func TestParseMetadata(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/ui/init_bookmark_menu.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/gdamore/tcell/v2"
"github.com/rivo/tview"

"chiko/pkg/entity"
"github.com/felangga/chiko/pkg/entity"
)

// InitBookmarkMenu initializes the bookmark sidebar menu
Expand Down
3 changes: 2 additions & 1 deletion pkg/ui/invoke_rpc.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package ui

import (
"chiko/pkg/entity"
"fmt"

"github.com/felangga/chiko/pkg/entity"
)

func (u *UI) InvokeRPC() {
Expand Down
3 changes: 2 additions & 1 deletion pkg/ui/log.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package ui

import (
"chiko/pkg/entity"
"fmt"
"time"

"github.com/felangga/chiko/pkg/entity"
)

// PrintLog is used to print a log message to the log window
Expand Down
2 changes: 1 addition & 1 deletion pkg/ui/save_bookmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/google/uuid"
"github.com/rivo/tview"

"chiko/pkg/entity"
"github.com/felangga/chiko/pkg/entity"
)

// ShowSaveToBookmarkModal used to open the save bookmark dialog to save the current payload to bookmark
Expand Down
3 changes: 2 additions & 1 deletion pkg/ui/show_authorization_modal.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package ui

import (
"chiko/pkg/entity"
"fmt"

"github.com/epiclabs-io/winman"
"github.com/gdamore/tcell/v2"
"github.com/rivo/tview"

"github.com/felangga/chiko/pkg/entity"
)

// ShowAuthorizationModal used to show the authorization modal dialog
Expand Down
2 changes: 1 addition & 1 deletion pkg/ui/show_bookmark_option_modal.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/google/uuid"
"github.com/rivo/tview"

"chiko/pkg/entity"
"github.com/felangga/chiko/pkg/entity"
)

// ShowBookmarkOptionsModal is used to show the bookmark options modal, to load, overwrite, or remove the bookmark
Expand Down
2 changes: 1 addition & 1 deletion pkg/ui/show_request_payload_modal.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/gdamore/tcell/v2"
"github.com/rivo/tview"

"chiko/pkg/entity"
"github.com/felangga/chiko/pkg/entity"
)

// ShowRequestPayloadModal is used to show the request payload modal dialog
Expand Down
2 changes: 1 addition & 1 deletion pkg/ui/show_set_request_method_modal.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/lithammer/fuzzysearch/fuzzy"
"github.com/rivo/tview"

"chiko/pkg/entity"
"github.com/felangga/chiko/pkg/entity"
)

// ShowSetRequestMethodModal is used to show the RPC method selection modal dialog
Expand Down
3 changes: 2 additions & 1 deletion pkg/ui/startup.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package ui

import (
"chiko/pkg/entity"
"fmt"

"github.com/rivo/tview"

"github.com/felangga/chiko/pkg/entity"
)

func (u *UI) startupSequence() {
Expand Down
6 changes: 3 additions & 3 deletions pkg/ui/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"github.com/epiclabs-io/winman"
"github.com/rivo/tview"

"chiko/pkg/controller/bookmark"
"chiko/pkg/controller/grpc"
"chiko/pkg/entity"
"github.com/felangga/chiko/pkg/controller/bookmark"
"github.com/felangga/chiko/pkg/controller/grpc"
"github.com/felangga/chiko/pkg/entity"
)

type ComponentLayout struct {
Expand Down

0 comments on commit e5070be

Please sign in to comment.