sdk-csharp's People
sdk-csharp's Issues
Transfer destination issue
Hi,
Not sure if this is something I should report here but like 2 days ago I was retrieving transfer destination list just fine, now it returns exception: "One or more errors occurred. (Status(StatusCode=Unknown, Detail=""))".
var wiselyMember = _generateTokenClient.Generate().GetMemberBlocking(DiInstaller.BomadMemberId);
var memberToAccess = wiselyMember.ForAccessToken("ta:9eMMVJmCJLZD9fFqxEpuqDXX73hV4y8jnGwryE8QTBHt:5zKtXEAq");
var accounts = memberToAccess.GetAccountsBlocking();
var transferEndpoint = memberToAccess.ResolveTransferDestinationsBlocking(accounts[0].Id()); // <== AccountId is returned from .Id()
Thanks for your help.
Building Protos on windows
The ruby file doesnt seem to work on windows. I have written a powershell version
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor [System.Net.SecurityProtocolType]::Tls12
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}
$tokenProtosVersion = "1.1.84"
$rpcProtosVersion = "1.1.38"
Add-Type -AssemblyName System.IO.Compression.FileSystem
function Unzip
{
param([string]$zipfile, [string]$outpath, [string] $filterPath, [string] $filter)
$temp = "temp"
write-host "Extract $zipfile to $temp"
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $temp)
New-Item -ItemType Directory -Force -Path $outpath
#write-host "Copy-Item $temp$filterPath/$filter $outpath"
Copy-Item $temp$filterPath/$filter $outpath
Remove-Item $temp -Force -Recurse
}
function DownloadFile([string] $url, [string] $output)
{
write-host "`Downloading $url to $output ..."
$wc = New-Object System.Net.WebClient
$wc.DownloadFile($url, $output)
write-host "Download complete"
}
function DownloadPackage([string] $path, [string] $name, [string] $type, [string] $version)
{
$file = "$name-$type-$version.jar"
$url = "https://token.jfrog.io/token/libs-release/$path/$name-$type/$version/$file"
$output = "$PSScriptRoot\$file"
DownloadFile -url $url -output $output
return $file
}
function FetchProtos{
Remove-Item protos/common/*.proto
Remove-Item protos/external -Force -Recurse
$file = DownloadPackage "io/token/proto" "tokenio-proto" "external" $tokenProtosVersion
write-host "unzipping $file"
Unzip $file "protos/external/gateway" "/gateway" "*.proto"
Remove-Item $file
$file = DownloadPackage "io/token/proto" "tokenio-proto" "common" $tokenProtosVersion
write-host "unzipping $file"
Unzip $file "protos/common" "" "*.proto"
Unzip $file "protos/common/google/api" "/google/api" "*.proto"
Unzip $file "protos/common/google/protobuf" "/google/protobuf" "*.proto"
Remove-Item $file
$file = DownloadPackage "io/token/rpc" "tokenio-rpc" "proto" $rpcProtosVersion
write-host "unzipping $file"
Unzip $file "protos/extensions" "/extensions" "*.proto" # /extensions is not defined in the .rb file
Remove-Item $file
}
function GenerateProtos([string] $pathToProtos, [string] $outDir)
{
$src = "$PSScriptRoot\protos"
$protocDir = "tools\windows_x64"
$protoc = "$protocDir\protoc.exe"
$plugin = "$protocDir\grpc_csharp_plugin.exe"
New-Item -ItemType Directory -Force -Path $outDir
$files = Get-ChildItem "$src\$pathToProtos"
foreach($protoFile in $files){
write-host "Building $protoFile"
$command = "$protoc --plugin=protoc-gen-grpc=$plugin --csharp_out=$outDir --grpc_out=$outDir -I=$src\common -I=$src\external -I=$src -I=$src\$pathToProtos $protoFile"
#write-host $command
Invoke-Expression $command
}
Write-Host "built"
}
# download an extract protos from the jar files
FetchProtos
$dir = "$PSScriptRoot\sdk\generated"
Remove-Item $dir -Force -Recurse
write-host "Building protos into $dir"
#Compile the proto files to c#
GenerateProtos "common" $dir
GenerateProtos "common/google/api" $dir
GenerateProtos "external/gateway" $dir
GenerateProtos "extensions" $dir
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.