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 ( | |
"fmt" | |
"github.com/aws/aws-lambda-go/lambda" | |
) | |
func main() { | |
lambda.Start(handler) | |
} |
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 sftpclient | |
import ( | |
"fmt" | |
"github.com/pkg/sftp" | |
"golang.org/x/crypto/ssh" | |
"net" | |
"time" | |
) |
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
func handle(f func(*gin.Context) (interface{}, int, error)) func(*gin.Context) { | |
return func(gc *gin.Context) { | |
// very complex code | |
} |
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" | |
"github.com/gorilla/mux" | |
"log" | |
"net/http" | |
) | |
type Response struct { |
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
func saveSomething(w http.ResponseWriter, r *http.Request) { | |
// add json and whatever header | |
// ... | |
// do some auth | |
// ... | |
// do some error handling | |
// ... |
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
FROM alpine:latest | |
RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/* | |
ADD crp-app1 / | |
CMD ["/crp-app1"] |
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 ( | |
"fmt" | |
"net/http" | |
) | |
// handleFoodApi will take care any data related to food | |
func handleFoodApi(w http.ResponseWriter, r *http.Request) { | |
w.Write([]byte(`{"success":true, "data":"SECRET_INGREDIENT"}`)) |
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 ( | |
"fmt" | |
"net/http" | |
) | |
// handleMemberAPI will take care any data related to member | |
func handleMemberAPI(w http.ResponseWriter, r *http.Request) { | |
w.Write([]byte(`{"success":true, "data":"SECRET_DATA"}`)) |
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
FROM alpine:latest | |
RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/* | |
ADD ploutos-backend / | |
CMD ["/ploutos-backend"] |
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
FROM scratch | |
ADD ploutos-backend / | |
CMD ["/ploutos-backend"] |