Loading go-apps/meep-app-enablement/entrypoint.sh +9 −4 Original line number Diff line number Diff line Loading @@ -3,6 +3,13 @@ set -e echo "MEEP_HOST_URL: ${MEEP_HOST_URL}" echo "MEEP_SANDBOX_NAME: ${MEEP_SANDBOX_NAME}" echo "MEEP_MEP_NAME: ${MEEP_MEP_NAME}" if [[ ! -z "${MEEP_MEP_NAME}" ]]; then svcPath="${MEEP_SANDBOX_NAME}/${MEEP_MEP_NAME}" else svcPath="${MEEP_SANDBOX_NAME}" fi # Update API yaml basepaths to enable "Try-it-out" feature # OAS2: Set relative path to sandbox name + endpoint path (origin will be derived from browser URL) Loading @@ -10,14 +17,12 @@ echo "MEEP_SANDBOX_NAME: ${MEEP_SANDBOX_NAME}" setBasepath() { # OAS3 hostName=$(echo "${MEEP_HOST_URL}" | sed -E 's/^\s*.*:\/\///g') #newHostName=${hostName}/${MEEP_SANDBOX_NAME} echo "Replacing [localhost] with ${hostName} to url in: '$1'" sed -i "s,localhost,${hostName},g" "$1"; # OAS2 and OAS3 echo "Replacing [sandboxname] with ${MEEP_SANDBOX_NAME} to basepath or url in: '$1'" #sed -i 's,basePath: \"/\?,basePath: \"/'${MEEP_SANDBOX_NAME}'/,' $1; sed -i "s,sandboxname,${MEEP_SANDBOX_NAME},g" "$1"; echo "Replacing [sandboxname] with ${svcPath} to basepath or url in: '$1'" sed -i "s,sandboxname,${svcPath},g" "$1"; } # Set basepath for API files Loading go-apps/meep-app-enablement/main.go +1 −0 Original line number Diff line number Diff line Loading @@ -85,6 +85,7 @@ func main() { count := 0 for { if !run { server.Stop() log.Info("Ran for ", count, " seconds") break } Loading go-apps/meep-app-enablement/server/app-enablement.go +11 −1 Original line number Diff line number Diff line Loading @@ -178,9 +178,19 @@ func Run() (err error) { // Stop - Stop App Enablement func Stop() { if mqLocal != nil { mqLocal.UnregisterHandler(handlerId) } // Remove APIs if apiMgr != nil { err := apiMgr.RemoveApis() if err != nil { log.Error("Failed to remove APIs with err: ", err.Error()) } } } // Message Queue handler func msgHandler(msg *mq.Msg, userData interface{}) { switch msg.Message { Loading go-apps/meep-auth-svc/entrypoint.sh +9 −4 Original line number Diff line number Diff line Loading @@ -3,6 +3,13 @@ set -e echo "MEEP_HOST_URL: ${MEEP_HOST_URL}" echo "MEEP_SANDBOX_NAME: ${MEEP_SANDBOX_NAME}" echo "MEEP_MEP_NAME: ${MEEP_MEP_NAME}" if [[ ! -z "${MEEP_MEP_NAME}" ]]; then svcPath="${MEEP_SANDBOX_NAME}/${MEEP_MEP_NAME}" else svcPath="${MEEP_SANDBOX_NAME}" fi # Update API yaml basepaths to enable "Try-it-out" feature # OAS2: Set relative path to sandbox name + endpoint path (origin will be derived from browser URL) Loading @@ -10,14 +17,12 @@ echo "MEEP_SANDBOX_NAME: ${MEEP_SANDBOX_NAME}" setBasepath() { # OAS3 hostName=$(echo "${MEEP_HOST_URL}" | sed -E 's/^\s*.*:\/\///g') #newHostName=${hostName}/${MEEP_SANDBOX_NAME} echo "Replacing [localhost] with ${hostName} to url in: '$1'" sed -i "s,localhost,${hostName},g" "$1"; # OAS2 and OAS3 echo "Replacing [sandboxname] with ${MEEP_SANDBOX_NAME} to basepath or url in: '$1'" #sed -i 's,basePath: \"/\?,basePath: \"/'${MEEP_SANDBOX_NAME}'/,' $1; sed -i "s,sandboxname,${MEEP_SANDBOX_NAME},g" "$1"; echo "Replacing [sandboxname] with ${svcPath} to basepath or url in: '$1'" sed -i "s,sandboxname,${svcPath},g" "$1"; } # Set basepath for API files Loading go-apps/meep-auth-svc/main.go +1 −0 Original line number Diff line number Diff line Loading @@ -93,6 +93,7 @@ func main() { count := 0 for { if !run { server.Stop() log.Info("Ran for ", count, " seconds") break } Loading Loading
go-apps/meep-app-enablement/entrypoint.sh +9 −4 Original line number Diff line number Diff line Loading @@ -3,6 +3,13 @@ set -e echo "MEEP_HOST_URL: ${MEEP_HOST_URL}" echo "MEEP_SANDBOX_NAME: ${MEEP_SANDBOX_NAME}" echo "MEEP_MEP_NAME: ${MEEP_MEP_NAME}" if [[ ! -z "${MEEP_MEP_NAME}" ]]; then svcPath="${MEEP_SANDBOX_NAME}/${MEEP_MEP_NAME}" else svcPath="${MEEP_SANDBOX_NAME}" fi # Update API yaml basepaths to enable "Try-it-out" feature # OAS2: Set relative path to sandbox name + endpoint path (origin will be derived from browser URL) Loading @@ -10,14 +17,12 @@ echo "MEEP_SANDBOX_NAME: ${MEEP_SANDBOX_NAME}" setBasepath() { # OAS3 hostName=$(echo "${MEEP_HOST_URL}" | sed -E 's/^\s*.*:\/\///g') #newHostName=${hostName}/${MEEP_SANDBOX_NAME} echo "Replacing [localhost] with ${hostName} to url in: '$1'" sed -i "s,localhost,${hostName},g" "$1"; # OAS2 and OAS3 echo "Replacing [sandboxname] with ${MEEP_SANDBOX_NAME} to basepath or url in: '$1'" #sed -i 's,basePath: \"/\?,basePath: \"/'${MEEP_SANDBOX_NAME}'/,' $1; sed -i "s,sandboxname,${MEEP_SANDBOX_NAME},g" "$1"; echo "Replacing [sandboxname] with ${svcPath} to basepath or url in: '$1'" sed -i "s,sandboxname,${svcPath},g" "$1"; } # Set basepath for API files Loading
go-apps/meep-app-enablement/main.go +1 −0 Original line number Diff line number Diff line Loading @@ -85,6 +85,7 @@ func main() { count := 0 for { if !run { server.Stop() log.Info("Ran for ", count, " seconds") break } Loading
go-apps/meep-app-enablement/server/app-enablement.go +11 −1 Original line number Diff line number Diff line Loading @@ -178,9 +178,19 @@ func Run() (err error) { // Stop - Stop App Enablement func Stop() { if mqLocal != nil { mqLocal.UnregisterHandler(handlerId) } // Remove APIs if apiMgr != nil { err := apiMgr.RemoveApis() if err != nil { log.Error("Failed to remove APIs with err: ", err.Error()) } } } // Message Queue handler func msgHandler(msg *mq.Msg, userData interface{}) { switch msg.Message { Loading
go-apps/meep-auth-svc/entrypoint.sh +9 −4 Original line number Diff line number Diff line Loading @@ -3,6 +3,13 @@ set -e echo "MEEP_HOST_URL: ${MEEP_HOST_URL}" echo "MEEP_SANDBOX_NAME: ${MEEP_SANDBOX_NAME}" echo "MEEP_MEP_NAME: ${MEEP_MEP_NAME}" if [[ ! -z "${MEEP_MEP_NAME}" ]]; then svcPath="${MEEP_SANDBOX_NAME}/${MEEP_MEP_NAME}" else svcPath="${MEEP_SANDBOX_NAME}" fi # Update API yaml basepaths to enable "Try-it-out" feature # OAS2: Set relative path to sandbox name + endpoint path (origin will be derived from browser URL) Loading @@ -10,14 +17,12 @@ echo "MEEP_SANDBOX_NAME: ${MEEP_SANDBOX_NAME}" setBasepath() { # OAS3 hostName=$(echo "${MEEP_HOST_URL}" | sed -E 's/^\s*.*:\/\///g') #newHostName=${hostName}/${MEEP_SANDBOX_NAME} echo "Replacing [localhost] with ${hostName} to url in: '$1'" sed -i "s,localhost,${hostName},g" "$1"; # OAS2 and OAS3 echo "Replacing [sandboxname] with ${MEEP_SANDBOX_NAME} to basepath or url in: '$1'" #sed -i 's,basePath: \"/\?,basePath: \"/'${MEEP_SANDBOX_NAME}'/,' $1; sed -i "s,sandboxname,${MEEP_SANDBOX_NAME},g" "$1"; echo "Replacing [sandboxname] with ${svcPath} to basepath or url in: '$1'" sed -i "s,sandboxname,${svcPath},g" "$1"; } # Set basepath for API files Loading
go-apps/meep-auth-svc/main.go +1 −0 Original line number Diff line number Diff line Loading @@ -93,6 +93,7 @@ func main() { count := 0 for { if !run { server.Stop() log.Info("Ran for ", count, " seconds") break } Loading