Skip to content

Commit

Permalink
NOISSUE - Move groups out of pkg (absmach#2493)
Browse files Browse the repository at this point in the history
Signed-off-by: Arvindh <[email protected]>
  • Loading branch information
arvindh123 authored Oct 28, 2024
1 parent 8579830 commit 5136390
Show file tree
Hide file tree
Showing 55 changed files with 95 additions and 385 deletions.
18 changes: 9 additions & 9 deletions cmd/groups/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ import (

chclient "github.com/absmach/callhome/pkg/client"
"github.com/absmach/magistrala"
gpsvc "github.com/absmach/magistrala/internal/groups"
grpcapi "github.com/absmach/magistrala/internal/groups/api/grpc"
httpapi "github.com/absmach/magistrala/internal/groups/api/http"
"github.com/absmach/magistrala/internal/groups/events"
"github.com/absmach/magistrala/internal/groups/middleware"
"github.com/absmach/magistrala/internal/groups/postgres"
"github.com/absmach/magistrala/internal/groups/tracing"
"github.com/absmach/magistrala/groups"
gpsvc "github.com/absmach/magistrala/groups"
grpcapi "github.com/absmach/magistrala/groups/api/grpc"
httpapi "github.com/absmach/magistrala/groups/api/http"
"github.com/absmach/magistrala/groups/events"
"github.com/absmach/magistrala/groups/middleware"
"github.com/absmach/magistrala/groups/postgres"
pgroups "github.com/absmach/magistrala/groups/private"
"github.com/absmach/magistrala/groups/tracing"
grpcChannelsV1 "github.com/absmach/magistrala/internal/grpc/channels/v1"
grpcGroupsV1 "github.com/absmach/magistrala/internal/grpc/groups/v1"
grpcThingsV1 "github.com/absmach/magistrala/internal/grpc/things/v1"
mglog "github.com/absmach/magistrala/logger"
authsvcAuthn "github.com/absmach/magistrala/pkg/authn/authsvc"
mgauthz "github.com/absmach/magistrala/pkg/authz"
authsvcAuthz "github.com/absmach/magistrala/pkg/authz/authsvc"
"github.com/absmach/magistrala/pkg/groups"
pgroups "github.com/absmach/magistrala/pkg/groups/private"
"github.com/absmach/magistrala/pkg/grpcclient"
jaegerclient "github.com/absmach/magistrala/pkg/jaeger"
"github.com/absmach/magistrala/pkg/policies"
Expand Down
4 changes: 2 additions & 2 deletions cmd/provision/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (

chclient "github.com/absmach/callhome/pkg/client"
"github.com/absmach/magistrala"
"github.com/absmach/magistrala/channels"
mglog "github.com/absmach/magistrala/logger"
mgclients "github.com/absmach/magistrala/pkg/clients"
"github.com/absmach/magistrala/pkg/errors"
mggroups "github.com/absmach/magistrala/pkg/groups"
mgsdk "github.com/absmach/magistrala/pkg/sdk/go"
"github.com/absmach/magistrala/pkg/server"
httpserver "github.com/absmach/magistrala/pkg/server/http"
Expand Down Expand Up @@ -138,7 +138,7 @@ func loadConfig() (provision.Config, error) {

cfg.Bootstrap.Content = content
// This is default conf for provision if there is no config file
cfg.Channels = []mggroups.Group{
cfg.Channels = []channels.Channel{
{
Name: "control-channel",
Metadata: map[string]interface{}{"type": "control"},
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package grpc
import (
"context"

groups "github.com/absmach/magistrala/pkg/groups/private"
groups "github.com/absmach/magistrala/groups/private"
"github.com/go-kit/kit/endpoint"
)

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import (
"context"

mgauth "github.com/absmach/magistrala/auth"
groups "github.com/absmach/magistrala/groups/private"
grpcCommonV1 "github.com/absmach/magistrala/internal/grpc/common/v1"
grpcGroupsV1 "github.com/absmach/magistrala/internal/grpc/groups/v1"
"github.com/absmach/magistrala/pkg/apiutil"
"github.com/absmach/magistrala/pkg/errors"
svcerr "github.com/absmach/magistrala/pkg/errors/service"
groups "github.com/absmach/magistrala/pkg/groups/private"
kitgrpc "github.com/go-kit/kit/transport/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import (
"net/http"
"strings"

mggroups "github.com/absmach/magistrala/groups"
"github.com/absmach/magistrala/internal/api"
"github.com/absmach/magistrala/pkg/apiutil"
mgclients "github.com/absmach/magistrala/pkg/clients"
"github.com/absmach/magistrala/pkg/errors"
mggroups "github.com/absmach/magistrala/pkg/groups"
"github.com/go-chi/chi/v5"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import (
"strings"
"testing"

"github.com/absmach/magistrala/groups"
"github.com/absmach/magistrala/internal/api"
"github.com/absmach/magistrala/pkg/apiutil"
"github.com/absmach/magistrala/pkg/clients"
"github.com/absmach/magistrala/pkg/errors"
"github.com/absmach/magistrala/pkg/groups"
"github.com/stretchr/testify/assert"
)

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ package api
import (
"context"

"github.com/absmach/magistrala/groups"
"github.com/absmach/magistrala/internal/api"
"github.com/absmach/magistrala/pkg/apiutil"
"github.com/absmach/magistrala/pkg/authn"
"github.com/absmach/magistrala/pkg/errors"
svcerr "github.com/absmach/magistrala/pkg/errors/service"
"github.com/absmach/magistrala/pkg/groups"
"github.com/go-kit/kit/endpoint"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
package api

import (
"github.com/absmach/magistrala/groups"
mggroups "github.com/absmach/magistrala/groups"
"github.com/absmach/magistrala/internal/api"
"github.com/absmach/magistrala/pkg/apiutil"
"github.com/absmach/magistrala/pkg/groups"
mggroups "github.com/absmach/magistrala/pkg/groups"
)

type createGroupReq struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"strings"
"testing"

"github.com/absmach/magistrala/groups"
"github.com/absmach/magistrala/internal/api"
"github.com/absmach/magistrala/pkg/apiutil"
"github.com/absmach/magistrala/pkg/groups"
"github.com/stretchr/testify/assert"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http"

"github.com/absmach/magistrala"
"github.com/absmach/magistrala/pkg/groups"
"github.com/absmach/magistrala/groups"
)

var (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ package api
import (
"log/slog"

"github.com/absmach/magistrala/groups"
"github.com/absmach/magistrala/internal/api"
"github.com/absmach/magistrala/pkg/apiutil"
"github.com/absmach/magistrala/pkg/authn"
"github.com/absmach/magistrala/pkg/groups"
roleManagerHttp "github.com/absmach/magistrala/pkg/roles/rolemanager/api"
"github.com/go-chi/chi/v5"
kithttp "github.com/go-kit/kit/transport/http"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package events
import (
"time"

groups "github.com/absmach/magistrala/groups"
"github.com/absmach/magistrala/pkg/events"
groups "github.com/absmach/magistrala/pkg/groups"
)

var (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ package events
import (
"context"

"github.com/absmach/magistrala/groups"
"github.com/absmach/magistrala/pkg/authn"
"github.com/absmach/magistrala/pkg/events"
"github.com/absmach/magistrala/pkg/events/store"
"github.com/absmach/magistrala/pkg/groups"
rmEvents "github.com/absmach/magistrala/pkg/roles/rolemanager/events"
)

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ package middleware
import (
"context"

"github.com/absmach/magistrala/groups"
"github.com/absmach/magistrala/pkg/authn"
"github.com/absmach/magistrala/pkg/authz"
mgauthz "github.com/absmach/magistrala/pkg/authz"
"github.com/absmach/magistrala/pkg/errors"
"github.com/absmach/magistrala/pkg/groups"
"github.com/absmach/magistrala/pkg/policies"
rmMW "github.com/absmach/magistrala/pkg/roles/rolemanager/middleware"
"github.com/absmach/magistrala/pkg/svcutil"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"log/slog"
"time"

"github.com/absmach/magistrala/groups"
"github.com/absmach/magistrala/pkg/authn"
"github.com/absmach/magistrala/pkg/groups"
rmMW "github.com/absmach/magistrala/pkg/roles/rolemanager/middleware"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"context"
"time"

"github.com/absmach/magistrala/groups"
"github.com/absmach/magistrala/pkg/authn"
"github.com/absmach/magistrala/pkg/groups"
rmMW "github.com/absmach/magistrala/pkg/roles/rolemanager/middleware"
"github.com/go-kit/kit/metrics"
)
Expand Down
File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/groups/mocks/service.go → groups/mocks/service.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import (
"strings"
"time"

"github.com/absmach/magistrala/groups"
mggroups "github.com/absmach/magistrala/groups"
mgclients "github.com/absmach/magistrala/pkg/clients"
"github.com/absmach/magistrala/pkg/errors"
repoerr "github.com/absmach/magistrala/pkg/errors/repository"
"github.com/absmach/magistrala/pkg/groups"
mggroups "github.com/absmach/magistrala/pkg/groups"
"github.com/absmach/magistrala/pkg/postgres"
rolesPostgres "github.com/absmach/magistrala/pkg/roles/repo/postgres"
"github.com/jmoiron/sqlx"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import (
"time"

"github.com/0x6flab/namegenerator"
"github.com/absmach/magistrala/internal/groups/postgres"
"github.com/absmach/magistrala/groups"
"github.com/absmach/magistrala/groups/postgres"
"github.com/absmach/magistrala/internal/testsutil"
"github.com/absmach/magistrala/pkg/clients"
"github.com/absmach/magistrala/pkg/errors"
repoerr "github.com/absmach/magistrala/pkg/errors/repository"
"github.com/absmach/magistrala/pkg/groups"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"testing"
"time"

gpostgres "github.com/absmach/magistrala/internal/groups/postgres"
gpostgres "github.com/absmach/magistrala/groups/postgres"
"github.com/absmach/magistrala/pkg/postgres"
pgclient "github.com/absmach/magistrala/pkg/postgres"
"github.com/jmoiron/sqlx"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package private
import (
"context"

"github.com/absmach/magistrala/pkg/groups"
"github.com/absmach/magistrala/groups"
)

//go:generate mockery --name Service --output=./mocks --filename service.go --quiet --note "Copyright (c) Abstract Machines"
Expand Down
File renamed without changes.
Loading

0 comments on commit 5136390

Please sign in to comment.