-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from temporalio/abhinav/addReadme
Add readme, license and a build ci.
- Loading branch information
Showing
4 changed files
with
65 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Build | ||
on: push | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21' | ||
check-latest: true | ||
- name: Install Protoc | ||
uses: arduino/setup-protoc@v2 | ||
- name: Validate and build go bindings from the proto files | ||
run: make ci-build | ||
env: | ||
BUF_INPUT_HTTPS_USERNAME: ${{github.actor}} | ||
BUF_INPUT_HTTPS_PASSWORD: ${{github.token}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License | ||
|
||
Copyright (c) 2023 Temporal Technologies Inc. All rights reserved. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ $(VERBOSE).SILENT: | |
ci-build: install proto | ||
|
||
# Install dependencies. | ||
install: buf-install openapiv2-install | ||
install: buf-install grpc-install openapiv2-install | ||
|
||
# Run all linters and compile proto files. | ||
proto: grpc | ||
|
@@ -24,7 +24,7 @@ $(PROTO_OUT): | |
mkdir $(PROTO_OUT) | ||
|
||
##### Compile proto files for go ##### | ||
grpc: buf-lint go-grpc | ||
grpc: buf-lint buf-breaking go-grpc | ||
|
||
go-grpc: clean $(PROTO_OUT) | ||
printf $(COLOR) "Compile for go-gRPC..." | ||
|
@@ -35,8 +35,13 @@ buf-install: | |
printf $(COLOR) "Install/update buf..." | ||
go install github.com/bufbuild/buf/cmd/[email protected] | ||
|
||
grpc-install: | ||
printf $(COLOR) "Install/update go and grpc protoc gen ..." | ||
go install google.golang.org/protobuf/cmd/[email protected] | ||
go install google.golang.org/grpc/cmd/[email protected] | ||
|
||
openapiv2-install: | ||
printf $(COLOR) "Install/update ..." | ||
printf $(COLOR) "Install/update openapiv2 protoc gen..." | ||
go install github.com/grpc-ecosystem/grpc-gateway/v2/[email protected] | ||
|
||
##### Linters ##### | ||
|
@@ -45,8 +50,8 @@ buf-lint: | |
buf lint | ||
|
||
buf-breaking: | ||
@printf $(COLOR) "Run buf breaking changes check against master branch..." | ||
buf breaking --against '.git#branch=main' | ||
@printf $(COLOR) "Run buf breaking changes check against main branch..." | ||
buf breaking --against 'https://github.com/temporalio/api-cloud.git#branch=main' | ||
|
||
##### Clean ##### | ||
clean: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Temporal cloud api proto files | ||
|
||
## How to use | ||
|
||
Copy over the protobuf files under [temporal](temporal) directory to the project directory and then use [grpc](https://grpc.io/docs/) to compile and generate code in the desired programming language. | ||
|
||
## URL | ||
|
||
The grpc URL the clients should connect to: | ||
``` | ||
saas-api.tmprl.cloud:443 | ||
``` | ||
|
||
## Samples | ||
|
||
Refer [cloud-samples-go](https://github.com/temporalio/cloud-samples-go) repository for demonstration on how a project can copy and build Go clients. |