Giter VIP home page Giter VIP logo

gateway-go's Introduction

gateway-go

Build Status

Get it from the Snap Store

You can install the pre-compiled binary (in several different ways), use Docker.

Here are the steps for each of them:

Install the pre-compiled binary

openwrt/entware/optware (Usually on the router):

opkg update
opkg install gateway-go

homebrew tap :

$ brew install OpenIoTHub/tap/gateway-go

homebrew (may not be the latest version):

$ brew install gateway-go

homebrew pr gateway-go

config file :

/usr/local/etc/gateway-go/gateway-go.yaml

snapcraft:

$ sudo snap install gateway-go

config file :

/root/snap/gateway-go/current/gateway-go.yaml

scoop:

$ scoop bucket add OpenIoTHub https://github.com/OpenIoTHub/scoop-bucket.git
$ scoop install gateway-go

deb/rpm:

Download the .deb or .rpm from the releases page and install with dpkg -i and rpm -i respectively.

config file :

/etc/gateway-go/gateway-go.yaml

manually:

Download the pre-compiled binaries from the releases page and copy to the desired location.

Running with Docker

You can also use it within a Docker container. To do that, you'll need to execute something more-or-less like the following:

$ docker run -it --net=host openiothub/gateway-go:latest -t <your Token>

Note that the image will almost always have the last stable Go version.

Build dynamic/static Library

#build and push mobile lib
#install gomobile(at system cli)
go install golang.org/x/mobile/cmd/gobind@latest
go install golang.org/x/mobile/cmd/gomobile@latest
gomobile init
gomobile version
go get -u golang.org/x/mobile/...
#
export GO111MODULE="off"
gomobile bind -target=android  -o gateway.aar
gomobile bind -ldflags '-w -s -extldflags "-lresolve"' --target=ios,macos,iossimulator -o OpenIoTHubGateway.xcframework ./client
#
#https://gitee.com/OpenIoThub/mobile-lib-podspec
#git tag -a 0.0.1 -m '0.0.1'
#git pus --tags
#pod trunk push ./OpenIoTHubGateway.podspec --skip-import-validation --allow-warnings
#
mvn gpg:sign-and-deploy-file -DrepositoryId=ossrh -Dfile=gateway.aar -DpomFile=gateway.pom -Durl=https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/
mvn deploy:deploy-file -Dfile=client.aar -DgroupId=cloud.iothub -DartifactId=gateway -Dversion=0.0.1 -Dpackaging=aar -DrepositoryId=github -Durl=https://maven.pkg.github.com/OpenIoTHub/gateway-go
#for build windows dll
echo "building windows dll"
#brew install mingw-w64
#sudo apt-get install binutils-mingw-w64
# shellcheck disable=SC2034
export CGO_ENABLED=1
export CC=x86_64-w64-mingw32-gcc
export CXX=x86_64-w64-mingw32-g++
export GOOS=windows GOARCH=amd64
go build -tags windows -ldflags=-w -trimpath -o ./build/windows/gateway_amd64.dll -buildmode=c-shared main.go
#for build linux/android so file
echo "building linux/android so file"
#linux和Android共用动态链接库
export CGO_ENABLED=1
export GOARCH=amd64
export GOOS=linux
go build -tags linux -ldflags=-w -trimpath -o build/linux/libgateway_amd64.so -buildmode c-shared main.go
# shellcheck disable=SC2034
export CGO_ENABLED=1
export GOARCH=arm64
export GOOS=linux
#sudo apt install gcc-aarch64-linux-gnu
export CC=aarch64-linux-gnu-gcc
##sudo apt install g++-aarch64-linux-gnu
#export CXX=aarch64-linux-gnu-g++
##sudo apt-get install binutils-aarch64-linux-gnu
#export AR=aarch64-linux-gnu-ar
go build -tags linux -ldflags=-w -trimpath -o build/linux/libgateway_arm64.so -buildmode c-shared main.go

gateway-go's People

Contributors

chenrui333 avatar dependabot[bot] avatar iotserv avatar matteriot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gateway-go's Issues

check on the latest release

👋 just to check if gateway-go 0.1.97 is the latest release. If so, it did not get marked as latest release.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.