Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various naming fixes, don't use baton-example, update golang version,… #2

Merged
merged 1 commit into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gon-amd64.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"source": ["./dist/macos-amd64_darwin_amd64_v1/baton-example"],
"bundle_id": "com.conductorone.baton-example",
"source": ["./dist/macos-amd64_darwin_amd64_v1/baton-broadcom-sac"],
"bundle_id": "com.conductorone.baton-broadcom-sac",
"apple_id": {
"username" : "justin.gallardo@conductorone.com",
"password": "@env:AC_PASSWORD"
Expand All @@ -9,6 +9,6 @@
"application_identity": "Developer ID Application: Justin Gallardo (858DKH55XL)"
},
"zip" :{
"output_path": "./dist/baton-example-darwin-amd64.signed.zip"
"output_path": "./dist/baton-broadcom-sac-darwin-amd64.signed.zip"
}
}
6 changes: 3 additions & 3 deletions .gon-arm64.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"source": ["./dist/macos-arm64_darwin_arm64/baton-example"],
"bundle_id": "com.conductorone.baton-example",
"source": ["./dist/macos-arm64_darwin_arm64/baton-broadcom-sac"],
"bundle_id": "com.conductorone.baton-broadcom-sac",
"apple_id": {
"username" : "justin.gallardo@conductorone.com",
"password": "@env:AC_PASSWORD"
Expand All @@ -9,6 +9,6 @@
"application_identity": "Developer ID Application: Justin Gallardo (858DKH55XL)"
},
"zip" :{
"output_path": "./dist/baton-example-darwin-arm64.signed.zip"
"output_path": "./dist/baton-broadcom-sac-darwin-arm64.signed.zip"
}
}
34 changes: 17 additions & 17 deletions .goreleaser.docker.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
project_name: baton-example
project_name: baton-broadcom-sac
builds:
- binary: baton-example
- binary: baton-broadcom-sac
env:
- CGO_ENABLED=0
id: linux
main: ./cmd/baton-example
main: ./cmd/baton-broadcom-sac
goos:
- linux
goarch:
Expand All @@ -15,37 +15,37 @@ dockers:
goos: linux
goarch: amd64
image_templates:
- "ghcr.io/conductorone/baton-example:{{ .Version }}-amd64"
- "ghcr.io/conductorone/baton-example:latest-amd64"
- "ghcr.io/conductorone/baton-broadcom-sac:{{ .Version }}-amd64"
- "ghcr.io/conductorone/baton-broadcom-sac:latest-amd64"
build_flag_templates:
- "--platform=linux/amd64"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title=baton-example"
- "--label=org.opencontainers.image.title=baton-broadcom-sac"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source=https://github.com/conductorone/baton-example"
- "--label=org.opencontainers.image.source=https://github.com/conductorone/baton-broadcom-sac"
- use: buildx
goos: linux
goarch: arm64
image_templates:
- "ghcr.io/conductorone/baton-example:{{ .Version }}-arm64"
- "ghcr.io/conductorone/baton-example:latest-arm64"
- "ghcr.io/conductorone/baton-broadcom-sac:{{ .Version }}-arm64"
- "ghcr.io/conductorone/baton-broadcom-sac:latest-arm64"
build_flag_templates:
- "--platform=linux/arm64/v8"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title=baton-example"
- "--label=org.opencontainers.image.title=baton-broadcom-sac"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source=https://github.com/conductorone/baton-example"
- "--label=org.opencontainers.image.source=https://github.com/conductorone/baton-broadcom-sac"
docker_manifests:
- name_template: ghcr.io/conductorone/baton-example:{{ .Version }}
- name_template: ghcr.io/conductorone/baton-broadcom-sac:{{ .Version }}
image_templates:
- ghcr.io/conductorone/baton-example:{{ .Version }}-amd64
- ghcr.io/conductorone/baton-example:{{ .Version }}-arm64
- name_template: ghcr.io/conductorone/baton-example:latest
- ghcr.io/conductorone/baton-broadcom-sac:{{ .Version }}-amd64
- ghcr.io/conductorone/baton-broadcom-sac:{{ .Version }}-arm64
- name_template: ghcr.io/conductorone/baton-broadcom-sac:latest
image_templates:
- ghcr.io/conductorone/baton-example:latest-amd64
- ghcr.io/conductorone/baton-example:latest-arm64
- ghcr.io/conductorone/baton-broadcom-sac:latest-amd64
- ghcr.io/conductorone/baton-broadcom-sac:latest-arm64
checksum:
disable: true
release:
Expand Down
22 changes: 11 additions & 11 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
project_name: baton-example
project_name: baton-broadcom-sac
builds:
- binary: baton-example
- binary: baton-broadcom-sac
env:
- CGO_ENABLED=0
id: linux
main: ./cmd/baton-example
main: ./cmd/baton-broadcom-sac
goos:
- linux
goarch:
- amd64
- arm64
- binary: baton-example
- binary: baton-broadcom-sac
env:
- CGO_ENABLED=0
id: macos-amd64
main: ./cmd/baton-example
main: ./cmd/baton-broadcom-sac
goos:
- darwin
goarch:
- amd64
hooks:
post:
- gon .gon-amd64.json
- mv dist/baton-example-darwin-amd64.signed.zip dist/macos-amd64_darwin_amd64_v1/baton-example
- binary: baton-example
- mv dist/baton-broadcom-sac-darwin-amd64.signed.zip dist/macos-amd64_darwin_amd64_v1/baton-broadcom-sac
- binary: baton-broadcom-sac
env:
- CGO_ENABLED=0
id: macos-arm64
main: ./cmd/baton-example
main: ./cmd/baton-broadcom-sac
goos:
- darwin
goarch:
- arm64
hooks:
post:
- gon .gon-arm64.json
- mv dist/baton-example-darwin-arm64.signed.zip dist/macos-arm64_darwin_arm64/baton-example
- mv dist/baton-broadcom-sac-darwin-arm64.signed.zip dist/macos-arm64_darwin_arm64/baton-broadcom-sac
archives:
- id: linux-archive
builds:
Expand Down Expand Up @@ -71,9 +71,9 @@ brews:
folder: Formula
homepage: https://conductorone.com
test: |
system "#{bin}/baton-example -v"
system "#{bin}/baton-broadcom-sac -v"
install: |-
bin.install "baton-example"
bin.install "baton-broadcom-sac"
changelog:
filters:
exclude:
Expand Down
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
GOOS = $(shell go env GOOS)
GOARCH = $(shell go env GOARCH)
BUILD_DIR = dist/${GOOS}_${GOARCH}
OUTPUT_PATH = ${BUILD_DIR}/baton-example

