-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create build-proto.yml * Automatically build swift wrappers for the copied proto files * Create README.md * Update build-proto.yml * Initial push of the proto files * Action update * Updated proto files * New services * Updated proto wrappers * Reformat things * Update build-proto.yml * Update generate.bash
- Loading branch information
1 parent
ada24f9
commit 1afa954
Showing
46 changed files
with
6,123 additions
and
2,012 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,61 @@ | ||
name: Build Proto Files | ||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "proto/**" | ||
pull_request: | ||
paths: | ||
- "proto/**" | ||
- ".github/workflows/build-proto.yml" | ||
|
||
jobs: | ||
compile_proto: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.head_ref }} | ||
submodules: recursive | ||
- name: Install Protoc | ||
uses: arduino/setup-protoc@v1 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Configure git credentials | ||
uses: OleksiyRudenko/gha-git-credentials@v2 | ||
with: | ||
token: '${{ secrets.GITHUB_TOKEN }}' | ||
|
||
- uses: trinsic-id/protoc-gen-sdk@main | ||
id: buildsdkwrappers | ||
with: | ||
protoPath: ${{github.workspace}}/proto | ||
swiftPath: ${{github.workspace}}/Sources/Trinsic | ||
- name: Compile proto files | ||
run: ./generate.bash | ||
shell: bash | ||
|
||
- name: Commit changes | ||
uses: EndBug/add-and-commit@v9 | ||
id: commit_changes | ||
with: | ||
author_name: Mewmba | ||
author_email: [email protected] | ||
message: 'Generated code from proto files on branch ${{ github.head_ref }}' | ||
new_branch: 'mewmba-${{ github.head_ref }}-generated-protos' | ||
push: '--force --set-upstream origin mewmba-${{ github.head_ref }}-generated-protos' | ||
|
||
- name: pull-request | ||
uses: repo-sync/pull-request@v2 | ||
if: ${{ steps.commit_changes.outputs.committed == 'true' }} | ||
with: | ||
source_branch: "mewmba-${{ github.head_ref }}-generated-protos" # From previous step | ||
destination_branch: ${{ github.head_ref }} | ||
pr_title: "Generated Protos for ${{ github.head_ref }}" | ||
pr_body: ":rocket: Generated protos" | ||
pr_allow_empty: false | ||
github_token: ${{ secrets.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,48 @@ | ||
// | ||
// File.swift | ||
// | ||
// | ||
// Created by Tomislav Markovski on 11/30/21. | ||
// | ||
|
||
import Foundation | ||
import GRPC | ||
|
||
public class AccessManagementService: ServiceBase { | ||
var client: Services_Provider_V1_AccessManagementNIOClient? | ||
|
||
public init() { | ||
super.init(options: Sdk_Options_V1_ServiceOptions()) | ||
client = Services_Provider_V1_AccessManagementNIOClient(channel: createChannel()) | ||
} | ||
|
||
override public init(options: Sdk_Options_V1_ServiceOptions) { | ||
super.init(options: options) | ||
client = Services_Provider_V1_AccessManagementNIOClient(channel: createChannel()) | ||
} | ||
|
||
// BEGIN Code generated by protoc-gen-trinsic. DO NOT EDIT. | ||
// target: /Users/scott/Documents/GitHub/sdk-swift/Sources/Trinsic/AccessManagementService.swift | ||
|
||
@available(*, deprecated, message: "This method is experimental") | ||
public func addRoleAssignment(request: Services_Provider_V1_AddRoleAssignmentRequest) throws -> Services_Provider_V1_AddRoleAssignmentResponse { | ||
try client!.AddRoleAssignment(request, callOptions: try buildMetadata(request)) | ||
.response | ||
.wait() | ||
} | ||
|
||
@available(*, deprecated, message: "This method is experimental") | ||
public func removeRoleAssignment(request: Services_Provider_V1_RemoveRoleAssignmentRequest) throws -> Services_Provider_V1_RemoveRoleAssignmentResponse { | ||
try client!.RemoveRoleAssignment(request, callOptions: try buildMetadata(request)) | ||
.response | ||
.wait() | ||
} | ||
|
||
@available(*, deprecated, message: "This method is experimental") | ||
public func listRoleAssignments(request: Services_Provider_V1_ListRoleAssignmentsRequest) throws -> Services_Provider_V1_ListRoleAssignmentsResponse { | ||
try client!.ListRoleAssignments(request, callOptions: try buildMetadata(request)) | ||
.response | ||
.wait() | ||
} | ||
// END Code generated by protoc-gen-trinsic. DO NOT EDIT. | ||
} |
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
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
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
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,62 @@ | ||
// | ||
// File.swift | ||
// | ||
// | ||
// Created by Tomislav Markovski on 11/30/21. | ||
// | ||
|
||
import Foundation | ||
import GRPC | ||
|
||
public class FileManagementService: ServiceBase { | ||
var client: Services_Filemanagement_V1_FileManagementNIOClient? | ||
|
||
public init() { | ||
super.init(options: Sdk_Options_V1_ServiceOptions()) | ||
client = Services_Filemanagement_V1_FileManagementNIOClient(channel: createChannel()) | ||
} | ||
|
||
override public init(options: Sdk_Options_V1_ServiceOptions) { | ||
super.init(options: options) | ||
client = Services_Filemanagement_V1_FileManagementNIOClient(channel: createChannel()) | ||
} | ||
|
||
// BEGIN Code generated by protoc-gen-trinsic. DO NOT EDIT. | ||
// target: /Users/scott/Documents/GitHub/sdk-swift/Sources/Trinsic/FileManagementService.swift | ||
|
||
@available(*, deprecated, message: "This method is experimental") | ||
public func uploadFile(request: Services_Filemanagement_V1_UploadFileRequest) throws -> Services_Filemanagement_V1_UploadFileResponse { | ||
try client!.UploadFile(request, callOptions: try buildMetadata(request)) | ||
.response | ||
.wait() | ||
} | ||
|
||
@available(*, deprecated, message: "This method is experimental") | ||
public func getFile(request: Services_Filemanagement_V1_GetFileRequest) throws -> Services_Filemanagement_V1_GetFileResponse { | ||
try client!.GetFile(request, callOptions: try buildMetadata(request)) | ||
.response | ||
.wait() | ||
} | ||
|
||
@available(*, deprecated, message: "This method is experimental") | ||
public func deleteFile(request: Services_Filemanagement_V1_DeleteFileRequest) throws -> Services_Filemanagement_V1_DeleteFileResponse { | ||
try client!.DeleteFile(request, callOptions: try buildMetadata(request)) | ||
.response | ||
.wait() | ||
} | ||
|
||
@available(*, deprecated, message: "This method is experimental") | ||
public func listFiles(request: Services_Filemanagement_V1_ListFilesRequest) throws -> Services_Filemanagement_V1_ListFilesResponse { | ||
try client!.ListFiles(request, callOptions: try buildMetadata(request)) | ||
.response | ||
.wait() | ||
} | ||
|
||
@available(*, deprecated, message: "This method is experimental") | ||
public func getStorageStats(request: Services_Filemanagement_V1_GetStorageStatsRequest) throws -> Services_Filemanagement_V1_GetStorageStatsResponse { | ||
try client!.GetStorageStats(request, callOptions: try buildMetadata(request)) | ||
.response | ||
.wait() | ||
} | ||
// END Code generated by protoc-gen-trinsic. DO NOT EDIT. | ||
} |
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
Oops, something went wrong.