From 83f5052065bff3d9c3c82f6cd363d9c629072fb2 Mon Sep 17 00:00:00 2001
From: Ravi Suhag <suhag.ravi@gmail.com>
Date: Tue, 26 Nov 2024 16:05:38 -0600
Subject: [PATCH 1/2] choore: organise sub packages

---
 README.md                                     |  78 ++++-----
 {audit => auth/audit}/audit.go                |   0
 {audit => auth/audit}/audit_test.go           |  48 +++---
 {audit => auth/audit}/mocks/repository.go     |   3 +-
 {audit => auth/audit}/model.go                |   0
 .../audit}/repositories/dockertest_test.go    |   2 +-
 .../audit}/repositories/postgres.go           |   2 +-
 .../audit}/repositories/postgres_test.go      |   4 +-
 {oidc => auth/oidc}/_example/main.go          |   3 +-
 {oidc => auth/oidc}/cobra.go                  |   0
 {oidc => auth/oidc}/redirect.html             |   0
 {oidc => auth/oidc}/source_gsa.go             |   0
 {oidc => auth/oidc}/source_oidc.go            |   0
 {oidc => auth/oidc}/utils.go                  |   0
 {cmdx => cli/cmdx}/config.go                  |   0
 {cmdx => cli/cmdx}/docs.go                    |   0
 {cmdx => cli/cmdx}/help.go                    |   0
 {cmdx => cli/cmdx}/hook.go                    |   0
 {cmdx => cli/cmdx}/ref.go                     |   2 +-
 {cmdx => cli/cmdx}/shell.go                   |   0
 {cmdx => cli/cmdx}/topic.go                   |   0
 {cmdx => cli/cmdx}/util.go                    |   0
 {printer => cli/printer}/color.go             |   0
 {printer => cli/printer}/file.go              |   0
 {printer => cli/printer}/markdown.go          |   0
 {printer => cli/printer}/progress.go          |   0
 {printer => cli/printer}/spinner.go           |   2 +-
 {printer => cli/printer}/table.go             |   0
 {printer => cli/printer}/text.go              |   0
 {prompt => cli/prompt}/README.md              |   0
 {prompt => cli/prompt}/prompt.go              |   0
 {terminal => cli/terminal}/README.md          |   0
 {terminal => cli/terminal}/brew.go            |   0
 {terminal => cli/terminal}/browser.go         |   0
 {terminal => cli/terminal}/pager.go           |   0
 {terminal => cli/terminal}/term.go            |   0
 {version => cli/version}/README.md            |   0
 {version => cli/version}/release.go           |   0
 {version => cli/version}/release_test.go      |   0
 mux/README.md                                 |   8 -
 server/README.md                              | 155 ------------------
 server/config.go                              |   7 -
 server/example/main.go                        | 114 -------------
 server/grpc.go                                |  91 ----------
 server/gw.go                                  |  64 --------
 server/http.go                                |  82 ---------
 server/mux.go                                 | 127 --------------
 mux/_example/main.go => server/mux/README.md  |   9 +
 {mux => server/mux}/mux.go                    |   0
 {mux => server/mux}/option.go                 |   0
 {mux => server/mux}/serve_target.go           |   0
 {spa => server/spa}/README.md                 |   0
 {spa => server/spa}/router.go                 |   0
 {spa => server/spa}/spa.go                    |   0
 server/sys.go                                 |  19 ---
 .../dockertestx}/README.md                    |   0
 .../configs/cortex/single_process_cortex.yaml |   0
 .../configs/nginx/cortex_nginx.conf           |   0
 .../dockertestx}/cortex.go                    |   0
 .../dockertestx}/dockertestx.go               |   0
 {dockertestx => testing/dockertestx}/minio.go |   0
 .../dockertestx}/minio_migrate.go             |   0
 {dockertestx => testing/dockertestx}/nginx.go |   0
 .../dockertestx}/postgres.go                  |   0
 .../dockertestx}/spicedb.go                   |   0
 .../dockertestx}/spicedb_migrate.go           |   0
 66 files changed, 77 insertions(+), 743 deletions(-)
 rename {audit => auth/audit}/audit.go (100%)
 rename {audit => auth/audit}/audit_test.go (73%)
 rename {audit => auth/audit}/mocks/repository.go (95%)
 rename {audit => auth/audit}/model.go (100%)
 rename {audit => auth/audit}/repositories/dockertest_test.go (98%)
 rename {audit => auth/audit}/repositories/postgres.go (98%)
 rename {audit => auth/audit}/repositories/postgres_test.go (96%)
 rename {oidc => auth/oidc}/_example/main.go (95%)
 rename {oidc => auth/oidc}/cobra.go (100%)
 rename {oidc => auth/oidc}/redirect.html (100%)
 rename {oidc => auth/oidc}/source_gsa.go (100%)
 rename {oidc => auth/oidc}/source_oidc.go (100%)
 rename {oidc => auth/oidc}/utils.go (100%)
 rename {cmdx => cli/cmdx}/config.go (100%)
 rename {cmdx => cli/cmdx}/docs.go (100%)
 rename {cmdx => cli/cmdx}/help.go (100%)
 rename {cmdx => cli/cmdx}/hook.go (100%)
 rename {cmdx => cli/cmdx}/ref.go (97%)
 rename {cmdx => cli/cmdx}/shell.go (100%)
 rename {cmdx => cli/cmdx}/topic.go (100%)
 rename {cmdx => cli/cmdx}/util.go (100%)
 rename {printer => cli/printer}/color.go (100%)
 rename {printer => cli/printer}/file.go (100%)
 rename {printer => cli/printer}/markdown.go (100%)
 rename {printer => cli/printer}/progress.go (100%)
 rename {printer => cli/printer}/spinner.go (92%)
 rename {printer => cli/printer}/table.go (100%)
 rename {printer => cli/printer}/text.go (100%)
 rename {prompt => cli/prompt}/README.md (100%)
 rename {prompt => cli/prompt}/prompt.go (100%)
 rename {terminal => cli/terminal}/README.md (100%)
 rename {terminal => cli/terminal}/brew.go (100%)
 rename {terminal => cli/terminal}/browser.go (100%)
 rename {terminal => cli/terminal}/pager.go (100%)
 rename {terminal => cli/terminal}/term.go (100%)
 rename {version => cli/version}/README.md (100%)
 rename {version => cli/version}/release.go (100%)
 rename {version => cli/version}/release_test.go (100%)
 delete mode 100644 mux/README.md
 delete mode 100644 server/README.md
 delete mode 100644 server/config.go
 delete mode 100644 server/example/main.go
 delete mode 100644 server/grpc.go
 delete mode 100644 server/gw.go
 delete mode 100644 server/http.go
 delete mode 100644 server/mux.go
 rename mux/_example/main.go => server/mux/README.md (90%)
 rename {mux => server/mux}/mux.go (100%)
 rename {mux => server/mux}/option.go (100%)
 rename {mux => server/mux}/serve_target.go (100%)
 rename {spa => server/spa}/README.md (100%)
 rename {spa => server/spa}/router.go (100%)
 rename {spa => server/spa}/spa.go (100%)
 delete mode 100644 server/sys.go
 rename {dockertestx => testing/dockertestx}/README.md (100%)
 rename {dockertestx => testing/dockertestx}/configs/cortex/single_process_cortex.yaml (100%)
 rename {dockertestx => testing/dockertestx}/configs/nginx/cortex_nginx.conf (100%)
 rename {dockertestx => testing/dockertestx}/cortex.go (100%)
 rename {dockertestx => testing/dockertestx}/dockertestx.go (100%)
 rename {dockertestx => testing/dockertestx}/minio.go (100%)
 rename {dockertestx => testing/dockertestx}/minio_migrate.go (100%)
 rename {dockertestx => testing/dockertestx}/nginx.go (100%)
 rename {dockertestx => testing/dockertestx}/postgres.go (100%)
 rename {dockertestx => testing/dockertestx}/spicedb.go (100%)
 rename {dockertestx => testing/dockertestx}/spicedb_migrate.go (100%)

