Skip to content

Commit

Permalink
rename pkg to internal
Browse files Browse the repository at this point in the history
  • Loading branch information
notque committed Jan 31, 2023
1 parent c35d316 commit a7f3332
Show file tree
Hide file tree
Showing 29 changed files with 29 additions and 29 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# build artifacts
build/hermes
.gopath/pkg/
.gopath/internal/
build/install/
build/docker.tar

# test artifacts
pkg/test/migrations/*.sql
internal/test/migrations/*.sql
unittest.db
build/cover.out
build/*.cover.out
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ RUN apk add --no-cache gcc git make musl-dev

COPY . /src
ARG BININFO_BUILD_DATE BININFO_COMMIT_HASH BININFO_VERSION # provided to 'make install'
RUN make -C /src install PREFIX=/pkg
RUN make -C /src install PREFIX=/internal

################################################################################

FROM alpine:3.17

RUN apk add --no-cache ca-certificates
COPY --from=builder /pkg/ /usr/
COPY --from=builder /internal/ /usr/

ARG BININFO_BUILD_DATE BININFO_COMMIT_HASH BININFO_VERSION
LABEL source_repository="https://github.com/sapcc/hermes" \
Expand Down
6 changes: 3 additions & 3 deletions pkg/api/api_test.go → internal/api/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import (
"github.com/prometheus/client_golang/prometheus"
"github.com/spf13/viper"

"github.com/sapcc/hermes/pkg/identity"
"github.com/sapcc/hermes/pkg/storage"
"github.com/sapcc/hermes/pkg/test"
"github.com/sapcc/hermes/internal/identity"
"github.com/sapcc/hermes/internal/storage"
"github.com/sapcc/hermes/internal/test"
)

//type object map[string]interface{} - unused re golangci
Expand Down
4 changes: 2 additions & 2 deletions pkg/api/core.go → internal/api/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (

"github.com/gorilla/mux"

"github.com/sapcc/hermes/pkg/identity"
"github.com/sapcc/hermes/pkg/storage"
"github.com/sapcc/hermes/internal/identity"
"github.com/sapcc/hermes/internal/storage"
)

type v1Provider struct {
Expand Down
4 changes: 2 additions & 2 deletions pkg/api/events.go → internal/api/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import (
"github.com/gorilla/mux"
"github.com/pkg/errors"

"github.com/sapcc/hermes/pkg/hermes"
"github.com/sapcc/hermes/pkg/util"
"github.com/sapcc/hermes/internal/hermes"
"github.com/sapcc/hermes/internal/util"
)

// EventList is the model for JSON returned by the ListEvents API call
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions pkg/api/server.go → internal/api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import (
"github.com/rs/cors"
"github.com/spf13/viper"

"github.com/sapcc/hermes/pkg/identity"
"github.com/sapcc/hermes/pkg/storage"
"github.com/sapcc/hermes/pkg/util"
"github.com/sapcc/hermes/internal/identity"
"github.com/sapcc/hermes/internal/storage"
"github.com/sapcc/hermes/internal/util"
)

// Server Set up and start the API server, hooking it up to the API router
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/token.go → internal/api/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"github.com/gorilla/mux"
"github.com/spf13/viper"

"github.com/sapcc/hermes/pkg/util"
"github.com/sapcc/hermes/internal/util"
)

// Token represents a user's token, as passed through the X-Auth-Token header of
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/util.go → internal/api/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"

"github.com/sapcc/hermes/pkg/util"
"github.com/sapcc/hermes/internal/util"
)

// utility functionality
Expand Down
6 changes: 3 additions & 3 deletions pkg/hermes/events.go → internal/hermes/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import (
"github.com/jinzhu/copier"
"github.com/sapcc/go-api-declarations/cadf"

"github.com/sapcc/hermes/pkg/identity"
"github.com/sapcc/hermes/pkg/storage"
"github.com/sapcc/hermes/pkg/util"
"github.com/sapcc/hermes/internal/identity"
"github.com/sapcc/hermes/internal/storage"
"github.com/sapcc/hermes/internal/util"
)

// ListEvent contains high-level data about an event, intended as a list item
Expand Down
4 changes: 2 additions & 2 deletions pkg/hermes/events_test.go → internal/hermes/events_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/sapcc/hermes/pkg/identity"
"github.com/sapcc/hermes/pkg/storage"
"github.com/sapcc/hermes/internal/identity"
"github.com/sapcc/hermes/internal/storage"
)

func Test_GetEvent(t *testing.T) {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/identity/keystone.go → internal/identity/keystone.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"github.com/pkg/errors"
"github.com/spf13/viper"

"github.com/sapcc/hermes/pkg/util"
"github.com/sapcc/hermes/internal/util"
)

// Keystone Openstack Keystone implementation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (

"github.com/gophercloud/gophercloud"

"github.com/sapcc/hermes/pkg/util"
"github.com/sapcc/hermes/internal/util"
)

// Cache type used for the name caches
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
policy "github.com/databus23/goslo.policy"
"github.com/stretchr/testify/assert"

"github.com/sapcc/hermes/pkg/util"
"github.com/sapcc/hermes/internal/util"
)

// Setup test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"github.com/sapcc/go-api-declarations/cadf"
"github.com/spf13/viper"

"github.com/sapcc/hermes/pkg/util"
"github.com/sapcc/hermes/internal/util"
)

// ElasticSearch contains an elastic.Client we pass around after init.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ import (
policy "github.com/databus23/goslo.policy"
"github.com/spf13/viper"

"github.com/sapcc/hermes/pkg/api"
"github.com/sapcc/hermes/pkg/identity"
"github.com/sapcc/hermes/pkg/storage"
"github.com/sapcc/hermes/pkg/util"
"github.com/sapcc/hermes/internal/api"
"github.com/sapcc/hermes/internal/identity"
"github.com/sapcc/hermes/internal/storage"
"github.com/sapcc/hermes/internal/util"
)

var configPath *string
Expand Down

0 comments on commit a7f3332

Please sign in to comment.