ifeq ($(GOOS),windows)
OUTPUT_PATH = ${BUILD_DIR}/baton-broadcom-sac.exe
else
OUTPUT_PATH = ${BUILD_DIR}/baton-broadcom-sac
endif

.PHONY: build
build:
rm -f ${OUTPUT_PATH}
mkdir -p ${BUILD_DIR}
go build -o ${OUTPUT_PATH} cmd/baton-example/*.go
go build -o ${OUTPUT_PATH} ./cmd/baton-broadcom-sac

.PHONY: update-deps
update-deps:
Expand Down
24 changes: 10 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,16 @@ Available Commands:
help Help about any command

Flags:
--client-id string The client ID used to authenticate with ConductorOne ($BATON_CLIENT_ID)
--client-secret string The client secret used to authenticate with ConductorOne ($BATON_CLIENT_SECRET)
-f, --file string The path to the c1z file to sync with ($BATON_FILE) (default "sync.c1z")
--grant-entitlement string The entitlement to grant to the supplied principal ($BATON_GRANT_ENTITLEMENT)
--grant-principal string The resource to grant the entitlement to ($BATON_GRANT_PRINCIPAL)
--grant-principal-type string The resource type of the principal to grant the entitlement to ($BATON_GRANT_PRINCIPAL_TYPE)
-h, --help help for baton-example
--log-format string The output format for logs: json, console ($BATON_LOG_FORMAT) (default "json")
--log-level string The log level: debug, info, warn, error ($BATON_LOG_LEVEL) (default "info")
--password string Password for your Broadcom SAC instance. ($BATON_PASSWORD)
--revoke-grant string The grant to revoke ($BATON_REVOKE_GRANT)
--tenant string Name of your Broadcom SAC tenant. ($BATON_TENANT)
--username string Username for your Broadcom SAC instance. ($BATON_USERNAME)
-v, --version version for baton-example
--client-id string The client ID used to authenticate with ConductorOne ($BATON_CLIENT_ID)
--client-secret string The client secret used to authenticate with ConductorOne ($BATON_CLIENT_SECRET)
-f, --file string The path to the c1z file to sync with ($BATON_FILE) (default "sync.c1z")
-h, --help help for baton-broadcom-sac
--log-format string The output format for logs: json, console ($BATON_LOG_FORMAT) (default "json")
--log-level string The log level: debug, info, warn, error ($BATON_LOG_LEVEL) (default "info")
--password string Password for your Broadcom SAC instance. ($BATON_PASSWORD)
--tenant string Name of your Broadcom SAC tenant. ($BATON_TENANT)
--username string Username for your Broadcom SAC instance. ($BATON_USERNAME)
-v, --version version for baton-broadcom-sac

Use "baton-broadcom-sac [command] --help" for more information about a command.

Expand Down
2 changes: 1 addition & 1 deletion cmd/baton-broadcom-sac/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"os"

"github.com/ConductorOne/baton-broadcom-sac/pkg/connector"
"github.com/conductorone/baton-broadcom-sac/pkg/connector"
"github.com/conductorone/baton-sdk/pkg/cli"
"github.com/conductorone/baton-sdk/pkg/connectorbuilder"
"github.com/conductorone/baton-sdk/pkg/types"
Expand Down
7 changes: 4 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module github.com/ConductorOne/baton-broadcom-sac
module github.com/conductorone/baton-broadcom-sac

go 1.19
go 1.20

require (
github.com/conductorone/baton-sdk v0.1.0
github.com/conductorone/baton-sdk v0.1.4
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
github.com/spf13/cobra v1.7.0
go.uber.org/zap v1.24.0
Expand Down Expand Up @@ -69,6 +69,7 @@ require (
golang.org/x/crypto v0.11.0 // indirect
golang.org/x/net v0.12.0 // indirect
golang.org/x/oauth2 v0.10.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.10.0 // indirect
golang.org/x/term v0.10.0 // indirect
golang.org/x/text v0.11.0 // indirect
Expand Down
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/conductorone/baton-sdk v0.1.0 h1:L/M6aQKvMIKK9Z+G9N7qCGSkbnuWI7D78JS08nHSn1E=
github.com/conductorone/baton-sdk v0.1.0/go.mod h1:/R7oz1BwrppCqxKKJrx8WH1CyIbEXiDo85QNzatYOvk=
github.com/conductorone/baton-sdk v0.1.4 h1:WP9NrwIh8TQQ2A5RBkosuObNOnhpJDJsU1oyFz7b/GE=
github.com/conductorone/baton-sdk v0.1.4/go.mod h1:lU1sLusR2oqts/k5BvYhoNKQ4Nl9qG8slJD/YEcKt9E=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
Expand Down Expand Up @@ -418,6 +418,8 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
Expand Down
2 changes: 1 addition & 1 deletion pkg/connector/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

sac "github.com/ConductorOne/baton-broadcom-sac/pkg/sac"
sac "github.com/conductorone/baton-broadcom-sac/pkg/sac"
v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2"
"github.com/conductorone/baton-sdk/pkg/annotations"
"github.com/conductorone/baton-sdk/pkg/pagination"
Expand Down
2 changes: 1 addition & 1 deletion pkg/connector/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"io"

sac "github.com/ConductorOne/baton-broadcom-sac/pkg/sac"
sac "github.com/conductorone/baton-broadcom-sac/pkg/sac"
v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2"
"github.com/conductorone/baton-sdk/pkg/annotations"
"github.com/conductorone/baton-sdk/pkg/connectorbuilder"
Expand Down
2 changes: 1 addition & 1 deletion pkg/connector/groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

"github.com/ConductorOne/baton-broadcom-sac/pkg/sac"
"github.com/conductorone/baton-broadcom-sac/pkg/sac"
v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2"
"github.com/conductorone/baton-sdk/pkg/annotations"
"github.com/conductorone/baton-sdk/pkg/pagination"
Expand Down
2 changes: 1 addition & 1 deletion pkg/connector/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package connector
import (
"context"

sac "github.com/ConductorOne/baton-broadcom-sac/pkg/sac"
sac "github.com/conductorone/baton-broadcom-sac/pkg/sac"
v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2"
"github.com/conductorone/baton-sdk/pkg/annotations"
"github.com/conductorone/baton-sdk/pkg/pagination"
Expand Down

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

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

Loading
Loading