diff --git a/README.md b/README.md
index 39b9ca0..72a4928 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,10 @@
 # salt
 
 [![GoDoc reference](https://img.shields.io/badge/godoc-reference-5272B4.svg)](https://godoc.org/github.com/raystack/salt)
-![test workflow](https://github.com/raystack/salt/actions/workflows/verify.yaml/badge.svg)
+![test workflow](https://github.com/raystack/salt/actions/workflows/test.yaml/badge.svg)
 [![Go Report Card](https://goreportcard.com/badge/github.com/raystack/salt)](https://goreportcard.com/report/github.com/raystack/salt)
 
-Shared libraries used in the Raystack ecosystem. Use at your own risk. Breaking changes should be anticipated.
+Salt is a Golang utility library offering a variety of packages to simplify and enhance application development. It provides modular and reusable components for common tasks, including configuration management, CLI utilities, authentication, logging, and more.
 
 ## Installation
 
@@ -16,56 +16,50 @@ go get github.com/raystack/salt
 
 ## Pacakages
 
-### Audit
+### Configuration and Environment
+- **`config`**  
+  Utilities for managing application configurations using environment variables, files, or defaults.
 
-Package for adding audit events in your applications.
+### CLI Utilities
+- **`cli/cmdx`**  
+  Command execution and management tools.
 
-### Cmdx
+- **`cli/printer`**  
+  Utilities for formatting and printing output to the terminal.
 
-Cobra based cli helper which allows adding command groups, provides custom help and usage functions.
+- **`cli/prompt`**  
+  Interactive CLI prompts for user input.
 
-```
-var cmd = &cli.Command{
-	Use:   "exec <command> <subcommand> [flags]",
-	SilenceUsage:  true,
-	SilenceErrors: true,
-	Annotations: map[string]string{
-		"group": "core",
-		"help:learn": "Learn about the project",
-	},
-}
-
-cmdx.SetHelp(cmd)
-cmd.AddCommand(cmdx.SetCompletionCmd("exec"))
-cmd.AddCommand(cmdx.SetHelpTopicCmd("environment", envHelp))
-cmd.AddCommand(cmdx.SetHelpTopicCmd("auth", authHelp))
-cmd.AddCommand(cmdx.SetRefCmd(cmd))
-```
-
-### Config
-
-Viper abstractions which provides functions for loading config files for the application.
-
-### DB
-
-Postgres based database abstractions for creating a client and running migrations.
-
-### Log
+- **`cli/terminal`**  
+  Terminal utilities for colors, cursor management, and formatting.
 
-Logger for easy application loggging.
+- **`cli/version`**  
+  Utilities for displaying and managing CLI tool versions.
 
-### Printer
+### Authentication and Security
+- **`auth/oidc`**  
+  Helpers for integrating OpenID Connect authentication flows.
 
-Command line printer for CLI based applications.
+- **`auth/audit`**  
+  Auditing tools for tracking security events and compliance.
 
-### Server
+### Server and Infrastructure
+- **`server`**  
+  Utilities for setting up and managing HTTP or RPC servers.
 
-GRPC based server abstraction.
+- **`db`**  
+  Helpers for database connections, migrations, and query execution.
 
-### Term
+- **`telemetry`**  
+  Observability tools for capturing application metrics and traces.
 
-Helper functions for working with terminal.
+### Development and Testing
+- **`dockertestx`**  
+  Tools for creating and managing Docker-based testing environments.
 
-### Version
+### Utilities
+- **`log`**  
+  Simplified logging utilities for structured and unstructured log messages.
 
-Helper functions for fetching github latest and outdated releases.
+- **`utils`**  
+  General-purpose utility functions for common programming tasks.
diff --git a/audit/audit.go b/auth/audit/audit.go
similarity index 100%
rename from audit/audit.go
rename to auth/audit/audit.go
diff --git a/audit/audit_test.go b/auth/audit/audit_test.go
similarity index 73%
rename from audit/audit_test.go
rename to auth/audit/audit_test.go
index d6bcdcf..7519c62 100644
--- a/audit/audit_test.go
+++ b/auth/audit/audit_test.go
@@ -3,11 +3,11 @@ package audit_test
 import (
 	"context"
 	"errors"
+	audit2 "github.com/raystack/salt/auth/audit"
+	"github.com/raystack/salt/auth/audit/mocks"
 	"testing"
 	"time"
 
-	"github.com/raystack/salt/audit"
-	"github.com/raystack/salt/audit/mocks"
 	"github.com/stretchr/testify/mock"
 	"github.com/stretchr/testify/suite"
 )
@@ -18,24 +18,24 @@ type AuditTestSuite struct {
 	now time.Time
 
 	mockRepository *mocks.Repository
-	service        *audit.Service
+	service        *audit2.Service
 }
 
 func (s *AuditTestSuite) setupTest() {
 	s.mockRepository = new(mocks.Repository)
-	s.service = audit.New(
-		audit.WithMetadataExtractor(func(context.Context) map[string]interface{} {
+	s.service = audit2.New(
+		audit2.WithMetadataExtractor(func(context.Context) map[string]interface{} {
 			return map[string]interface{}{
 				"trace_id":    "test-trace-id",
 				"app_name":    "guardian_test",
 				"app_version": 1,
 			}
 		}),
-		audit.WithRepository(s.mockRepository),
+		audit2.WithRepository(s.mockRepository),
 	)
 
 	s.now = time.Now()
-	audit.TimeNow = func() time.Time {
+	audit2.TimeNow = func() time.Time {
 		return s.now
 	}
 }
@@ -48,7 +48,7 @@ func (s *AuditTestSuite) TestLog() {
 	s.Run("should insert to repository", func() {
 		s.setupTest()
 
-		s.mockRepository.On("Insert", mock.Anything, &audit.Log{
+		s.mockRepository.On("Insert", mock.Anything, &audit2.Log{
 			Timestamp: s.now,
 			Action:    "action",
 			Actor:     "user@example.com",
@@ -61,7 +61,7 @@ func (s *AuditTestSuite) TestLog() {
 		}).Return(nil)
 
 		ctx := context.Background()
-		ctx = audit.WithActor(ctx, "user@example.com")
+		ctx = audit2.WithActor(ctx, "user@example.com")
 		err := s.service.Log(ctx, "action", map[string]interface{}{"foo": "bar"})
 		s.NoError(err)
 	})
@@ -69,15 +69,15 @@ func (s *AuditTestSuite) TestLog() {
 	s.Run("actor extractor", func() {
 		s.Run("should use actor extractor if option given", func() {
 			expectedActor := "test-actor"
-			s.service = audit.New(
-				audit.WithActorExtractor(func(ctx context.Context) (string, error) {
+			s.service = audit2.New(
+				audit2.WithActorExtractor(func(ctx context.Context) (string, error) {
 					return expectedActor, nil
 				}),
-				audit.WithRepository(s.mockRepository),
+				audit2.WithRepository(s.mockRepository),
 			)
 
 			s.mockRepository.On("Insert", mock.Anything, mock.Anything).Run(func(args mock.Arguments) {
-				log := args.Get(1).(*audit.Log)
+				log := args.Get(1).(*audit2.Log)
 				s.Equal(expectedActor, log.Actor)
 			}).Return(nil).Once()
 
@@ -87,8 +87,8 @@ func (s *AuditTestSuite) TestLog() {
 
 		s.Run("should return error if extractor returns error", func() {
 			expectedError := errors.New("test error")
-			s.service = audit.New(
-				audit.WithActorExtractor(func(ctx context.Context) (string, error) {
+			s.service = audit2.New(
+				audit2.WithActorExtractor(func(ctx context.Context) (string, error) {
 					return "", expectedError
 				}),
 			)
@@ -100,18 +100,18 @@ func (s *AuditTestSuite) TestLog() {
 
 	s.Run("metadata", func() {
 		s.Run("should pass empty trace id if extractor not found", func() {
-			s.service = audit.New(
-				audit.WithMetadataExtractor(func(ctx context.Context) map[string]interface{} {
+			s.service = audit2.New(
+				audit2.WithMetadataExtractor(func(ctx context.Context) map[string]interface{} {
 					return map[string]interface{}{
 						"app_name":    "guardian_test",
 						"app_version": 1,
 					}
 				}),
-				audit.WithRepository(s.mockRepository),
+				audit2.WithRepository(s.mockRepository),
 			)
 
 			s.mockRepository.On("Insert", mock.Anything, mock.Anything).Run(func(args mock.Arguments) {
-				l := args.Get(1).(*audit.Log)
+				l := args.Get(1).(*audit2.Log)
 				s.IsType(map[string]interface{}{}, l.Metadata)
 
 				md := l.Metadata.(map[string]interface{})
@@ -125,13 +125,13 @@ func (s *AuditTestSuite) TestLog() {
 		})
 
 		s.Run("should append new metadata to existing one", func() {
-			s.service = audit.New(
-				audit.WithMetadataExtractor(func(ctx context.Context) map[string]interface{} {
+			s.service = audit2.New(
+				audit2.WithMetadataExtractor(func(ctx context.Context) map[string]interface{} {
 					return map[string]interface{}{
 						"existing": "foobar",
 					}
 				}),
-				audit.WithRepository(s.mockRepository),
+				audit2.WithRepository(s.mockRepository),
 			)
 
 			expectedMetadata := map[string]interface{}{
@@ -139,11 +139,11 @@ func (s *AuditTestSuite) TestLog() {
 				"new":      "foobar",
 			}
 			s.mockRepository.On("Insert", mock.Anything, mock.Anything).Run(func(args mock.Arguments) {
-				log := args.Get(1).(*audit.Log)
+				log := args.Get(1).(*audit2.Log)
 				s.Equal(expectedMetadata, log.Metadata)
 			}).Return(nil).Once()
 
-			ctx, err := audit.WithMetadata(context.Background(), map[string]interface{}{
+			ctx, err := audit2.WithMetadata(context.Background(), map[string]interface{}{
 				"new": "foobar",
 			})
 			s.Require().NoError(err)
diff --git a/audit/mocks/repository.go b/auth/audit/mocks/repository.go
similarity index 95%
rename from audit/mocks/repository.go
rename to auth/audit/mocks/repository.go
index 3e71557..b8f168b 100644
--- a/audit/mocks/repository.go
+++ b/auth/audit/mocks/repository.go
@@ -4,8 +4,7 @@ package mocks
 
 import (
 	context "context"
-
-	audit "github.com/raystack/salt/audit"
+	"github.com/raystack/salt/auth/audit"
 
 	mock "github.com/stretchr/testify/mock"
 )
diff --git a/audit/model.go b/auth/audit/model.go
similarity index 100%
rename from audit/model.go
rename to auth/audit/model.go
diff --git a/audit/repositories/dockertest_test.go b/auth/audit/repositories/dockertest_test.go
similarity index 98%
rename from audit/repositories/dockertest_test.go
rename to auth/audit/repositories/dockertest_test.go
index f1a2008..4190400 100644
--- a/audit/repositories/dockertest_test.go
+++ b/auth/audit/repositories/dockertest_test.go
@@ -4,12 +4,12 @@ import (
 	"context"
 	"database/sql"
 	"fmt"
+	"github.com/raystack/salt/auth/audit/repositories"
 	"time"
 
 	_ "github.com/lib/pq"
 	"github.com/ory/dockertest/v3"
 	"github.com/ory/dockertest/v3/docker"
-	"github.com/raystack/salt/audit/repositories"
 	"github.com/raystack/salt/log"
 )
 
diff --git a/audit/repositories/postgres.go b/auth/audit/repositories/postgres.go
similarity index 98%
rename from audit/repositories/postgres.go
rename to auth/audit/repositories/postgres.go
index 1d448be..3b4dc85 100644
--- a/audit/repositories/postgres.go
+++ b/auth/audit/repositories/postgres.go
@@ -5,10 +5,10 @@ import (
 	"database/sql"
 	"encoding/json"
 	"fmt"
+	"github.com/raystack/salt/auth/audit"
 	"time"
 
 	"github.com/jmoiron/sqlx/types"
-	"github.com/raystack/salt/audit"
 )
 
 type AuditModel struct {
diff --git a/audit/repositories/postgres_test.go b/auth/audit/repositories/postgres_test.go
similarity index 96%
rename from audit/repositories/postgres_test.go
rename to auth/audit/repositories/postgres_test.go
index 3606b90..e2a81f9 100644
--- a/audit/repositories/postgres_test.go
+++ b/auth/audit/repositories/postgres_test.go
@@ -2,14 +2,14 @@ package repositories_test
 
 import (
 	"context"
+	"github.com/raystack/salt/auth/audit"
+	"github.com/raystack/salt/auth/audit/repositories"
 	"testing"
 	"time"
 
 	"github.com/google/go-cmp/cmp"
 	"github.com/google/go-cmp/cmp/cmpopts"
 	"github.com/jmoiron/sqlx/types"
-	"github.com/raystack/salt/audit"
-	"github.com/raystack/salt/audit/repositories"
 	"github.com/raystack/salt/log"
 	"github.com/stretchr/testify/suite"
 )
diff --git a/oidc/_example/main.go b/auth/oidc/_example/main.go
similarity index 95%
rename from oidc/_example/main.go
rename to auth/oidc/_example/main.go
index 247fb37..8ebcf35 100644
--- a/oidc/_example/main.go
+++ b/auth/oidc/_example/main.go
@@ -2,14 +2,13 @@ package main
 
 import (
 	"encoding/json"
+	"github.com/raystack/salt/auth/oidc"
 	"log"
 	"os"
 	"strings"
 
 	"golang.org/x/oauth2"
 	"golang.org/x/oauth2/google"
-
-	"github.com/raystack/salt/oidc"
 )
 
 func main() {
diff --git a/oidc/cobra.go b/auth/oidc/cobra.go
similarity index 100%
rename from oidc/cobra.go
rename to auth/oidc/cobra.go
diff --git a/oidc/redirect.html b/auth/oidc/redirect.html
similarity index 100%
rename from oidc/redirect.html
rename to auth/oidc/redirect.html
diff --git a/oidc/source_gsa.go b/auth/oidc/source_gsa.go
similarity index 100%
rename from oidc/source_gsa.go
rename to auth/oidc/source_gsa.go
diff --git a/oidc/source_oidc.go b/auth/oidc/source_oidc.go
similarity index 100%
rename from oidc/source_oidc.go
rename to auth/oidc/source_oidc.go
diff --git a/oidc/utils.go b/auth/oidc/utils.go
similarity index 100%
rename from oidc/utils.go
rename to auth/oidc/utils.go
diff --git a/cmdx/config.go b/cli/cmdx/config.go
similarity index 100%
rename from cmdx/config.go
rename to cli/cmdx/config.go
diff --git a/cmdx/docs.go b/cli/cmdx/docs.go
similarity index 100%
rename from cmdx/docs.go
rename to cli/cmdx/docs.go
diff --git a/cmdx/help.go b/cli/cmdx/help.go
similarity index 100%
rename from cmdx/help.go
rename to cli/cmdx/help.go
diff --git a/cmdx/hook.go b/cli/cmdx/hook.go
similarity index 100%
rename from cmdx/hook.go
rename to cli/cmdx/hook.go
diff --git a/cmdx/ref.go b/cli/cmdx/ref.go
similarity index 97%
rename from cmdx/ref.go
rename to cli/cmdx/ref.go
index db91009..47f1409 100644
--- a/cmdx/ref.go
+++ b/cli/cmdx/ref.go
@@ -3,10 +3,10 @@ package cmdx
 import (
 	"bytes"
 	"fmt"
+	"github.com/raystack/salt/cli/printer"
 	"io"
 	"strings"
 
-	"github.com/raystack/salt/printer"
 	"github.com/spf13/cobra"
 )
 
diff --git a/cmdx/shell.go b/cli/cmdx/shell.go
similarity index 100%
rename from cmdx/shell.go
rename to cli/cmdx/shell.go
diff --git a/cmdx/topic.go b/cli/cmdx/topic.go
similarity index 100%
rename from cmdx/topic.go
rename to cli/cmdx/topic.go
diff --git a/cmdx/util.go b/cli/cmdx/util.go
similarity index 100%
rename from cmdx/util.go
rename to cli/cmdx/util.go
diff --git a/printer/color.go b/cli/printer/color.go
similarity index 100%
rename from printer/color.go
rename to cli/printer/color.go
diff --git a/printer/file.go b/cli/printer/file.go
similarity index 100%
rename from printer/file.go
rename to cli/printer/file.go
diff --git a/printer/markdown.go b/cli/printer/markdown.go
similarity index 100%
rename from printer/markdown.go
rename to cli/printer/markdown.go
diff --git a/printer/progress.go b/cli/printer/progress.go
similarity index 100%
rename from printer/progress.go
rename to cli/printer/progress.go
diff --git a/printer/spinner.go b/cli/printer/spinner.go
similarity index 92%
rename from printer/spinner.go
rename to cli/printer/spinner.go
index 342abc4..8d3d639 100644
--- a/printer/spinner.go
+++ b/cli/printer/spinner.go
@@ -1,10 +1,10 @@
 package printer
 
 import (
+	"github.com/raystack/salt/cli/terminal"
 	"time"
 
 	"github.com/briandowns/spinner"
-	"github.com/raystack/salt/terminal"
 )
 
 type Indicator struct {
diff --git a/printer/table.go b/cli/printer/table.go
similarity index 100%
rename from printer/table.go
rename to cli/printer/table.go
diff --git a/printer/text.go b/cli/printer/text.go
similarity index 100%
rename from printer/text.go
rename to cli/printer/text.go
diff --git a/prompt/README.md b/cli/prompt/README.md
similarity index 100%
rename from prompt/README.md
rename to cli/prompt/README.md
diff --git a/prompt/prompt.go b/cli/prompt/prompt.go
similarity index 100%
rename from prompt/prompt.go
rename to cli/prompt/prompt.go
diff --git a/terminal/README.md b/cli/terminal/README.md
similarity index 100%
rename from terminal/README.md
rename to cli/terminal/README.md
diff --git a/terminal/brew.go b/cli/terminal/brew.go
similarity index 100%
rename from terminal/brew.go
rename to cli/terminal/brew.go
diff --git a/terminal/browser.go b/cli/terminal/browser.go
similarity index 100%
rename from terminal/browser.go
rename to cli/terminal/browser.go
diff --git a/terminal/pager.go b/cli/terminal/pager.go
similarity index 100%
rename from terminal/pager.go
rename to cli/terminal/pager.go
diff --git a/terminal/term.go b/cli/terminal/term.go
similarity index 100%
rename from terminal/term.go
rename to cli/terminal/term.go
diff --git a/version/README.md b/cli/version/README.md
similarity index 100%
rename from version/README.md
rename to cli/version/README.md
diff --git a/version/release.go b/cli/version/release.go
similarity index 100%
rename from version/release.go
rename to cli/version/release.go
diff --git a/version/release_test.go b/cli/version/release_test.go
similarity index 100%
rename from version/release_test.go
rename to cli/version/release_test.go
diff --git a/mux/README.md b/mux/README.md
deleted file mode 100644
index 368fae7..0000000
--- a/mux/README.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# Mux
-
-`mux` package provides helpers for starting multiple servers. HTTP and gRPC
-servers are supported currently.
-
-## Usage
-
-Refer [\_example/](./_example/main.go) for usage reference.
diff --git a/server/README.md b/server/README.md
deleted file mode 100644
index 443653f..0000000
--- a/server/README.md
+++ /dev/null
@@ -1,155 +0,0 @@
-# server
-
-server package helps in setting up grpc server, http server or a mux server that runs both http and grpc on same port on a host
-It exposes multiple options to configure each of the servers.
-
-## Usage
-
-### HTTP server
-
-```go
-    // context to be Done when SIGINT or SIGTERM is received
-	ctx, cancelFunc := context.WithCancel(server.HandleSignals(context.Background()))
-	defer cancelFunc()
-
-    // create server.HTTPServer
-	s, err := server.NewHTTP(server.Config{
-		Port: httpPort,
-	})
-	if err != nil {
-		panic(err)
-	}
-
-    // add a handler
-	s.RegisterHandler("/ping", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
-		fmt.Fprintf(w, "pong")
-	}))
-
-    // start serving
-	go s.Serve()
-    // wait for ctx context to be set done, by SIGINT or SIGTERM
-	<-ctx.Done()
-
-    // set a timer for graceful shutdown, if expired will force kill the server
-	shutdownCtx, shutdownCancel := context.WithTimeout(context.Background(), time.Second*10)
-	defer shutdownCancel()
-
-	s.Shutdown(shutdownCtx)
-```
-
-### GRPC server
-
-```go
-    // grpc middlewares
-    var GRPCMiddlewaresInterceptor = grpc.UnaryInterceptor(grpc_middleware.ChainUnaryServer(
-	    grpc_recovery.UnaryServerInterceptor(),
-	    grpc_ctxtags.UnaryServerInterceptor(),
-	    grpc_prometheus.UnaryServerInterceptor,
-	    grpc_zap.UnaryServerInterceptor(zap.NewExample()),
-    ))
-
-    // context to be Done when SIGINT or SIGTERM is received
-	ctx, cancelFunc := context.WithCancel(server.HandleSignals(context.Background()))
-	defer cancelFunc()
-
-    // create server.GRPCServer with middlewares
-	s, err := server.NewGRPC(server.Config{
-		Port: grpcPort,
-	}, server.WithGRPCServerOptions(GRPCMiddlewaresInterceptor))
-	if err != nil {
-		panic(err)
-	}
-
-    // register a grpc service desc and server implementation instance
-	s.RegisterService(&commonv1.CommonService_ServiceDesc,
-		common.New(Server),
-	)
-
-    // start serving
-	go s.Serve()
-    // wait for ctx context to be set done, by SIGINT or SIGTERM
-	<-ctx.Done()
-
-    // set a timer for graceful shutdown, if expired will force kill the server
-	shutdownCtx, shutdownCancel := context.WithTimeout(context.Background(), time.Second*10)
-	defer shutdownCancel()
-
-	s.Shutdown(shutdownCtx)
-```
-
-### GRPC gateway
-
-`GRPCGateway` can be used to add GRPC Gateway generated proxy handlers to `HTTPServer`
-
-```go
-    gw, err := server.NewGateway("", grpcClientPort)
-	if err != nil {
-		panic(err)
-	}
-    // Use the grpc gateway generated function to register http handlers
-	gw.RegisterHandler(ctx, commonv1.RegisterCommonServiceHandlerFromEndpoint)
-
-    // set gateway on HTTPServer with /api prefix
-	s.SetGateway("/api", gw)
-```
-
-### Mux Server
-
-`MuxServer` can be used to run GRPC and HTTP servers on same port on a host. Internally it uses [cmux](https://github.com/soheilhy/cmux) to route requests to specific server
-
-```go
-    // grpc middlewares
-    var GRPCMiddlewaresInterceptor = grpc.UnaryInterceptor(grpc_middleware.ChainUnaryServer(
-	    grpc_recovery.UnaryServerInterceptor(),
-	    grpc_ctxtags.UnaryServerInterceptor(),
-	    grpc_prometheus.UnaryServerInterceptor,
-	    grpc_zap.UnaryServerInterceptor(zap.NewExample()),
-    ))
-
-    // context to be Done when SIGINT or SIGTERM is received
-	ctx, cancelFunc := context.WithCancel(server.HandleSignals(context.Background()))
-	defer cancelFunc()
-
-    // create server.MuxServer with grpc middlewares
-	s, err := server.NewMux(server.Config{
-		Port: muxPort,
-	}, server.WithMuxGRPCServerOptions(GRPCMiddlewaresInterceptor))
-	if err != nil {
-		panic(err)
-	}
-
-    // use same port for grpc-gateway grpc client to proxy requests to
-	grpcClientPort := muxPort
-    // create, set handlers and set gateway on MuxServer
-	gw, err := server.NewGateway("", grpcClientPort)
-	if err != nil {
-		panic(err)
-	}
-	gw.RegisterHandler(ctx, commonv1.RegisterCommonServiceHandlerFromEndpoint)
-	s.SetGateway("/api", gw)
-
-    // add additional http handlers on MuxServer
-	s.RegisterHandler("/ping", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
-		fmt.Fprintf(w, "pong")
-	}))
-
-    // register grpc service on MuxServer
-	s.RegisterService(&commonv1.CommonService_ServiceDesc,
-		common.New(Server),
-	)
-
-    // start serving
-	go s.Serve()
-    // wait for ctx context to be set done, by SIGINT or SIGTERM
-	<-ctx.Done()
-	// clean anything that needs to be closed etc like common server implementation etc
-    // set a timer for graceful shutdown, if expired will force kill the server
-	shutdownCtx, shutdownCancel := context.WithTimeout(context.Background(), time.Second*10)
-	defer shutdownCancel()
-
-	s.Shutdown(shutdownCtx)
-```
-
-### Example
-
-For usage example have a look at this - [example](example/main.go).
diff --git a/server/config.go b/server/config.go
deleted file mode 100644
index dea9066..0000000
--- a/server/config.go
+++ /dev/null
@@ -1,7 +0,0 @@
-package server
-
-// Config to set the host and port for different servers
-type Config struct {
-	Port int
-	Host string
-}
diff --git a/server/example/main.go b/server/example/main.go
deleted file mode 100644
index c073fac..0000000
--- a/server/example/main.go
+++ /dev/null
@@ -1,114 +0,0 @@
-package main
-
-import (
-	"context"
-	"fmt"
-	"net/http"
-	"time"
-
-	grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
-	grpc_zap "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap"
-	grpc_recovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery"
-	grpc_ctxtags "github.com/grpc-ecosystem/go-grpc-middleware/tags"
-	grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
-	"github.com/raystack/salt/server"
-	"go.uber.org/zap"
-	"google.golang.org/grpc"
-)
-
-var GRPCMiddlewaresInterceptor = grpc.UnaryInterceptor(grpc_middleware.ChainUnaryServer(
-	grpc_recovery.UnaryServerInterceptor(),
-	grpc_ctxtags.UnaryServerInterceptor(),
-	grpc_prometheus.UnaryServerInterceptor,
-	grpc_zap.UnaryServerInterceptor(zap.NewExample()),
-))
-
-func main() {
-	grpcPort := 8000
-	httpPort := 8080
-	muxPort := 9000
-	gatewayClientPort := grpcPort
-	go grpcS(grpcPort)
-	go httpS(httpPort, gatewayClientPort)
-	muxS(muxPort)
-}
-
-func httpS(httpPort, gatewayClientPort int) {
-	ctx, cancelFunc := context.WithCancel(server.HandleSignals(context.Background()))
-	defer cancelFunc()
-
-	s, err := server.NewHTTP(server.Config{
-		Port: httpPort,
-	})
-	if err != nil {
-		panic(err)
-	}
-
-	gw, err := server.NewGateway("", gatewayClientPort)
-	if err != nil {
-		panic(err)
-	}
-
-	s.SetGateway("/api", gw)
-	s.RegisterHandler("/ping", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
-		fmt.Fprintf(w, "pong")
-	}))
-
-	go s.Serve()
-	<-ctx.Done()
-	shutdownCtx, shutdownCancel := context.WithTimeout(context.Background(), time.Second*10)
-	defer shutdownCancel()
-
-	s.Shutdown(shutdownCtx)
-}
-
-func grpcS(grpcPort int) {
-	ctx, cancelFunc := context.WithCancel(server.HandleSignals(context.Background()))
-	defer cancelFunc()
-
-	s, err := server.NewGRPC(server.Config{
-		Port: grpcPort,
-	}, server.WithGRPCServerOptions(GRPCMiddlewaresInterceptor))
-	if err != nil {
-		panic(err)
-	}
-
-	go s.Serve()
-	<-ctx.Done()
-	shutdownCtx, shutdownCancel := context.WithTimeout(context.Background(), time.Second*10)
-	defer shutdownCancel()
-
-	s.Shutdown(shutdownCtx)
-}
-
-func muxS(muxPort int) {
-	ctx, cancelFunc := context.WithCancel(server.HandleSignals(context.Background()))
-	defer cancelFunc()
-
-	s, err := server.NewMux(server.Config{
-		Port: muxPort,
-	}, server.WithMuxGRPCServerOptions(GRPCMiddlewaresInterceptor))
-	if err != nil {
-		panic(err)
-	}
-
-	gatewayClientPort := muxPort
-	gw, err := server.NewGateway("", gatewayClientPort)
-	if err != nil {
-		panic(err)
-	}
-
-	s.SetGateway("/api", gw)
-
-	s.RegisterHandler("/ping", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
-		fmt.Fprintf(w, "pong")
-	}))
-
-	go s.Serve()
-	<-ctx.Done()
-	// clean anything that needs to be closed etc like common server implementation etc
-	shutdownCtx, shutdownCancel := context.WithTimeout(context.Background(), time.Second*10)
-	defer shutdownCancel()
-
-	s.Shutdown(shutdownCtx)
-}
diff --git a/server/grpc.go b/server/grpc.go
deleted file mode 100644
index aa9c6ce..0000000
--- a/server/grpc.go
+++ /dev/null
@@ -1,91 +0,0 @@
-package server
-
-import (
-	"context"
-	"fmt"
-	"net"
-
-	"google.golang.org/grpc"
-	"google.golang.org/grpc/health"
-	"google.golang.org/grpc/health/grpc_health_v1"
-	"google.golang.org/grpc/reflection"
-)
-
-// GRPCServer is an server to serve grpc requests
-//
-// Deprecated: Prefer `mux` package instead of this.
-type GRPCServer struct {
-	config     Config
-	grpcServer *grpc.Server
-}
-
-// GRPCOption sets configs, properties or other parameters for the server.GRPCServer
-type GRPCOption func(*grpcOptions)
-
-type grpcOptions struct {
-	grpcServerOptions []grpc.ServerOption
-	grpcServer        *grpc.Server
-}
-
-// WithGRPCServerOptions sets []grpc.ServerOption for server.GRPCServer
-func WithGRPCServerOptions(opts ...grpc.ServerOption) GRPCOption {
-	return func(gos *grpcOptions) {
-		gos.grpcServerOptions = opts
-	}
-}
-
-// WithGRPCServer sets grpc.Server instance for server.GRPCServer
-func WithGRPCServer(grpcServer *grpc.Server) GRPCOption {
-	return func(gos *grpcOptions) {
-		gos.grpcServer = grpcServer
-	}
-}
-
-// NewGRPC creates a new server.GRPCServer instance with given config and server.GRPCOption
-//
-// Deprecated: Prefer `mux` package instead of this.
-func NewGRPC(config Config, options ...GRPCOption) (*GRPCServer, error) {
-	gos := &grpcOptions{}
-	for _, opt := range options {
-		opt(gos)
-	}
-
-	server := &GRPCServer{config: config}
-	if gos.grpcServer != nil {
-		server.grpcServer = gos.grpcServer
-	} else {
-		server.grpcServer = grpc.NewServer(gos.grpcServerOptions...)
-	}
-	return server, nil
-}
-
-// Serve starts the configured grpc server to serve requests
-func (s *GRPCServer) Serve() error {
-	l, err := net.Listen("tcp", fmt.Sprintf("%s:%d", s.config.Host, s.config.Port))
-	if err != nil {
-		return err
-	}
-
-	reflection.Register(s.grpcServer)
-	return s.grpcServer.Serve(l)
-}
-
-func (s *GRPCServer) RegisterService(sd *grpc.ServiceDesc, ss interface{}) {
-	s.grpcServer.RegisterService(sd, ss)
-}
-
-// Shutdown gracefully stops the server, and kills the server when passed context is cancelled
-func (s *GRPCServer) Shutdown(ctx context.Context) {
-	s.grpcServer.GracefulStop()
-	go func() {
-		<-ctx.Done()
-		s.grpcServer.Stop()
-	}()
-}
-
-// RegisterHealth adds standard grpc health check service to grpc server
-func (s *GRPCServer) RegisterHealth() *health.Server {
-	hs := health.NewServer()
-	s.RegisterService(&grpc_health_v1.Health_ServiceDesc, hs)
-	return hs
-}
diff --git a/server/gw.go b/server/gw.go
deleted file mode 100644
index 8776dd7..0000000
--- a/server/gw.go
+++ /dev/null
@@ -1,64 +0,0 @@
-package server
-
-import (
-	"context"
-	"fmt"
-
-	"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
-	"github.com/pkg/errors"
-	"google.golang.org/grpc"
-)
-
-// GRPCGateway helps in registering grpc-gateway proxy handlers for a grpc service on server.HTTPServer
-type GRPCGateway struct {
-	// gwmux is the grpc-gateway proxy multiplexer
-	gwmux   *runtime.ServeMux
-	address string
-}
-
-// GatewayOption sets configs, properties or other parameters for the server.GRPCGateway
-type GatewayOption func(*gatewayOptions)
-
-type gatewayOptions struct {
-	gwMuxOptions []runtime.ServeMuxOption
-	gwmux        *runtime.ServeMux
-}
-
-// WithGatewayMuxOptions sets []runtime.ServeMuxOption for server.GRPCGateway
-func WithGatewayMuxOptions(opts ...runtime.ServeMuxOption) GatewayOption {
-	return func(gwo *gatewayOptions) {
-		gwo.gwMuxOptions = opts
-	}
-}
-
-// WithGRPCGateway sets runtime.ServeMux instance for server.GRPCGateway
-func WithGRPCGateway(gwmux *runtime.ServeMux) GatewayOption {
-	return func(gwo *gatewayOptions) {
-		gwo.gwmux = gwmux
-	}
-}
-
-// NewGateway creates a new server.GRPCGateway to proxy grpc requests to specified host and port.
-func NewGateway(host string, port int, opts ...GatewayOption) (*GRPCGateway, error) {
-	gwo := &gatewayOptions{}
-	for _, opt := range opts {
-		opt(gwo)
-	}
-
-	gateway := &GRPCGateway{address: fmt.Sprintf("%s:%d", host, port)}
-	if gwo.gwmux != nil {
-		gateway.gwmux = gwo.gwmux
-	} else {
-		gateway.gwmux = runtime.NewServeMux(gwo.gwMuxOptions...)
-	}
-
-	return gateway, nil
-}
-
-// RegisterHandler helps in adding routes and handlers to be used for proxying requests to grpc service given the grpc-gateway generated Register*ServiceHandlerFromEndpoint function
-func (s *GRPCGateway) RegisterHandler(ctx context.Context, f func(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)) error {
-	if err := f(ctx, s.gwmux, s.address, []grpc.DialOption{grpc.WithInsecure()}); err != nil {
-		return errors.Wrap(err, "RegisterHandler")
-	}
-	return nil
-}
diff --git a/server/http.go b/server/http.go
deleted file mode 100644
index 127d18b..0000000
--- a/server/http.go
+++ /dev/null
@@ -1,82 +0,0 @@
-package server
-
-import (
-	"context"
-	"fmt"
-	"net/http"
-	"strings"
-)
-
-// HTTPServer is an server to serve http requests
-//
-// Deprecated: Prefer `mux` package instead of this.
-type HTTPServer struct {
-	config     Config
-	httpServer *http.Server
-	// httpMux is used for allowing addition of custom handlers to the http server
-	httpMux *http.ServeMux
-}
-
-// HTTPOption sets configs, properties or other parameters for the server.HTTPServer
-type HTTPOption func(*httpOptions)
-
-type httpOptions struct {
-	httpServer *http.Server
-}
-
-// WithHTTPServer sets http.Server instance for server.HTTPServer
-func WithHTTPServer(httpServer *http.Server) HTTPOption {
-	return func(hos *httpOptions) {
-		hos.httpServer = httpServer
-	}
-}
-
-// NewHTTP creates a new server.HTTPServer instance with given config and server.HTTPOption
-//
-// Deprecated: Prefer `mux` package instead of this.
-func NewHTTP(config Config, options ...HTTPOption) (*HTTPServer, error) {
-	hos := &httpOptions{}
-	for _, opt := range options {
-		opt(hos)
-	}
-
-	server := &HTTPServer{config: config}
-	if hos.httpServer != nil {
-		server.httpServer = hos.httpServer
-	} else {
-		server.httpServer = &http.Server{}
-	}
-	server.httpServer.Addr = fmt.Sprintf("%s:%d", config.Host, config.Port)
-	server.httpMux = http.NewServeMux()
-
-	return server, nil
-}
-
-// Serve starts the configured http server to serve requests
-func (s *HTTPServer) Serve() error {
-	s.httpServer.Handler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
-		s.httpMux.ServeHTTP(w, r)
-	})
-	return s.httpServer.ListenAndServe()
-}
-
-// RegisterHandler registers provided pattern and handler on the http server
-func (s *HTTPServer) RegisterHandler(pattern string, handler http.Handler) {
-	s.httpMux.Handle(pattern, handler)
-}
-
-// SetGateway sets a server.GRPCGateway instance on the http server to be proxy requests to a grpc service
-func (s *HTTPServer) SetGateway(patternPrefix string, gw *GRPCGateway) {
-	prefix := strings.TrimSuffix(patternPrefix, "/")
-	pattern := prefix + "/"
-	s.httpMux.Handle(pattern, http.StripPrefix(prefix, gw.gwmux))
-}
-
-// Shutdown gracefully stops the server, and kills the server when passed context is cancelled
-func (s *HTTPServer) Shutdown(ctx context.Context) {
-	s.httpServer.Shutdown(ctx)
-	go func() {
-		<-ctx.Done()
-		s.httpServer.Close()
-	}()
-}
diff --git a/server/mux.go b/server/mux.go
deleted file mode 100644
index 7f77f95..0000000
--- a/server/mux.go
+++ /dev/null
@@ -1,127 +0,0 @@
-package server
-
-import (
-	"context"
-	"fmt"
-	"net"
-	"net/http"
-
-	"github.com/soheilhy/cmux"
-	"google.golang.org/grpc"
-	"google.golang.org/grpc/reflection"
-)
-
-// MuxServer is an server to serve grpc requests and http requests on same host and port
-//
-// Deprecated: Prefer `mux` package instead of this.
-type MuxServer struct {
-	config Config
-	GRPCServer
-	HTTPServer
-}
-
-// MuxOption sets configs, properties or other parameters for the server.MuxServer
-type MuxOption func(*muxOptions)
-
-type muxOptions struct {
-	grpcOptions
-	httpOptions
-}
-
-// WithMuxGRPCServerOptions sets []grpc.ServerOption for the internal grpc server of server.MuxServer
-func WithMuxGRPCServerOptions(opts ...grpc.ServerOption) MuxOption {
-	return func(mos *muxOptions) {
-		WithGRPCServerOptions(opts...)(&mos.grpcOptions)
-	}
-}
-
-// WithMuxGRPCServer sets grpc.Server instance for the internal grpc server of server.MuxServer
-func WithMuxGRPCServer(grpcServer *grpc.Server) MuxOption {
-	return func(mos *muxOptions) {
-		WithGRPCServer(grpcServer)(&mos.grpcOptions)
-	}
-}
-
-// WithMuxHTTPServer sets http.Server instance for the internal http server of server.MuxServer
-func WithMuxHTTPServer(httpServer *http.Server) MuxOption {
-	return func(mos *muxOptions) {
-		WithHTTPServer(httpServer)(&mos.httpOptions)
-	}
-}
-
-// NewMux creates a new server.MuxServer instance with given config and server.MuxOption
-//
-// Deprecated: Prefer `mux` package instead of this.
-func NewMux(config Config, options ...MuxOption) (*MuxServer, error) {
-	mos := &muxOptions{}
-	for _, opt := range options {
-		opt(mos)
-	}
-
-	server := &MuxServer{config: config}
-	if mos.grpcServer != nil {
-		server.grpcServer = mos.grpcServer
-	} else {
-		server.grpcServer = grpc.NewServer(mos.grpcServerOptions...)
-	}
-
-	if mos.httpServer != nil {
-		server.httpServer = mos.httpServer
-	} else {
-		server.httpServer = &http.Server{}
-	}
-
-	server.httpMux = http.NewServeMux()
-
-	return server, nil
-}
-
-// Serve starts the configured grpc and http servers to serve requests
-func (s *MuxServer) Serve() error {
-	l, err := net.Listen("tcp", fmt.Sprintf("%s:%d", s.config.Host, s.config.Port))
-	if err != nil {
-		return err
-	}
-
-	m := cmux.New(l)
-	defer m.Close()
-
-	grpcL := m.MatchWithWriters(cmux.HTTP2MatchHeaderFieldSendSettings("content-type", "application/grpc"))
-	httpL := m.Match(cmux.Any())
-
-	s.httpServer.Handler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
-		s.httpMux.ServeHTTP(w, r)
-	})
-
-	errorChannel := make(chan error)
-
-	go func() {
-		reflection.Register(s.grpcServer)
-		err := s.grpcServer.Serve(grpcL)
-		if err != nil {
-			errorChannel <- err
-		}
-	}()
-
-	go func() {
-		err := s.httpServer.Serve(httpL)
-		if err != nil {
-			errorChannel <- err
-		}
-	}()
-
-	go func() {
-		err := m.Serve()
-		if err != nil {
-			errorChannel <- err
-		}
-	}()
-
-	return <-errorChannel
-}
-
-// Shutdown gracefully stops the server, and kills the server when passed context is cancelled
-func (s *MuxServer) Shutdown(ctx context.Context) {
-	s.HTTPServer.Shutdown(ctx)
-	s.GRPCServer.Shutdown(ctx)
-}
diff --git a/mux/_example/main.go b/server/mux/README.md
similarity index 90%
rename from mux/_example/main.go
rename to server/mux/README.md
index 2019538..531cd9b 100644
--- a/mux/_example/main.go
+++ b/server/mux/README.md
@@ -1,3 +1,11 @@
+# Mux
+
+`mux` package provides helpers for starting multiple servers. HTTP and gRPC
+servers are supported currently.
+
+## Usage
+
+```go
 package main
 
 import (
@@ -52,3 +60,4 @@ func (s SlowCommonService) GetVersion(ctx context.Context, req *commonv1.GetVers
 	}
 	return s.CommonService.GetVersion(ctx, req)
 }
+```
diff --git a/mux/mux.go b/server/mux/mux.go
similarity index 100%
rename from mux/mux.go
rename to server/mux/mux.go
diff --git a/mux/option.go b/server/mux/option.go
similarity index 100%
rename from mux/option.go
rename to server/mux/option.go
diff --git a/mux/serve_target.go b/server/mux/serve_target.go
similarity index 100%
rename from mux/serve_target.go
rename to server/mux/serve_target.go
diff --git a/spa/README.md b/server/spa/README.md
similarity index 100%
rename from spa/README.md
rename to server/spa/README.md
diff --git a/spa/router.go b/server/spa/router.go
similarity index 100%
rename from spa/router.go
rename to server/spa/router.go
diff --git a/spa/spa.go b/server/spa/spa.go
similarity index 100%
rename from spa/spa.go
rename to server/spa/spa.go
diff --git a/server/sys.go b/server/sys.go
deleted file mode 100644
index 2acbaa1..0000000
--- a/server/sys.go
+++ /dev/null
@@ -1,19 +0,0 @@
-package server
-
-import (
-	"context"
-	"os"
-	"os/signal"
-	"syscall"
-)
-
-// HandleSignals wraps context so that it is marked done
-// when one of SIGINT or SIGTERM is received
-func HandleSignals(ctx context.Context) context.Context {
-	newCtx, stop := signal.NotifyContext(ctx, os.Interrupt, syscall.SIGTERM)
-	go func() {
-		<-newCtx.Done()
-		stop()
-	}()
-	return newCtx
-}
diff --git a/dockertestx/README.md b/testing/dockertestx/README.md
similarity index 100%
rename from dockertestx/README.md
rename to testing/dockertestx/README.md
diff --git a/dockertestx/configs/cortex/single_process_cortex.yaml b/testing/dockertestx/configs/cortex/single_process_cortex.yaml
similarity index 100%
rename from dockertestx/configs/cortex/single_process_cortex.yaml
rename to testing/dockertestx/configs/cortex/single_process_cortex.yaml
diff --git a/dockertestx/configs/nginx/cortex_nginx.conf b/testing/dockertestx/configs/nginx/cortex_nginx.conf
similarity index 100%
rename from dockertestx/configs/nginx/cortex_nginx.conf
rename to testing/dockertestx/configs/nginx/cortex_nginx.conf
diff --git a/dockertestx/cortex.go b/testing/dockertestx/cortex.go
similarity index 100%
rename from dockertestx/cortex.go
rename to testing/dockertestx/cortex.go
diff --git a/dockertestx/dockertestx.go b/testing/dockertestx/dockertestx.go
similarity index 100%
rename from dockertestx/dockertestx.go
rename to testing/dockertestx/dockertestx.go
diff --git a/dockertestx/minio.go b/testing/dockertestx/minio.go
similarity index 100%
rename from dockertestx/minio.go
rename to testing/dockertestx/minio.go
diff --git a/dockertestx/minio_migrate.go b/testing/dockertestx/minio_migrate.go
similarity index 100%
rename from dockertestx/minio_migrate.go
rename to testing/dockertestx/minio_migrate.go
diff --git a/dockertestx/nginx.go b/testing/dockertestx/nginx.go
similarity index 100%
rename from dockertestx/nginx.go
rename to testing/dockertestx/nginx.go
diff --git a/dockertestx/postgres.go b/testing/dockertestx/postgres.go
similarity index 100%
rename from dockertestx/postgres.go
rename to testing/dockertestx/postgres.go
diff --git a/dockertestx/spicedb.go b/testing/dockertestx/spicedb.go
similarity index 100%
rename from dockertestx/spicedb.go
rename to testing/dockertestx/spicedb.go
diff --git a/dockertestx/spicedb_migrate.go b/testing/dockertestx/spicedb_migrate.go
similarity index 100%
rename from dockertestx/spicedb_migrate.go
rename to testing/dockertestx/spicedb_migrate.go

From 1f0808e230857fd05c2c847ddf9c02d0bc28647b Mon Sep 17 00:00:00 2001
From: Ravi Suhag <suhag.ravi@gmail.com>
Date: Tue, 26 Nov 2024 16:54:59 -0600
Subject: [PATCH 2/2] fix: remove lint issues

---
 auth/audit/audit_test.go                      | 49 +++++++++---------
 auth/audit/repositories/dockertest_test.go    |  3 +-
 auth/audit/repositories/postgres.go           |  3 +-
 auth/audit/repositories/postgres_test.go      |  5 +-
 cli/cmdx/ref.go                               |  3 +-
 cli/printer/spinner.go                        |  3 +-
 go.mod                                        | 14 +-----
 go.sum                                        | 25 +---------
 telemetry/opentelemetry.go                    |  2 +-
 telemetry/otelgrpc/otelgrpc.go                |  4 +-
 telemetry/otelgrpc/otelgrpc_test.go           | 50 +------------------
 telemetry/otelhhtpclient/http_transport.go    |  2 +-
 .../otelhhtpclient/http_transport_test.go     |  2 +-
 telemetry/telemetry.go                        |  2 +-
 14 files changed, 47 insertions(+), 120 deletions(-)

diff --git a/auth/audit/audit_test.go b/auth/audit/audit_test.go
index 7519c62..caabac9 100644
--- a/auth/audit/audit_test.go
+++ b/auth/audit/audit_test.go
@@ -3,11 +3,12 @@ package audit_test
 import (
 	"context"
 	"errors"
-	audit2 "github.com/raystack/salt/auth/audit"
-	"github.com/raystack/salt/auth/audit/mocks"
 	"testing"
 	"time"
 
+	"github.com/raystack/salt/auth/audit"
+	"github.com/raystack/salt/auth/audit/mocks"
+
 	"github.com/stretchr/testify/mock"
 	"github.com/stretchr/testify/suite"
 )
@@ -18,24 +19,24 @@ type AuditTestSuite struct {
 	now time.Time
 
 	mockRepository *mocks.Repository
-	service        *audit2.Service
+	service        *audit.Service
 }
 
 func (s *AuditTestSuite) setupTest() {
 	s.mockRepository = new(mocks.Repository)
-	s.service = audit2.New(
-		audit2.WithMetadataExtractor(func(context.Context) map[string]interface{} {
+	s.service = audit.New(
+		audit.WithMetadataExtractor(func(context.Context) map[string]interface{} {
 			return map[string]interface{}{
 				"trace_id":    "test-trace-id",
 				"app_name":    "guardian_test",
 				"app_version": 1,
 			}
 		}),
-		audit2.WithRepository(s.mockRepository),
+		audit.WithRepository(s.mockRepository),
 	)
 
 	s.now = time.Now()
-	audit2.TimeNow = func() time.Time {
+	audit.TimeNow = func() time.Time {
 		return s.now
 	}
 }
@@ -48,7 +49,7 @@ func (s *AuditTestSuite) TestLog() {
 	s.Run("should insert to repository", func() {
 		s.setupTest()
 
-		s.mockRepository.On("Insert", mock.Anything, &audit2.Log{
+		s.mockRepository.On("Insert", mock.Anything, &audit.Log{
 			Timestamp: s.now,
 			Action:    "action",
 			Actor:     "user@example.com",
@@ -61,7 +62,7 @@ func (s *AuditTestSuite) TestLog() {
 		}).Return(nil)
 
 		ctx := context.Background()
-		ctx = audit2.WithActor(ctx, "user@example.com")
+		ctx = audit.WithActor(ctx, "user@example.com")
 		err := s.service.Log(ctx, "action", map[string]interface{}{"foo": "bar"})
 		s.NoError(err)
 	})
@@ -69,15 +70,15 @@ func (s *AuditTestSuite) TestLog() {
 	s.Run("actor extractor", func() {
 		s.Run("should use actor extractor if option given", func() {
 			expectedActor := "test-actor"
-			s.service = audit2.New(
-				audit2.WithActorExtractor(func(ctx context.Context) (string, error) {
+			s.service = audit.New(
+				audit.WithActorExtractor(func(ctx context.Context) (string, error) {
 					return expectedActor, nil
 				}),
-				audit2.WithRepository(s.mockRepository),
+				audit.WithRepository(s.mockRepository),
 			)
 
 			s.mockRepository.On("Insert", mock.Anything, mock.Anything).Run(func(args mock.Arguments) {
-				log := args.Get(1).(*audit2.Log)
+				log := args.Get(1).(*audit.Log)
 				s.Equal(expectedActor, log.Actor)
 			}).Return(nil).Once()
 
@@ -87,8 +88,8 @@ func (s *AuditTestSuite) TestLog() {
 
 		s.Run("should return error if extractor returns error", func() {
 			expectedError := errors.New("test error")
-			s.service = audit2.New(
-				audit2.WithActorExtractor(func(ctx context.Context) (string, error) {
+			s.service = audit.New(
+				audit.WithActorExtractor(func(ctx context.Context) (string, error) {
 					return "", expectedError
 				}),
 			)
@@ -100,18 +101,18 @@ func (s *AuditTestSuite) TestLog() {
 
 	s.Run("metadata", func() {
 		s.Run("should pass empty trace id if extractor not found", func() {
-			s.service = audit2.New(
-				audit2.WithMetadataExtractor(func(ctx context.Context) map[string]interface{} {
+			s.service = audit.New(
+				audit.WithMetadataExtractor(func(ctx context.Context) map[string]interface{} {
 					return map[string]interface{}{
 						"app_name":    "guardian_test",
 						"app_version": 1,
 					}
 				}),
-				audit2.WithRepository(s.mockRepository),
+				audit.WithRepository(s.mockRepository),
 			)
 
 			s.mockRepository.On("Insert", mock.Anything, mock.Anything).Run(func(args mock.Arguments) {
-				l := args.Get(1).(*audit2.Log)
+				l := args.Get(1).(*audit.Log)
 				s.IsType(map[string]interface{}{}, l.Metadata)
 
 				md := l.Metadata.(map[string]interface{})
@@ -125,13 +126,13 @@ func (s *AuditTestSuite) TestLog() {
 		})
 
 		s.Run("should append new metadata to existing one", func() {
-			s.service = audit2.New(
-				audit2.WithMetadataExtractor(func(ctx context.Context) map[string]interface{} {
+			s.service = audit.New(
+				audit.WithMetadataExtractor(func(ctx context.Context) map[string]interface{} {
 					return map[string]interface{}{
 						"existing": "foobar",
 					}
 				}),
-				audit2.WithRepository(s.mockRepository),
+				audit.WithRepository(s.mockRepository),
 			)
 
 			expectedMetadata := map[string]interface{}{
@@ -139,11 +140,11 @@ func (s *AuditTestSuite) TestLog() {
 				"new":      "foobar",
 			}
 			s.mockRepository.On("Insert", mock.Anything, mock.Anything).Run(func(args mock.Arguments) {
-				log := args.Get(1).(*audit2.Log)
+				log := args.Get(1).(*audit.Log)
 				s.Equal(expectedMetadata, log.Metadata)
 			}).Return(nil).Once()
 
-			ctx, err := audit2.WithMetadata(context.Background(), map[string]interface{}{
+			ctx, err := audit.WithMetadata(context.Background(), map[string]interface{}{
 				"new": "foobar",
 			})
 			s.Require().NoError(err)
diff --git a/auth/audit/repositories/dockertest_test.go b/auth/audit/repositories/dockertest_test.go
index 4190400..6af33a9 100644
--- a/auth/audit/repositories/dockertest_test.go
+++ b/auth/audit/repositories/dockertest_test.go
@@ -4,9 +4,10 @@ import (
 	"context"
 	"database/sql"
 	"fmt"
-	"github.com/raystack/salt/auth/audit/repositories"
 	"time"
 
+	"github.com/raystack/salt/auth/audit/repositories"
+
 	_ "github.com/lib/pq"
 	"github.com/ory/dockertest/v3"
 	"github.com/ory/dockertest/v3/docker"
diff --git a/auth/audit/repositories/postgres.go b/auth/audit/repositories/postgres.go
index 3b4dc85..bc9ac8b 100644
--- a/auth/audit/repositories/postgres.go
+++ b/auth/audit/repositories/postgres.go
@@ -5,9 +5,10 @@ import (
 	"database/sql"
 	"encoding/json"
 	"fmt"
-	"github.com/raystack/salt/auth/audit"
 	"time"
 
+	"github.com/raystack/salt/auth/audit"
+
 	"github.com/jmoiron/sqlx/types"
 )
 
diff --git a/auth/audit/repositories/postgres_test.go b/auth/audit/repositories/postgres_test.go
index e2a81f9..e651881 100644
--- a/auth/audit/repositories/postgres_test.go
+++ b/auth/audit/repositories/postgres_test.go
@@ -2,11 +2,12 @@ package repositories_test
 
 import (
 	"context"
-	"github.com/raystack/salt/auth/audit"
-	"github.com/raystack/salt/auth/audit/repositories"
 	"testing"
 	"time"
 
+	"github.com/raystack/salt/auth/audit"
+	"github.com/raystack/salt/auth/audit/repositories"
+
 	"github.com/google/go-cmp/cmp"
 	"github.com/google/go-cmp/cmp/cmpopts"
 	"github.com/jmoiron/sqlx/types"
diff --git a/cli/cmdx/ref.go b/cli/cmdx/ref.go
index 47f1409..54d95ed 100644
--- a/cli/cmdx/ref.go
+++ b/cli/cmdx/ref.go
@@ -3,10 +3,11 @@ package cmdx
 import (
 	"bytes"
 	"fmt"
-	"github.com/raystack/salt/cli/printer"
 	"io"
 	"strings"
 
+	"github.com/raystack/salt/cli/printer"
+
 	"github.com/spf13/cobra"
 )
 
diff --git a/cli/printer/spinner.go b/cli/printer/spinner.go
index 8d3d639..3084705 100644
--- a/cli/printer/spinner.go
+++ b/cli/printer/spinner.go
@@ -1,9 +1,10 @@
 package printer
 
 import (
-	"github.com/raystack/salt/cli/terminal"
 	"time"
 
+	"github.com/raystack/salt/cli/terminal"
+
 	"github.com/briandowns/spinner"
 )
 
diff --git a/go.mod b/go.mod
index 522f80d..92e38cc 100644
--- a/go.mod
+++ b/go.mod
@@ -15,10 +15,6 @@ require (
 	github.com/google/go-cmp v0.6.0
 	github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
 	github.com/google/uuid v1.6.0
-	github.com/goto/salt v0.3.7
-	github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
-	github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
-	github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0
 	github.com/hashicorp/go-version v1.3.0
 	github.com/jeremywohl/flatten v1.0.1
 	github.com/jmoiron/sqlx v1.3.5
@@ -33,7 +29,6 @@ require (
 	github.com/pkg/errors v0.9.1
 	github.com/schollz/progressbar/v3 v3.8.5
 	github.com/sirupsen/logrus v1.9.2
-	github.com/soheilhy/cmux v0.1.5
 	github.com/spf13/cobra v1.8.1
 	github.com/spf13/pflag v1.0.5
 	github.com/spf13/viper v1.19.0
@@ -66,10 +61,8 @@ require (
 	github.com/alecthomas/chroma v0.8.2 // indirect
 	github.com/alecthomas/repr v0.2.0 // indirect
 	github.com/aymerick/douceur v0.2.0 // indirect
-	github.com/beorn7/perks v1.0.1 // indirect
 	github.com/cenkalti/backoff/v4 v4.3.0 // indirect
 	github.com/certifi/gocertifi v0.0.0-20210507211836-431795d63e8d // indirect
-	github.com/cespare/xxhash/v2 v2.3.0 // indirect
 	github.com/containerd/continuity v0.3.0 // indirect
 	github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
 	github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 // indirect
@@ -94,6 +87,8 @@ require (
 	github.com/google/s2a-go v0.1.7 // indirect
 	github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
 	github.com/gorilla/css v1.0.0 // indirect
+	github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
+	github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect
 	github.com/hashicorp/errwrap v1.1.0 // indirect
 	github.com/hashicorp/go-multierror v1.1.1 // indirect
 	github.com/hashicorp/hcl v1.0.0 // indirect
@@ -106,7 +101,6 @@ require (
 	github.com/magiconair/properties v1.8.7 // indirect
 	github.com/mattn/go-colorable v0.1.13 // indirect
 	github.com/mattn/go-runewidth v0.0.13 // indirect
-	github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
 	github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect
 	github.com/microcosm-cc/bluemonday v1.0.6 // indirect
 	github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
@@ -118,10 +112,6 @@ require (
 	github.com/pelletier/go-toml/v2 v2.2.2 // indirect
 	github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
 	github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
-	github.com/prometheus/client_golang v1.17.0 // indirect
-	github.com/prometheus/client_model v0.6.0 // indirect
-	github.com/prometheus/common v0.44.0 // indirect
-	github.com/prometheus/procfs v0.11.1 // indirect
 	github.com/rivo/uniseg v0.2.0 // indirect
 	github.com/russross/blackfriday/v2 v2.1.0 // indirect
 	github.com/sagikazarmark/locafero v0.4.0 // indirect
diff --git a/go.sum b/go.sum
index 983831c..8142e6c 100644
--- a/go.sum
+++ b/go.sum
@@ -34,8 +34,6 @@ github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuP
 github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=
 github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
 github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
-github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
-github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
 github.com/briandowns/spinner v1.18.0 h1:SJs0maNOs4FqhBwiJ3Gr7Z1D39/rukIVGQvpNZVHVcM=
 github.com/briandowns/spinner v1.18.0/go.mod h1:QOuQk7x+EaDASo80FEXwlwiA+j/PPIcX3FScO+3/ZPQ=
 github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
@@ -43,8 +41,6 @@ github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyY
 github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
 github.com/certifi/gocertifi v0.0.0-20210507211836-431795d63e8d h1:S2NE3iHSwP0XV47EEXL8mWmRdEfGscSJ+7EgePNgt0s=
 github.com/certifi/gocertifi v0.0.0-20210507211836-431795d63e8d/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA=
-github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
-github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
 github.com/charmbracelet/glamour v0.3.0 h1:3H+ZrKlSg8s+WU6V7eF2eRVYt8lCueffbi7r2+ffGkc=
 github.com/charmbracelet/glamour v0.3.0/go.mod h1:TzF0koPZhqq0YVBNL100cPHznAAjVj7fksX2RInwjGw=
 github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E=
@@ -163,12 +159,8 @@ github.com/googleapis/gax-go/v2 v2.12.3 h1:5/zPPDvw8Q1SuXjrqrZslrqT7dL/uJT2CQii/
 github.com/googleapis/gax-go/v2 v2.12.3/go.mod h1:AKloxT6GtNbaLm8QTNSidHUVsHYcBHwWRvkNFJUQcS4=
 github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY=
 github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c=
-github.com/goto/salt v0.3.7 h1:XwnKDEMXkYhStcyLtw7SjHg4TRseRt5OSqOV8DUqfBI=
-github.com/goto/salt v0.3.7/go.mod h1:KR7LfsHQY3ae1iBEZDOlDrDZQZVRtDNdwpBttrcT5sE=
 github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI=
 github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8=
-github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
-github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
 github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys=
 github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I=
 github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
@@ -233,8 +225,6 @@ github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh
 github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
 github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y=
 github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
-github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo=
-github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
 github.com/mcuadros/go-defaults v1.2.0 h1:FODb8WSf0uGaY8elWJAkoLL0Ri6AlZ1bFlenk56oZtc=
 github.com/mcuadros/go-defaults v1.2.0/go.mod h1:WEZtHEVIGYVDqkKSWBdWKUVdRyKlMfulPaGDWIVeCWY=
 github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4=
@@ -283,15 +273,7 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI
 github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
 github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU=
 github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
-github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q=
-github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY=
 github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
-github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos=
-github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8=
-github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY=
-github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY=
-github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI=
-github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY=
 github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
 github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
 github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
@@ -307,9 +289,8 @@ github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWR
 github.com/schollz/progressbar/v3 v3.8.5 h1:VcmmNRO+eFN3B0m5dta6FXYXY+MEJmXdWoIS+jjssQM=
 github.com/schollz/progressbar/v3 v3.8.5/go.mod h1:ewO25kD7ZlaJFTvMeOItkOZa8kXu1UvFs379htE8HMQ=
 github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg=
+github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
 github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
-github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
-github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
 github.com/shirou/gopsutil/v4 v4.24.9 h1:KIV+/HaHD5ka5f570RZq+2SaeFsb/pq+fp2DGNWYoOI=
 github.com/shirou/gopsutil/v4 v4.24.9/go.mod h1:3fkaHNeYsUFCGZ8+9vZVWtbyM1k2eRnlL+bWO8Bxa/Q=
 github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
@@ -317,8 +298,6 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd
 github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
 github.com/sirupsen/logrus v1.9.2 h1:oxx1eChJGI6Uks2ZC4W1zpLlVgqB8ner4EuQwV4Ik1Y=
 github.com/sirupsen/logrus v1.9.2/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
-github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js=
-github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0=
 github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=
 github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0=
 github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8=
@@ -444,7 +423,6 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL
 golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
 golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
 golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
 golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
 golang.org/x/net v0.0.0-20210331212208-0fccb6fa2b5c/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
 golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
@@ -456,7 +434,6 @@ golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA=
 golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
 golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
diff --git a/telemetry/opentelemetry.go b/telemetry/opentelemetry.go
index 6f2c85d..2773527 100644
--- a/telemetry/opentelemetry.go
+++ b/telemetry/opentelemetry.go
@@ -5,7 +5,7 @@ import (
 	"fmt"
 	"time"
 
-	"github.com/goto/salt/log"
+	"github.com/raystack/salt/log"
 	"go.opentelemetry.io/contrib/instrumentation/host"
 	"go.opentelemetry.io/contrib/instrumentation/runtime"
 	"go.opentelemetry.io/contrib/samplers/probability/consistent"
diff --git a/telemetry/otelgrpc/otelgrpc.go b/telemetry/otelgrpc/otelgrpc.go
index ff89a8e..36ddd6c 100644
--- a/telemetry/otelgrpc/otelgrpc.go
+++ b/telemetry/otelgrpc/otelgrpc.go
@@ -6,7 +6,7 @@ import (
 	"strings"
 	"time"
 
-	"github.com/goto/salt/utils"
+	"github.com/raystack/salt/utils"
 	"go.opentelemetry.io/otel"
 	"go.opentelemetry.io/otel/attribute"
 	"go.opentelemetry.io/otel/metric"
@@ -30,7 +30,7 @@ type Meter struct {
 	attributes   []attribute.KeyValue
 }
 type MeterOpts struct {
-	meterName string `default:"github.com/goto/salt/telemetry/otelgrpc"`
+	meterName string `default:"github.com/raystack/salt/telemetry/otelgrpc"`
 }
 type Option func(*MeterOpts)
 
diff --git a/telemetry/otelgrpc/otelgrpc_test.go b/telemetry/otelgrpc/otelgrpc_test.go
index 5261528..bc429b5 100644
--- a/telemetry/otelgrpc/otelgrpc_test.go
+++ b/telemetry/otelgrpc/otelgrpc_test.go
@@ -1,53 +1,15 @@
 package otelgrpc_test
 
 import (
-	"context"
-	"errors"
 	"reflect"
 	"testing"
-	"time"
 
-	commonv1 "github.com/goto/salt/server/example/proto/gotocompany/common/v1"
-	"github.com/goto/salt/telemetry/otelgrpc"
+	"github.com/raystack/salt/telemetry/otelgrpc"
 	"github.com/stretchr/testify/assert"
 	"go.opentelemetry.io/otel/attribute"
 	semconv "go.opentelemetry.io/otel/semconv/v1.20.0"
 )
 
-func Test_otelGRPCMonitor_Record(t *testing.T) {
-	mt := otelgrpc.NewMeter("localhost:1001", otelgrpc.WithMeterName("/meterName"))
-	assert.NotNil(t, mt)
-	initialAttr := mt.GetAttributes()
-	uc := mt.UnaryClientInterceptor()
-	assert.NotNil(t, uc)
-	assert.Equal(t, initialAttr, mt.GetAttributes())
-	sc := mt.StreamClientInterceptor()
-	assert.NotNil(t, sc)
-	assert.Equal(t, initialAttr, mt.GetAttributes())
-	mt.RecordUnary(context.Background(), otelgrpc.UnaryParams{
-		Start:  time.Now(),
-		Method: "/service.gojek.com/MethodName",
-		Req:    nil,
-		Res:    nil,
-		Err:    nil,
-	})
-	assert.Equal(t, initialAttr, mt.GetAttributes())
-	version := &commonv1.Version{
-		Version: "1.0.0",
-	}
-	mt.RecordUnary(context.Background(), otelgrpc.UnaryParams{
-		Start:  time.Now(),
-		Method: "",
-		Req:    &commonv1.GetVersionRequest{Client: version},
-		Res:    nil,
-		Err:    nil,
-	})
-	assert.Equal(t, initialAttr, mt.GetAttributes())
-	mt.RecordStream(context.Background(), time.Now(), "", nil)
-	assert.Equal(t, initialAttr, mt.GetAttributes())
-	mt.RecordStream(context.Background(), time.Now(), "/service.gojek.com/MethodName", errors.New("dummy error"))
-	assert.Equal(t, initialAttr, mt.GetAttributes())
-}
 func Test_parseFullMethod(t *testing.T) {
 	type args struct {
 		fullMethod string
@@ -75,15 +37,7 @@ func Test_parseFullMethod(t *testing.T) {
 		})
 	}
 }
-func Test_getProtoSize(t *testing.T) {
-	version := &commonv1.Version{
-		Version: "1.0.0",
-	}
-	req := &commonv1.GetVersionResponse{Server: version}
-	if got := otelgrpc.GetProtoSize(req); got != 9 {
-		t.Errorf("getProtoSize() = %v, want %v", got, 9)
-	}
-}
+
 func TestExtractAddress(t *testing.T) {
 	gotHost, gotPort := otelgrpc.ExtractAddress("localhost:1001")
 	assert.Equal(t, "localhost", gotHost)
diff --git a/telemetry/otelhhtpclient/http_transport.go b/telemetry/otelhhtpclient/http_transport.go
index 739a321..93568cc 100644
--- a/telemetry/otelhhtpclient/http_transport.go
+++ b/telemetry/otelhhtpclient/http_transport.go
@@ -41,7 +41,7 @@ func NewHTTPTransport(baseTransport http.RoundTripper) http.RoundTripper {
 		baseTransport = http.DefaultTransport
 	}
 	icl := &httpTransport{roundTripper: baseTransport}
-	icl.createMeasures(otel.Meter("github.com/goto/salt/telemetry/otehttpclient"))
+	icl.createMeasures(otel.Meter("github.com/raystack/salt/telemetry/otehttpclient"))
 	return icl
 }
 func (tr *httpTransport) RoundTrip(req *http.Request) (*http.Response, error) {
diff --git a/telemetry/otelhhtpclient/http_transport_test.go b/telemetry/otelhhtpclient/http_transport_test.go
index 6adadc0..425e620 100644
--- a/telemetry/otelhhtpclient/http_transport_test.go
+++ b/telemetry/otelhhtpclient/http_transport_test.go
@@ -3,7 +3,7 @@ package otelhttpclient_test
 import (
 	"testing"
 
-	"github.com/goto/salt/telemetry/otelhttpclient"
+	otelhttpclient "github.com/raystack/salt/telemetry/otelhhtpclient"
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/telemetry/telemetry.go b/telemetry/telemetry.go
index 994947a..25ebe17 100644
--- a/telemetry/telemetry.go
+++ b/telemetry/telemetry.go
@@ -4,7 +4,7 @@ import (
 	"context"
 	"time"
 
-	"github.com/goto/salt/log"
+	"github.com/raystack/salt/log"
 )
 
 const gracePeriod = 5 * time.Second
