Skip to content

Commit

Permalink
fix: move to new org (#97)
Browse files Browse the repository at this point in the history
* chore: move to new org

* fix: caos -> zitadel lib

Co-authored-by: adlerhurst <silvan.reusser@gmail.com>
  • Loading branch information
fforootd and adlerhurst authored Apr 26, 2022
1 parent 2ddcb26 commit c7047c6
Show file tree
Hide file tree
Showing 36 changed files with 104 additions and 104 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/update-zitadel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
id: latest-tag
uses: oprypin/find-latest-tag@v1
with:
repository: caos/zitadel
repository: zitadel/zitadel
releases-only: true
- name: set tag
id: tag
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# ZITADEL GO

[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Release](https://github.com/caos/zitadel-go/workflows/Release/badge.svg)](https://github.com/caos/zitadel-go/actions)
[![license](https://badgen.net/github/license/caos/zitadel-go/)](https://github.com/caos/zitadel-go/blob/main/LICENSE)
[![release](https://badgen.net/github/release/caos/zitadel-go/stable)](https://github.com/caos/zitadel-go/releases)
[![Go Report Card](https://goreportcard.com/badge/github.com/caos/zitadel-go)](https://goreportcard.com/report/github.com/caos/zitadel-go)
[![codecov](https://codecov.io/gh/caos/zitadel-go/branch/main/graph/badge.svg)](https://codecov.io/gh/caos/zitadel-go)
[![Release](https://github.com/zitadel/zitadel-go/workflows/Release/badge.svg)](https://github.com/zitadel/zitadel-go/actions)
[![license](https://badgen.net/github/license/zitadel/zitadel-go/)](https://github.com/zitadel/zitadel-go/blob/main/LICENSE)
[![release](https://badgen.net/github/release/zitadel/zitadel-go/stable)](https://github.com/zitadel/zitadel-go/releases)
[![Go Report Card](https://goreportcard.com/badge/github.com/zitadel/zitadel-go)](https://goreportcard.com/report/github.com/zitadel/zitadel-go)
[![codecov](https://codecov.io/gh/zitadel/zitadel-go/branch/main/graph/badge.svg)](https://codecov.io/gh/zitadel/zitadel-go)

> This project is in alpha state. It can AND will continue breaking until version 1.0.0 is released
Go client library for the [ZITADEL](https://github.com/caos/zitadel) API.
Go client library for the [ZITADEL](https://github.com/zitadel/zitadel) API.

## Usage

Add the package to your go.mod by

```
go get github.com/caos/zitadel-go
go get github.com/zitadel/zitadel-go
```

...and check out the [examples](./example) in this repo or head over to our [docs website](https://docs.zitadel.ch/docs/quickstarts/introduction).
Expand Down
18 changes: 9 additions & 9 deletions build/zitadel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ RUN curl https://raw.githubusercontent.com/envoyproxy/protoc-gen-validate/v${VAL
&& curl https://raw.githubusercontent.com/googleapis/googleapis/master/google/api/field_behavior.proto --create-dirs -o include/google/api/field_behavior.proto

WORKDIR /zitadel
RUN git clone --depth 1 -b ${TAG_NAME} https://github.com/caos/zitadel . \
RUN git clone --depth 1 -b ${TAG_NAME} https://github.com/zitadel/zitadel . \
&& cp -r proto/* /proto/include \
&& cp -r internal/protoc/protoc-gen-authoption/authoption /proto/include

Expand All @@ -52,31 +52,31 @@ RUN git clone --depth 1 -b ${TAG_NAME} https://github.com/caos/zitadel . \
FROM golang:${GO_VERSION} as go-dep
COPY --from=base /proto/include /proto/include

WORKDIR /go/src/github.com/caos/zitadel-go
WORKDIR /go/src/github.com/zitadel/zitadel-go
RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.1.0
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.27.1

#######################
## Go base build
#######################
FROM go-dep as zitadel-client
ARG PROJECT_PATH=github.com/caos/zitadel-go/pkg/client
ARG PROJECT_PATH=github.com/zitadel/zitadel-go/pkg/client

COPY --from=base /proto /proto
COPY --from=base /usr/local/bin /usr/local/bin/.

COPY build/zitadel/generate-grpc-client.sh build/zitadel/generate-grpc-client.sh
RUN mkdir -p /go/src/github.com/caos/zitadel/pkg/grpc/authoption
RUN mkdir -p /go/src/github.com/zitadel/zitadel/pkg/grpc/authoption
## generate all pb files and copy them to a new directory
RUN ./build/zitadel/generate-grpc-client.sh ${PROJECT_PATH} \
&& mkdir /zitadel-api \
&& find /go/src/github.com/caos/zitadel-go/pkg/client/zitadel -iname '*.pb.go' -exec cp --parents \{\} /zitadel-api \; \
&& mv /go/src/github.com/caos/zitadel/pkg/grpc/admin/admin_grpc.pb.go /zitadel-api/go/src/github.com/caos/zitadel-go/pkg/client/zitadel/admin/ \
&& mv /go/src/github.com/caos/zitadel/pkg/grpc/auth/auth_grpc.pb.go /zitadel-api/go/src/github.com/caos/zitadel-go/pkg/client/zitadel/auth/ \
&& mv /go/src/github.com/caos/zitadel/pkg/grpc/management/management_grpc.pb.go /zitadel-api/go/src/github.com/caos/zitadel-go/pkg/client/zitadel/management/
&& find /go/src/github.com/zitadel/zitadel-go/pkg/client/zitadel -iname '*.pb.go' -exec cp --parents \{\} /zitadel-api \; \
&& mv /go/src/github.com/zitadel/zitadel/pkg/grpc/admin/admin_grpc.pb.go /zitadel-api/go/src/github.com/zitadel/zitadel-go/pkg/client/zitadel/admin/ \
&& mv /go/src/github.com/zitadel/zitadel/pkg/grpc/auth/auth_grpc.pb.go /zitadel-api/go/src/github.com/zitadel/zitadel-go/pkg/client/zitadel/auth/ \
&& mv /go/src/github.com/zitadel/zitadel/pkg/grpc/management/management_grpc.pb.go /zitadel-api/go/src/github.com/zitadel/zitadel-go/pkg/client/zitadel/management/
#######################
## prepare generated files for output
#######################
FROM scratch as zitadel-copy
ARG PROJECT_PATH
COPY --from=zitadel-client /zitadel-api/go/src/github.com/caos/zitadel-go/pkg/client/zitadel /zitadel
COPY --from=zitadel-client /zitadel-api/go/src/github.com/zitadel/zitadel-go/pkg/client/zitadel /zitadel
2 changes: 1 addition & 1 deletion build/zitadel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ For example: TAG_NAME=v1.0.0
use under project root:

```
DOCKER_BUILDKIT=1 docker build --target zitadel-copy -t zitadel-go:main --build-arg PROJECT_PATH=github.com/caos/zitadel-go/pkg/client --build-arg TAG_NAME=main -f build/zitadel/Dockerfile . -o ./pkg/client
DOCKER_BUILDKIT=1 docker build --target zitadel-copy -t zitadel-go:main --build-arg PROJECT_PATH=github.com/zitadel/zitadel-go/pkg/client --build-arg TAG_NAME=main -f build/zitadel/Dockerfile . -o ./pkg/client
```
2 changes: 1 addition & 1 deletion build/zitadel/generate-grpc-client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fi
protoc \
-I=/proto/include \
--go_opt=paths=source_relative \
--go_out /go/src/github.com/caos/zitadel/pkg/grpc \
--go_out /go/src/github.com/zitadel/zitadel/pkg/grpc \
/proto/include/authoption/options.proto

protoc \
Expand Down
8 changes: 4 additions & 4 deletions example/admin/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"flag"
"log"

"github.com/caos/oidc/pkg/oidc"
"github.com/zitadel/oidc/pkg/oidc"

"github.com/caos/zitadel-go/pkg/client/admin"
"github.com/caos/zitadel-go/pkg/client/zitadel"
pb "github.com/caos/zitadel-go/pkg/client/zitadel/admin"
"github.com/zitadel/zitadel-go/pkg/client/admin"
"github.com/zitadel/zitadel-go/pkg/client/zitadel"
pb "github.com/zitadel/zitadel-go/pkg/client/zitadel/admin"
)

var (
Expand Down
8 changes: 4 additions & 4 deletions example/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"context"
"log"

"github.com/caos/oidc/pkg/oidc"
"github.com/zitadel/oidc/pkg/oidc"

"github.com/caos/zitadel-go/pkg/client/auth"
"github.com/caos/zitadel-go/pkg/client/zitadel"
pb "github.com/caos/zitadel-go/pkg/client/zitadel/auth"
"github.com/zitadel/zitadel-go/pkg/client/auth"
"github.com/zitadel/zitadel-go/pkg/client/zitadel"
pb "github.com/zitadel/zitadel-go/pkg/client/zitadel/auth"
)

func main() {
Expand Down
6 changes: 3 additions & 3 deletions example/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"net/http"
"time"

http_mw "github.com/caos/zitadel-go/pkg/api/middleware/http"
"github.com/caos/zitadel-go/pkg/client"
"github.com/caos/zitadel-go/pkg/client/middleware"
http_mw "github.com/zitadel/zitadel-go/pkg/api/middleware/http"
"github.com/zitadel/zitadel-go/pkg/client"
"github.com/zitadel/zitadel-go/pkg/client/middleware"
)

func main() {
Expand Down
10 changes: 5 additions & 5 deletions example/mgmt/mgmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import (
"flag"
"log"

"github.com/caos/oidc/pkg/oidc"
"github.com/zitadel/oidc/pkg/oidc"

"github.com/caos/zitadel-go/pkg/client/management"
"github.com/caos/zitadel-go/pkg/client/middleware"
"github.com/caos/zitadel-go/pkg/client/zitadel"
pb "github.com/caos/zitadel-go/pkg/client/zitadel/management"
"github.com/zitadel/zitadel-go/pkg/client/management"
"github.com/zitadel/zitadel-go/pkg/client/middleware"
"github.com/zitadel/zitadel-go/pkg/client/zitadel"
pb "github.com/zitadel/zitadel-go/pkg/client/zitadel/management"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module github.com/caos/zitadel-go
module github.com/zitadel/zitadel-go

go 1.16

require (
github.com/caos/oidc v1.3.0
github.com/envoyproxy/protoc-gen-validate v0.6.7
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.10.0
github.com/zitadel/oidc v1.3.1
golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a
google.golang.org/genproto v0.0.0-20220317150908-0efb43f6373e
google.golang.org/grpc v1.45.0
Expand Down
6 changes: 3 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/caos/logging v0.3.1/go.mod h1:B8QNS0WDmR2Keac52Fw+XN4ZJkzLDGrcRIPB2Ux4uRo=
github.com/caos/oidc v1.3.0 h1:6I4S5XPjFQZx/GZVZaRvemFWYTlO27UvZILrWYL+P60=
github.com/caos/oidc v1.3.0/go.mod h1:/EWr+09pcXQbSpCgGna6D+d726NtFAR4KRdG9D0x3OE=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
Expand Down Expand Up @@ -182,6 +179,9 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/zitadel/logging v0.3.3/go.mod h1:aPpLQhE+v6ocNK0TWrBrd363hZ95KcI17Q1ixAQwZF0=
github.com/zitadel/oidc v1.3.1 h1:sW7aKQdqfPn5bV2ObwWNyKe37xDkRO5ZuFjeofuIMW8=
github.com/zitadel/oidc v1.3.1/go.mod h1:4WVRo1liC6JMhTEf48fHbrt5iIatphwFZgWXRwuE/TA=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
Expand Down
4 changes: 2 additions & 2 deletions pkg/api/middleware/grpc/introspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package middleware
import (
"context"

"github.com/caos/oidc/pkg/client/rs"
"github.com/grpc-ecosystem/go-grpc-middleware/util/metautils"
"github.com/zitadel/oidc/pkg/client/rs"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"

"github.com/caos/zitadel-go/pkg/api/middleware"
"github.com/zitadel/zitadel-go/pkg/api/middleware"
)

type IntrospectionInterceptor struct {
Expand Down
4 changes: 2 additions & 2 deletions pkg/api/middleware/http/introspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"log"
"net/http"

"github.com/caos/oidc/pkg/client/rs"
"github.com/zitadel/oidc/pkg/client/rs"

"github.com/caos/zitadel-go/pkg/api/middleware"
"github.com/zitadel/zitadel-go/pkg/api/middleware"
)

type IntrospectionInterceptor struct {
Expand Down
4 changes: 2 additions & 2 deletions pkg/api/middleware/introspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"errors"
"strings"

"github.com/caos/oidc/pkg/client/rs"
"github.com/caos/oidc/pkg/oidc"
"github.com/zitadel/oidc/pkg/client/rs"
"github.com/zitadel/oidc/pkg/oidc"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions pkg/client/admin/client.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package admin

import (
"github.com/caos/zitadel-go/pkg/client/zitadel"
"github.com/caos/zitadel-go/pkg/client/zitadel/admin"
"github.com/zitadel/zitadel-go/pkg/client/zitadel"
"github.com/zitadel/zitadel-go/pkg/client/zitadel/admin"
)

type Client struct {
Expand Down
4 changes: 2 additions & 2 deletions pkg/client/auth/client.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package auth

import (
"github.com/caos/zitadel-go/pkg/client/zitadel"
"github.com/caos/zitadel-go/pkg/client/zitadel/auth"
"github.com/zitadel/zitadel-go/pkg/client/zitadel"
"github.com/zitadel/zitadel-go/pkg/client/zitadel/auth"
)

type Client struct {
Expand Down
4 changes: 2 additions & 2 deletions pkg/client/management/client.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package management

import (
"github.com/caos/zitadel-go/pkg/client/zitadel"
"github.com/caos/zitadel-go/pkg/client/zitadel/management"
"github.com/zitadel/zitadel-go/pkg/client/zitadel"
"github.com/zitadel/zitadel-go/pkg/client/zitadel/management"
)

type Client struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/client/middleware/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"os"

"github.com/caos/oidc/pkg/client/profile"
"github.com/zitadel/oidc/pkg/client/profile"
"golang.org/x/oauth2"
"google.golang.org/grpc"
"google.golang.org/grpc/metadata"
Expand Down
2 changes: 1 addition & 1 deletion pkg/client/middleware/org.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"google.golang.org/grpc"
"google.golang.org/grpc/metadata"

"github.com/caos/zitadel-go/pkg/client"
"github.com/zitadel/zitadel-go/pkg/client"
)

type OrgInterceptor struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/client/zitadel/action/action.pb.go

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

18 changes: 9 additions & 9 deletions pkg/client/zitadel/admin/admin.pb.go

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

4 changes: 2 additions & 2 deletions pkg/client/zitadel/app/app.pb.go

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

16 changes: 8 additions & 8 deletions pkg/client/zitadel/auth/auth.pb.go

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

2 changes: 1 addition & 1 deletion pkg/client/zitadel/authn/auth_n_key.pb.go

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

2 changes: 1 addition & 1 deletion pkg/client/zitadel/change/change.pb.go

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

6 changes: 3 additions & 3 deletions pkg/client/zitadel/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import (
"crypto/x509"
"strings"

"github.com/caos/oidc/pkg/client/profile"
"github.com/zitadel/oidc/pkg/client/profile"
"golang.org/x/oauth2"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"

"github.com/caos/zitadel-go/pkg/client"
"github.com/caos/zitadel-go/pkg/client/middleware"
"github.com/zitadel/zitadel-go/pkg/client"
"github.com/zitadel/zitadel-go/pkg/client/middleware"
)

type Connection struct {
Expand Down
Loading

0 comments on commit c7047c6

Please sign in to comment.