Loading examples/demo6/golang/docker_run.sh +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ set -e set +x docker pull golang docker run --rm --expose 80 --expose 443 -it -v$PWD:/opt/local/etsi/demo6 -v$HOME/var:/opt/local/etsi/var golang bash -c "cd /opt/local/etsi/demo6/bin && ./demo6 ../app_instance.yaml" docker run --rm --expose 80 --expose 443 -p 80:80 -p 443:443 -it -v$PWD:/opt/local/etsi/demo6 -v$HOME/var:/opt/local/etsi/var golang bash -c "cd /opt/local/etsi/demo6/bin && ./demo6 ../app_instance.yaml" echo "" echo ">>> Done" examples/demo6/golang/main.go +3 −1 Original line number Diff line number Diff line Loading @@ -1100,6 +1100,7 @@ func mec013_subscribe_ue_loc(ue_address string) (body []byte, response *http.Res SubscriptionType: "UserLocationEventSubscription", } userLocationEventSubscription.LocationEventCriteria = append(userLocationEventSubscription.LocationEventCriteria, "ENTERING_AREA_EVENT") userLocationEventSubscription.LocationEventCriteria = append(userLocationEventSubscription.LocationEventCriteria, "LEAVING_AREA_EVENT") var m = map[string]UserLocationEventSubscription{} m["userLocationEventSubscription"] = userLocationEventSubscription json_body, err := json.Marshal(m) Loading Loading @@ -1193,7 +1194,7 @@ func mec030_subscribe_v2x_messages() (body []byte, response *http.Response, err var v2xMsgSubscription = V2xMsgSubscription{ CallbackReference: callbackUrl + "/vis/v2/v2x_msg_notification", FilterCriteria: &V2xMsgSubscriptionFilterCriteria{ MsgType: []string{"1", "2"}, MsgType: []string{"1", "2", "14", "16"}, // CAM, DENM, CPM & VAM StdOrganization: "ETSI", }, SubscriptionType: "V2xMsgSubscription", Loading Loading @@ -1664,6 +1665,7 @@ func main() { // Start REST API Server go func() { fmt.Println(">>> Start REST API Server on port : ", config.CallbackPort) router := NewRouter() methods := handlers.AllowedMethods([]string{"OPTIONS", "DELETE", "GET", "HEAD", "POST", "PUT"}) header := handlers.AllowedHeaders([]string{"content-type"}) Loading examples/demo6/golang/routers.go +5 −5 Original line number Diff line number Diff line Loading @@ -66,25 +66,25 @@ var routes = HttpRoutes{ Index, }, HttpRoute{ "Index", "mec013_notification", "POST", "location/v3/users_notification", "/location/v3/users_notification", mec013_notification, }, HttpRoute{ "Index", "v2x_msg_notification", "POST", "/vis/v2/v2x_msg_notification", v2x_msg_notification, }, HttpRoute{ "Index", "fed_notification", "POST", "/fed/v1/notification", fed_notification, }, HttpRoute{ "Index", "mec011_service_statistic_get", "GET", "/statistic/v1/quantity", mec011_service_statistic_get, Loading Loading
examples/demo6/golang/docker_run.sh +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ set -e set +x docker pull golang docker run --rm --expose 80 --expose 443 -it -v$PWD:/opt/local/etsi/demo6 -v$HOME/var:/opt/local/etsi/var golang bash -c "cd /opt/local/etsi/demo6/bin && ./demo6 ../app_instance.yaml" docker run --rm --expose 80 --expose 443 -p 80:80 -p 443:443 -it -v$PWD:/opt/local/etsi/demo6 -v$HOME/var:/opt/local/etsi/var golang bash -c "cd /opt/local/etsi/demo6/bin && ./demo6 ../app_instance.yaml" echo "" echo ">>> Done"
examples/demo6/golang/main.go +3 −1 Original line number Diff line number Diff line Loading @@ -1100,6 +1100,7 @@ func mec013_subscribe_ue_loc(ue_address string) (body []byte, response *http.Res SubscriptionType: "UserLocationEventSubscription", } userLocationEventSubscription.LocationEventCriteria = append(userLocationEventSubscription.LocationEventCriteria, "ENTERING_AREA_EVENT") userLocationEventSubscription.LocationEventCriteria = append(userLocationEventSubscription.LocationEventCriteria, "LEAVING_AREA_EVENT") var m = map[string]UserLocationEventSubscription{} m["userLocationEventSubscription"] = userLocationEventSubscription json_body, err := json.Marshal(m) Loading Loading @@ -1193,7 +1194,7 @@ func mec030_subscribe_v2x_messages() (body []byte, response *http.Response, err var v2xMsgSubscription = V2xMsgSubscription{ CallbackReference: callbackUrl + "/vis/v2/v2x_msg_notification", FilterCriteria: &V2xMsgSubscriptionFilterCriteria{ MsgType: []string{"1", "2"}, MsgType: []string{"1", "2", "14", "16"}, // CAM, DENM, CPM & VAM StdOrganization: "ETSI", }, SubscriptionType: "V2xMsgSubscription", Loading Loading @@ -1664,6 +1665,7 @@ func main() { // Start REST API Server go func() { fmt.Println(">>> Start REST API Server on port : ", config.CallbackPort) router := NewRouter() methods := handlers.AllowedMethods([]string{"OPTIONS", "DELETE", "GET", "HEAD", "POST", "PUT"}) header := handlers.AllowedHeaders([]string{"content-type"}) Loading
examples/demo6/golang/routers.go +5 −5 Original line number Diff line number Diff line Loading @@ -66,25 +66,25 @@ var routes = HttpRoutes{ Index, }, HttpRoute{ "Index", "mec013_notification", "POST", "location/v3/users_notification", "/location/v3/users_notification", mec013_notification, }, HttpRoute{ "Index", "v2x_msg_notification", "POST", "/vis/v2/v2x_msg_notification", v2x_msg_notification, }, HttpRoute{ "Index", "fed_notification", "POST", "/fed/v1/notification", fed_notification, }, HttpRoute{ "Index", "mec011_service_statistic_get", "GET", "/statistic/v1/quantity", mec011_service_statistic_get, Loading