Skip to content

Commit

Permalink
chore(go): package relocation.
Browse files Browse the repository at this point in the history
Signed-off-by: Thibault Normand <me@zenithar.org>
  • Loading branch information
Zenithar committed Jul 20, 2022
1 parent 4cfb280 commit 2200f90
Show file tree
Hide file tree
Showing 349 changed files with 915 additions and 912 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
-
name: Build Harp
run: |
go mod vendor && go build -mod=vendor -o bin/harp github.com/elastic/harp/cmd/harp
go mod vendor && go build -mod=vendor -o bin/harp github.com/zntrio/harp/cmd/harp
env:
DOCKERFILE_ONLY: 1
GOLANG_IMAGE: ${{ matrix.golang-image }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
-
name: Build Harp
run: |
go mod vendor && go build -mod=vendor -o bin/harp github.com/elastic/harp/cmd/harp
go mod vendor && go build -mod=vendor -o bin/harp github.com/zntrio/harp/cmd/harp
# Run golangci-lint
golangci-lint:
Expand Down
17 changes: 7 additions & 10 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ before:
- go mod tidy
- go mod vendor

gomod:
proxy: true

builds:
- id: harp
main: './cmd/harp'
Expand All @@ -19,13 +16,13 @@ builds:
ldflags:
- '-s'
- '-w'
- '-X github.com/elastic/harp/build/version.Name=harp'
- '-X github.com/elastic/harp/build/version.AppName=github.com/elastic/harp/cmd/harp'
- '-X github.com/elastic/harp/build/version.Version={{.Version}}'
- '-X github.com/elastic/harp/build/version.Commit={{.CommitDate}}'
- '-X github.com/elastic/harp/build/version.Branch={{.Branch}}'
- '-X github.com/elastic/harp/build/version.BuildDate={{.Date}}'
- '-X github.com/elastic/harp/build/version.BuildTags=defaults'
- '-X github.com/zntrio/harp/build/version.Name=harp'
- '-X github.com/zntrio/harp/build/version.AppName=github.com/zntrio/harp/cmd/harp'
- '-X github.com/zntrio/harp/build/version.Version={{.Version}}'
- '-X github.com/zntrio/harp/build/version.Commit={{.CommitDate}}'
- '-X github.com/zntrio/harp/build/version.Branch={{.Branch}}'
- '-X github.com/zntrio/harp/build/version.BuildDate={{.Date}}'
- '-X github.com/zntrio/harp/build/version.BuildTags=defaults'
targets:
- darwin_amd64
- darwin_arm64
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ RUN \
"linux/arm64") DOWNLOAD_ARCH="linux-arm64" ;; \
esac && \
apk add --no-cache curl upx && \
curl -sLO https://github.com/elastic/harp/releases/download/v${VERSION}/harp-${DOWNLOAD_ARCH}.tar.gz && \
curl -sLO https://github.com/elastic/harp/releases/download/v${VERSION}/harp-${DOWNLOAD_ARCH}.tar.gz.sig && \
curl -sLO https://github.com/zntrio/harp/releases/download/v${VERSION}/harp-${DOWNLOAD_ARCH}.tar.gz && \
curl -sLO https://github.com/zntrio/harp/releases/download/v${VERSION}/harp-${DOWNLOAD_ARCH}.tar.gz.sig && \
curl -sLO https://raw.githubusercontent.com/elastic/harp/v${VERSION}/build/artifact/cosign.pub && \
cosign verify-blob --key /tmp/cosign.pub --signature harp-${DOWNLOAD_ARCH}.tar.gz.sig harp-${DOWNLOAD_ARCH}.tar.gz && \
tar -vxf harp-${DOWNLOAD_ARCH}.tar.gz && \
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Go Report Card](https://goreportcard.com/badge/github.com/elastic/harp)](https://goreportcard.com/report/github.com/elastic/harp)
[![Go Report Card](https://goreportcard.com/badge/github.com/zntrio/harp)](https://goreportcard.com/report/github.com/zntrio/harp)
[![made-with-Go](https://img.shields.io/badge/Made%20with-Go-1f425f.svg)](http://golang.org)
[![GitHub release](https://img.shields.io/github/release/elastic/harp.svg)](https://github.com/elastic/harp/releases/)
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/elastic/harp/graphs/commit-activity)
[![GitHub release](https://img.shields.io/github/release/elastic/harp.svg)](https://github.com/zntrio/harp/releases/)
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/zntrio/harp/graphs/commit-activity)

- [Harp](#harp)
- [TL;DR.](#tldr)
Expand Down Expand Up @@ -143,15 +143,15 @@ Harp provides :
* A defined common language and complete processes to achieve secret management
operations;
* A SDK to create your own tools to orchestrate your secret management pipelines;
* A container manipulation library exposed as `github.com/elastic/harp/pkg/container`;
* A secret bundle specification to store and manipulate secrets exposed as `github.com/elastic/harp/pkg/bundle`;
* An `on-steroid` template engine exposed as `github.com/elastic/harp/pkg/template`
* A path name validation library exposed as `github.com/elastic/harp/pkg/cso`
* A container manipulation library exposed as `github.com/zntrio/harp/pkg/container`;
* A secret bundle specification to store and manipulate secrets exposed as `github.com/zntrio/harp/pkg/bundle`;
* An `on-steroid` template engine exposed as `github.com/zntrio/harp/pkg/template`
* A path name validation library exposed as `github.com/zntrio/harp/pkg/cso`
* A CLI for secret management implementation
* CI/CD integration;
* Based on human-readable definitions (YAML);
* In order to create auditable and reproducible pipelines.
* An extensible tool which can be enhanced via [plugins](https://github.com/elastic/harp-plugins).
* An extensible tool which can be enhanced via [plugins](https://github.com/zntrio/harp-plugins).

And allows :

Expand Down Expand Up @@ -189,7 +189,7 @@ And allows :

# Homebrew install

Download a [release](https://github.com/elastic/harp/releases) or build from source.
Download a [release](https://github.com/zntrio/harp/releases) or build from source.

For stable version

Expand All @@ -200,7 +200,7 @@ brew install elastic/harp/harp

# Build instructions

Download a [release](https://github.com/elastic/harp/releases) or build from source.
Download a [release](https://github.com/zntrio/harp/releases) or build from source.

## Clone repository

Expand Down Expand Up @@ -320,7 +320,7 @@ docker run --rm -ti --read-only elastic/harp:<version>

# Plugins

You can find more Harp feature extensions - <https://github.com/elastic/harp-plugins>
You can find more Harp feature extensions - <https://github.com/zntrio/harp-plugins>

# Community

Expand Down
2 changes: 1 addition & 1 deletion api/proto/cso/v1/secret.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ syntax = "proto3";
package cso.v1;

option csharp_namespace = "Cso.V1";
option go_package = "github.com/elastic/harp/api/gen/go/cso/v1;csov1";
option go_package = "github.com/zntrio/harp/api/gen/go/cso/v1;csov1";
option java_multiple_files = true;
option java_outer_classname = "SecretProto";
option java_package = "com.github.elastic.cloudsec.cso.v1";
Expand Down
2 changes: 1 addition & 1 deletion api/proto/cso/v1/validator_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ syntax = "proto3";
package cso.v1;

option csharp_namespace = "Cso.V1";
option go_package = "github.com/elastic/harp/api/gen/go/cso/v1;csov1";
option go_package = "github.com/zntrio/harp/api/gen/go/cso/v1;csov1";
option java_multiple_files = true;
option java_outer_classname = "ValidatorApiProto";
option java_package = "com.github.elastic.cloudsec.cso.v1";
Expand Down
2 changes: 1 addition & 1 deletion api/proto/harp/bundle/v1/bundle.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ syntax = "proto3";
package harp.bundle.v1;

option csharp_namespace = "harp.Bundle.V1";
option go_package = "github.com/elastic/harp/api/gen/go/harp/bundle/v1;bundlev1";
option go_package = "github.com/zntrio/harp/api/gen/go/harp/bundle/v1;bundlev1";
option java_multiple_files = true;
option java_outer_classname = "BundleProto";
option java_package = "com.github.elastic.cloudsec.harp.bundle.v1";
Expand Down
2 changes: 1 addition & 1 deletion api/proto/harp/bundle/v1/bundle_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ syntax = "proto3";
package harp.bundle.v1;

option csharp_namespace = "harp.Bundle.V1";
option go_package = "github.com/elastic/harp/api/gen/go/harp/bundle/v1;bundlev1";
option go_package = "github.com/zntrio/harp/api/gen/go/harp/bundle/v1;bundlev1";
option java_multiple_files = true;
option java_outer_classname = "BundleAPI";
option java_package = "com.github.elastic.cloudsec.harp.bundle.v1";
Expand Down
2 changes: 1 addition & 1 deletion api/proto/harp/bundle/v1/patch.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ syntax = "proto3";
package harp.bundle.v1;

option csharp_namespace = "harp.Bundle.V1";
option go_package = "github.com/elastic/harp/api/gen/go/harp/bundle/v1;bundlev1";
option go_package = "github.com/zntrio/harp/api/gen/go/harp/bundle/v1;bundlev1";
option java_multiple_files = true;
option java_outer_classname = "PatchProto";
option java_package = "com.github.elastic.cloudsec.harp.bundle.v1";
Expand Down
2 changes: 1 addition & 1 deletion api/proto/harp/bundle/v1/ruleset.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ syntax = "proto3";
package harp.bundle.v1;

option csharp_namespace = "Harp.Bundle.V1";
option go_package = "github.com/elastic/harp/api/gen/go/harp/bundle/v1;bundlev1";
option go_package = "github.com/zntrio/harp/api/gen/go/harp/bundle/v1;bundlev1";
option java_multiple_files = true;
option java_outer_classname = "RuleSetProto";
option java_package = "com.github.elastic.cloudsec.harp.bundle.v1";
Expand Down
2 changes: 1 addition & 1 deletion api/proto/harp/bundle/v1/template.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ syntax = "proto3";
package harp.bundle.v1;

option csharp_namespace = "harp.Bundle.V1";
option go_package = "github.com/elastic/harp/api/gen/go/harp/bundle/v1;bundlev1";
option go_package = "github.com/zntrio/harp/api/gen/go/harp/bundle/v1;bundlev1";
option java_multiple_files = true;
option java_outer_classname = "TemplateProto";
option java_package = "com.github.elastic.cloudsec.harp.bundle.v1";
Expand Down
2 changes: 1 addition & 1 deletion api/proto/harp/container/v1/container.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ syntax = "proto3";
package harp.container.v1;

option csharp_namespace = "harp.Container.V1";
option go_package = "github.com/elastic/harp/api/gen/go/harp/container/v1;containerv1";
option go_package = "github.com/zntrio/harp/api/gen/go/harp/container/v1;containerv1";
option java_multiple_files = true;
option java_outer_classname = "ContainerProto";
option java_package = "com.github.elastic.cloudsec.harp.container.v1";
Expand Down
4 changes: 2 additions & 2 deletions build/mage/docker/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import (
"github.com/magefile/mage/mg"
"github.com/magefile/mage/sh"

"github.com/elastic/harp/build/artifact"
"github.com/elastic/harp/build/mage/git"
"github.com/zntrio/harp/build/artifact"
"github.com/zntrio/harp/build/mage/git"
)

var dockerTemplate = strings.TrimSpace(`
Expand Down
4 changes: 2 additions & 2 deletions build/mage/docker/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import (
"github.com/magefile/mage/mg"
"github.com/magefile/mage/sh"

"github.com/elastic/harp/build/artifact"
"github.com/elastic/harp/build/mage/git"
"github.com/zntrio/harp/build/artifact"
"github.com/zntrio/harp/build/mage/git"
)

var dockerReleaseTemplate = strings.TrimSpace(`
Expand Down
6 changes: 3 additions & 3 deletions build/mage/docker/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"github.com/magefile/mage/mg"
"github.com/magefile/mage/sh"

"github.com/elastic/harp/build/mage/git"
"github.com/zntrio/harp/build/mage/git"
)

var dockerToolTemplate = strings.TrimSpace(`
Expand Down Expand Up @@ -62,8 +62,8 @@ LABEL \
org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.title="Harp SDK Environment (Go {{.GolangVersion}})" \
org.opencontainers.image.description="Harp SDK Tools used to build harp and all related tools" \
org.opencontainers.image.url="https://github.com/elastic/harp" \
org.opencontainers.image.source="https://github.com/elastic/harp.git" \
org.opencontainers.image.url="https://github.com/zntrio/harp" \
org.opencontainers.image.source="https://github.com/zntrio/harp.git" \
org.opencontainers.image.revision=$VCS_REF \
org.opencontainers.image.vendor="Elastic" \
org.opencontainers.image.version=$VERSION \
Expand Down
16 changes: 8 additions & 8 deletions build/mage/golang/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"github.com/magefile/mage/mg"
"github.com/magefile/mage/sh"

"github.com/elastic/harp/build/mage/git"
"github.com/zntrio/harp/build/mage/git"
)

type buildOpts struct {
Expand Down Expand Up @@ -148,13 +148,13 @@ func Build(name, packageName, version string, opts ...BuildOption) func() error

// Inject version information
varsSetByLinker := map[string]string{
"github.com/elastic/harp/build/version.Name": name,
"github.com/elastic/harp/build/version.AppName": packageName,
"github.com/elastic/harp/build/version.Version": version,
"github.com/elastic/harp/build/version.Commit": git.Revision,
"github.com/elastic/harp/build/version.Branch": git.Branch,
"github.com/elastic/harp/build/version.BuildDate": time.Now().Format(time.RFC3339),
"github.com/elastic/harp/build/version.BuildTags": strCompilationFlags,
"github.com/zntrio/harp/build/version.Name": name,
"github.com/zntrio/harp/build/version.AppName": packageName,
"github.com/zntrio/harp/build/version.Version": version,
"github.com/zntrio/harp/build/version.Commit": git.Revision,
"github.com/zntrio/harp/build/version.Branch": git.Branch,
"github.com/zntrio/harp/build/version.BuildDate": time.Now().Format(time.RFC3339),
"github.com/zntrio/harp/build/version.BuildTags": strCompilationFlags,
}
var linkerArgs []string
for name, value := range varsSetByLinker {
Expand Down
2 changes: 1 addition & 1 deletion build/mage/golang/is.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
semver "github.com/Masterminds/semver/v3"
"go.uber.org/zap"

"github.com/elastic/harp/pkg/sdk/log"
"github.com/zntrio/harp/pkg/sdk/log"
)

var versionSemverRe = regexp.MustCompile("[0-9.]+")
Expand Down
2 changes: 1 addition & 1 deletion build/mage/golang/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

"github.com/magefile/mage/mg"

"github.com/elastic/harp/build/mage/git"
"github.com/zntrio/harp/build/mage/git"
)

// -----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion build/mage/release/formula.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"strings"
"text/template"

"github.com/elastic/harp/build/artifact"
"github.com/zntrio/harp/build/artifact"
)

var formulaTemplate = strings.TrimSpace(`# typed: false
Expand Down
4 changes: 2 additions & 2 deletions build/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (

"github.com/dchest/uniuri"

"github.com/elastic/harp/build/fips"
"github.com/zntrio/harp/build/fips"
)

// Build information. Populated at build-time.
Expand Down Expand Up @@ -107,7 +107,7 @@ func getSDKVersion() string {
// Look for harp dependency version
var sdkVersion string
for _, dep := range deps.Deps {
if dep.Path == "github.com/elastic/harp" {
if dep.Path == "github.com/zntrio/harp" {
sdkVersion = dep.Version
}
}
Expand Down
8 changes: 4 additions & 4 deletions cmd/harp/internal/cmd/bug.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"github.com/skratchdot/open-golang/open"
"github.com/spf13/cobra"

"github.com/elastic/harp/pkg/sdk/cmdutil"
"github.com/elastic/harp/pkg/sdk/log"
"github.com/zntrio/harp/pkg/sdk/cmdutil"
"github.com/zntrio/harp/pkg/sdk/log"
)

// -----------------------------------------------------------------------------
Expand Down Expand Up @@ -56,9 +56,9 @@ func runBug(cmd *cobra.Command, args []string) {
body := cmdutil.BugReport()

// Open the browser to issue creation form
reportURL := "https://github.com/elastic/harp/issues/new?body=" + url.QueryEscape(body)
reportURL := "https://github.com/zntrio/harp/issues/new?body=" + url.QueryEscape(body)
if err := open.Run(reportURL); err != nil {
fmt.Fprint(os.Stdout, "Please file a new issue at github.com/elastic/harp/issues/new using this template:\n\n")
fmt.Fprint(os.Stdout, "Please file a new issue at github.com/zntrio/harp/issues/new using this template:\n\n")
fmt.Fprint(os.Stdout, body)
}
}
Expand Down
10 changes: 5 additions & 5 deletions cmd/harp/internal/cmd/bundle_decrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import (
"github.com/spf13/cobra"
"go.uber.org/zap"

"github.com/elastic/harp/pkg/sdk/cmdutil"
"github.com/elastic/harp/pkg/sdk/log"
"github.com/elastic/harp/pkg/sdk/value"
"github.com/elastic/harp/pkg/sdk/value/encryption"
"github.com/elastic/harp/pkg/tasks/bundle"
"github.com/zntrio/harp/pkg/sdk/cmdutil"
"github.com/zntrio/harp/pkg/sdk/log"
"github.com/zntrio/harp/pkg/sdk/value"
"github.com/zntrio/harp/pkg/sdk/value/encryption"
"github.com/zntrio/harp/pkg/tasks/bundle"
)

// -----------------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions cmd/harp/internal/cmd/bundle_diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
"github.com/spf13/cobra"
"go.uber.org/zap"

"github.com/elastic/harp/pkg/sdk/cmdutil"
"github.com/elastic/harp/pkg/sdk/log"
"github.com/elastic/harp/pkg/tasks/bundle"
"github.com/zntrio/harp/pkg/sdk/cmdutil"
"github.com/zntrio/harp/pkg/sdk/log"
"github.com/zntrio/harp/pkg/tasks/bundle"
)

// -----------------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions cmd/harp/internal/cmd/bundle_dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
"github.com/spf13/cobra"
"go.uber.org/zap"

"github.com/elastic/harp/pkg/sdk/cmdutil"
"github.com/elastic/harp/pkg/sdk/log"
"github.com/elastic/harp/pkg/tasks/bundle"
"github.com/zntrio/harp/pkg/sdk/cmdutil"
"github.com/zntrio/harp/pkg/sdk/log"
"github.com/zntrio/harp/pkg/tasks/bundle"
)

// -----------------------------------------------------------------------------
Expand Down
10 changes: 5 additions & 5 deletions cmd/harp/internal/cmd/bundle_encrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ import (
"github.com/spf13/cobra"
"go.uber.org/zap"

"github.com/elastic/harp/pkg/sdk/cmdutil"
"github.com/elastic/harp/pkg/sdk/log"
"github.com/elastic/harp/pkg/sdk/value"
"github.com/elastic/harp/pkg/sdk/value/encryption"
"github.com/elastic/harp/pkg/tasks/bundle"
"github.com/zntrio/harp/pkg/sdk/cmdutil"
"github.com/zntrio/harp/pkg/sdk/log"
"github.com/zntrio/harp/pkg/sdk/value"
"github.com/zntrio/harp/pkg/sdk/value/encryption"
"github.com/zntrio/harp/pkg/tasks/bundle"
)

// -----------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 2200f90

Please sign in to comment.