This file contains hidden or 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
| package transform | |
| import ( | |
| "reflect" | |
| "strings" | |
| "time" | |
| ) | |
| const ( | |
| tagName = "firestore" |
This file contains hidden or 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
| name: Bump version in git | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: |
This file contains hidden or 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
| [ | |
| { | |
| "constant": true, | |
| "inputs": [], | |
| "name": "name", | |
| "outputs": [ | |
| { | |
| "internalType": "string", | |
| "name": "", | |
| "type": "string" |
This file contains hidden or 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
| package main | |
| import ( | |
| "io" | |
| "log" | |
| "net/http" | |
| "os" | |
| ) | |
| func hello(w http.ResponseWriter, r *http.Request) { |
This file contains hidden or 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
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "log" | |
| "sync" | |
| nats "github.com/nats-io/nats.go" | |
| ) |
This file contains hidden or 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
| asyncapi: 2.0.0 | |
| info: | |
| title: Hello world app | |
| version: '0.1.0' | |
| channels: | |
| goodbye: | |
| subscribe: | |
| message: | |
| payload: | |
| type: string |
This file contains hidden or 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
| # build stage | |
| FROM golang:alpine AS build-env | |
| RUN apk --no-cache add build-base git bzr mercurial gcc | |
| ADD . /src | |
| RUN cd /src && go build -o goapp | |
| # final stage | |
| FROM alpine | |
| WORKDIR /app | |
| COPY --from=build-env /src/goapp /app/ |
This file contains hidden or 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
| steps: | |
| - name: 'gcr.io/cloud-builders/docker' | |
| args: ['build', '-t', 'gcr.io/$PROJECT_ID/hello:$SHORT_SHA', '.'] | |
| - name: 'gcr.io/cloud-builders/docker' | |
| args: ['tag', 'gcr.io/$PROJECT_ID/hello:$SHORT_SHA', 'gcr.io/$PROJECT_ID/hello:latest'] | |
| - name: 'gcr.io/cloud-builders/docker' | |
| args: ['tag', 'gcr.io/$PROJECT_ID/hello:$SHORT_SHA', 'gcr.io/$PROJECT_ID/hello:$BRANCH_NAME'] | |
| - name: 'gcr.io/cloud-builders/docker' | |
| args: ['push', 'gcr.io/$PROJECT_ID/hello:$SHORT_SHA'] | |
| - name: 'gcr.io/cloud-builders/docker' |
This file contains hidden or 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
| // Slightly modified from ETH website | |
| pragma solidity ^0.4.24; | |
| contract MyToken { | |
| /* This creates an array with all balances */ | |
| mapping (address => uint256) public balanceOf; | |
| uint256 public totalSupply; | |
| /* Initializes contract with initial supply tokens to the creator of the contract */ |
This file contains hidden or 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
| # 1) BUILD API | |
| FROM golang:alpine AS build-go | |
| RUN apk --no-cache add git bzr mercurial | |
| ENV D=/go/src/github.com/USERNAME/REPONAME | |
| # deps - using the closest thing to an official dependency tool: https://github.com/golang/dep | |
| RUN go get -u github.com/golang/dep/... | |
| ADD ./api/Gopkg.* $D/api/ | |
| RUN cd $D/api && dep ensure -v --vendor-only | |
| # build | |
| ADD ./api $D/api |
NewerOlder