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
FROM lambci/lambda-base:build | |
RUN yum makecache fast; yum clean all && yum -y update && yum -y upgrade; yum clean all && \ | |
yum install -y yum-plugin-ovl; yum clean all && yum -y groupinstall "Development Tools"; yum clean all | |
RUN yum -y install gcc gcc-c++ make pkgconfig wget | |
RUN openssl version -a | |
RUN wget https://github.com/neo4j-drivers/seabolt/releases/download/v1.7.4/seabolt-1.7.4-Linux-centos-7.tar.gz | |
RUN tar zxvf seabolt-1.7.4-Linux-centos-7.tar.gz --strip-components=1 -C / | |
RUN mkdir -p /opt/lib |
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
# create a directory | |
mkdir -p layer | |
# build the image | |
docker build -t seabolt-base . | |
# copy the contents to the layer directory | |
CONTAINER=$(docker run -d seabolt-base false) | |
docker cp $CONTAINER:/opt/lib ./layer | |
docker rm $CONTAINER |
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
service: neo4j-lambda-connector # update this with your service name | |
frameworkVersion: ">=1.28.0 <2.0.0" | |
# provide appropriate values | |
provider: | |
name: aws | |
runtime: go1.x | |
stage: dev |
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
openapi: 3.0.0 | |
info: | |
version: "1.0.0" | |
title: Pet Adoption Store | |
description: Server for Pet Adoption | |
paths: | |
"/category": | |
post: | |
tags: |
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
openapi: 3.0.1 # Open API version | |
info: # General information | |
title: Pet Adoption | |
version: 1.0.0 | |
description: API for Go Chronicles microservice series | |
tags: | |
- name: Pet | |
description: Add and list Pets | |
# all services will be | |
# defined under "paths" |
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
components: # define schemas under this section | |
schemas: | |
Category: # create a category schema | |
description: Category of pets | |
type: object # this can correspond to a JSON object | |
properties: # define the properties in the object | |
id: | |
type: integer # define the type of object | |
example: 1 # give an example for better documentation | |
categoryName: |
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
paths: # all routes go under this | |
"/pet": | |
post: # define the type ie get/post/put/delete | |
tags: | |
- Pet | |
summary: Add a new pet to the store | |
requestBody: # define the request body under this | |
content: | |
application/json: # this shows that the request body is a JSON object | |
schema: |
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
paths: | |
"/pet": | |
get: | |
parameters: | |
- in: query # defines the query parameter that should be sent which is the category id | |
name: categoryId | |
schema: | |
type: integer | |
example: 1 | |
required: true |
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
CREATE TABLE "category" ( | |
"id" int PRIMARY KEY, | |
"category_name" varchar | |
); | |
CREATE TABLE "breed" ( | |
"id" int, | |
"breed_name" varchar, | |
"category_id" int, | |
PRIMARY KEY ("id", "category_id") |
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
package postgres | |
import ( | |
"database/sql" | |
"fmt" | |
//for connecting to db | |
_ "github.com/lib/pq" | |
) | |
const ( |
OlderNewer