*.so
*.dylib
bin/*
+pkg/*
# Test binary, build with `go test -c`
*.test
--- /dev/null
+## Generating api server code with Swagger tool from JSON
+### Prerequisite
+Make sure Java version 1.8 or later is installed on your computer.
+To check java version, please open terminal and type
+```
+$ java -version
+java version "1.8.0_201"
+Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
+Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)
+```
+### Code generate
+```
+$ java -jar swagger-codegen-cli.jar generate -i ../edge-orchestration-api.json -l go-server
+```
\ No newline at end of file
+++ /dev/null
----
-swagger: "2.0"
-info:
- description: "Edge Orchestration support to deliver distributed service process\
- \ environment."
- version: "v1-20190307"
- title: "Edge Orchestration"
-tags:
-- name: "Device Resource"
- description: "Device resource"
-- name: "Service Manager"
- description: "Managing services"
-schemes:
-- "http"
-paths:
- /api/v1/device/resource/usage/cpu:
- get:
- tags:
- - "Device Resource"
- description: "Get device cpu usage"
- consumes:
- - "application/json"
- produces:
- - "application/json"
- parameters: []
- responses:
- 200:
- description: "Successful operation"
- schema:
- $ref: "#/definitions/CPU"
- /api/v1/device/resource/usage/memory:
- get:
- tags:
- - "Device Resource"
- description: "Get device memory usage"
- consumes:
- - "application/json"
- produces:
- - "application/json"
- parameters: []
- responses:
- 200:
- description: "Successful operation"
- schema:
- $ref: "#/definitions/Memory"
- /api/v1/device/resource/usage/network:
- get:
- tags:
- - "Device Resource"
- description: "Get device network usage"
- consumes:
- - "application/json"
- produces:
- - "application/json"
- parameters: []
- responses:
- 200:
- description: "Successful operation"
- schema:
- $ref: "#/definitions/Network"
- /api/v1/device/resource/usage/disk:
- get:
- tags:
- - "Device Resource"
- description: "Get device disk usage"
- consumes:
- - "application/json"
- produces:
- - "application/json"
- parameters: []
- responses:
- 200:
- description: "Successful operation"
- schema:
- $ref: "#/definitions/Disk"
- /api/v1/servicemgr/service:
- get:
- tags:
- - "Service Manager"
- description: "Get Service list"
- consumes:
- - "application/json"
- produces:
- - "application/json"
- parameters: []
- responses:
- 200:
- description: "Successful operation"
- schema:
- $ref: "#/definitions/ServiceList"
- post:
- tags:
- - "Service Manager"
- description: "Create service"
- consumes:
- - "application/json"
- produces:
- - "application/json"
- parameters:
- - in: "body"
- name: "body"
- description: "Parameters for request service execution"
- required: false
- schema:
- $ref: "#/definitions/ServiceRequest"
- x-exportParamName: "Body"
- responses:
- 200:
- description: "Successful operation"
- schema:
- $ref: "#/definitions/APIResponse"
- delete:
- tags:
- - "Service Manager"
- description: "Destroy service"
- consumes:
- - "application/json"
- produces:
- - "application/json"
- parameters: []
- responses:
- 200:
- description: "Successful operation"
- schema:
- $ref: "#/definitions/APIResponse"
- /api/v1/servicemgr/service/{serviceID}:
- get:
- tags:
- - "Service Manager"
- description: "Get service information"
- consumes:
- - "application/json"
- produces:
- - "application/json"
- parameters:
- - name: "serviceID"
- in: "path"
- description: "Name of service"
- required: true
- type: "string"
- x-exportParamName: "ServiceID"
- responses:
- 200:
- description: "Successful operation"
- schema:
- $ref: "#/definitions/ServiceInfo"
-definitions:
- CPU:
- type: "object"
- properties:
- cpu:
- type: "string"
- example: "0.187383"
- description: "Usage of CPU"
- example:
- cpu: "0.187383"
- Memory:
- type: "object"
- properties:
- memory:
- type: "string"
- example: "11.871336"
- description: "Usage of Memory"
- example:
- memory: "11.871336"
- Network:
- type: "object"
- properties:
- network:
- type: "string"
- example: "0.003023"
- description: "Usage of Network"
- example:
- network: "0.003023"
- Disk:
- type: "object"
- properties:
- network:
- type: "string"
- example: ""
- description: "Usage of Disk"
- example:
- network: ""
- SystemParam:
- type: "object"
- properties:
- ipAddr:
- type: "string"
- example: "127.0.0.1"
- description: "IP Addr of device requesting service"
- port:
- type: "string"
- example: "5432"
- description: "Port number of device requesting service"
- example:
- port: "5432"
- ipAddr: "127.0.0.1"
- UserParam:
- type: "object"
- properties:
- arguments:
- type: "string"
- example: "5"
- description: "User parameter of requesting service"
- example:
- arguments: "5"
- ServiceRequest:
- type: "object"
- properties:
- serviceName:
- type: "string"
- example: "helloWorld_service"
- description: "Name of requested service"
- status:
- type: "string"
- example: "Start"
- description: "Status of requested service"
- type:
- type: "string"
- example: "CPU"
- description: "Type of resource for requested service"
- systemParam:
- $ref: "#/definitions/SystemParam"
- userParam:
- $ref: "#/definitions/UserParam"
- example:
- userParam:
- arguments: "5"
- serviceName: "helloWorld_service"
- type: "CPU"
- systemParam:
- port: "5432"
- ipAddr: "127.0.0.1"
- status: "Start"
- ServiceInfo:
- type: "object"
- properties:
- serviceName:
- type: "string"
- example: "helloWorld_service"
- description: "Service name"
- serviceID:
- type: "string"
- example: "helloWorld_service_deviceID_UUID"
- description: "Unique ID of service"
- status:
- type: "string"
- example: "Start"
- description: "Status of service"
- deviceID:
- type: "string"
- example: "Edge_deviceID"
- description: "DeviceID on which the service is operating"
- example:
- serviceName: "helloWorld_service"
- serviceID: "helloWorld_service_deviceID_UUID"
- deviceID: "Edge_deviceID"
- status: "Start"
- ServiceList:
- type: "array"
- items:
- $ref: "#/definitions/ServiceInfo"
- APIResponse:
- type: "object"
- properties:
- message:
- type: "string"
- description: "Return the status of the request"
- example:
- message: "message"
--- /dev/null
+# Swagger Codegen Ignore
+# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
+
+# Use this file to prevent files from being overwritten by the generator.
+# The patterns follow closely to .gitignore or .dockerignore.
+
+# As an example, the C# client generator defines ApiClient.cs.
+# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
+#ApiClient.cs
+
+# You can match any string of characters against a directory, file or extension with a single asterisk (*):
+#foo/*/qux
+# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
+
+# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
+#foo/**/qux
+# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
+
+# You can also negate patterns with an exclamation (!).
+# For example, you can ignore all files in a docs folder with the file extension .md:
+#docs/*.md
+# Then explicitly reverse the ignore rule for a single file:
+#!docs/README.md
--- /dev/null
+2.4.2
\ No newline at end of file
--- /dev/null
+---
+swagger: "2.0"
+info:
+ description: "Edge Orchestration support to deliver distributed service process\
+ \ environment."
+ version: "v1-20190307"
+ title: "Edge Orchestration"
+tags:
+- name: "Device Resource"
+ description: "Device resource"
+- name: "Service Manager"
+ description: "Managing services"
+schemes:
+- "http"
+paths:
+ /api/v1/device/resource/usage/cpu:
+ get:
+ tags:
+ - "Device Resource"
+ description: "Get device cpu usage"
+ consumes:
+ - "application/json"
+ produces:
+ - "application/json"
+ parameters: []
+ responses:
+ 200:
+ description: "Successful operation"
+ schema:
+ $ref: "#/definitions/CPU"
+ /api/v1/device/resource/usage/memory:
+ get:
+ tags:
+ - "Device Resource"
+ description: "Get device memory usage"
+ consumes:
+ - "application/json"
+ produces:
+ - "application/json"
+ parameters: []
+ responses:
+ 200:
+ description: "Successful operation"
+ schema:
+ $ref: "#/definitions/Memory"
+ /api/v1/device/resource/usage/network:
+ get:
+ tags:
+ - "Device Resource"
+ description: "Get device network usage"
+ consumes:
+ - "application/json"
+ produces:
+ - "application/json"
+ parameters: []
+ responses:
+ 200:
+ description: "Successful operation"
+ schema:
+ $ref: "#/definitions/Network"
+ /api/v1/device/resource/usage/disk:
+ get:
+ tags:
+ - "Device Resource"
+ description: "Get device disk usage"
+ consumes:
+ - "application/json"
+ produces:
+ - "application/json"
+ parameters: []
+ responses:
+ 200:
+ description: "Successful operation"
+ schema:
+ $ref: "#/definitions/Disk"
+ /api/v1/servicemgr/service:
+ get:
+ tags:
+ - "Service Manager"
+ description: "Get Service list"
+ consumes:
+ - "application/json"
+ produces:
+ - "application/json"
+ parameters: []
+ responses:
+ 200:
+ description: "Successful operation"
+ schema:
+ $ref: "#/definitions/ServiceList"
+ post:
+ tags:
+ - "Service Manager"
+ description: "Create service"
+ consumes:
+ - "application/json"
+ produces:
+ - "application/json"
+ parameters:
+ - in: "body"
+ name: "body"
+ description: "Parameters for request service execution"
+ required: false
+ schema:
+ $ref: "#/definitions/ServiceRequest"
+ x-exportParamName: "Body"
+ responses:
+ 200:
+ description: "Successful operation"
+ schema:
+ $ref: "#/definitions/APIResponse"
+ delete:
+ tags:
+ - "Service Manager"
+ description: "Destroy service"
+ consumes:
+ - "application/json"
+ produces:
+ - "application/json"
+ parameters: []
+ responses:
+ 200:
+ description: "Successful operation"
+ schema:
+ $ref: "#/definitions/APIResponse"
+ /api/v1/servicemgr/service/{serviceID}:
+ get:
+ tags:
+ - "Service Manager"
+ description: "Get service information"
+ consumes:
+ - "application/json"
+ produces:
+ - "application/json"
+ parameters:
+ - name: "serviceID"
+ in: "path"
+ description: "Name of service"
+ required: true
+ type: "string"
+ x-exportParamName: "ServiceID"
+ responses:
+ 200:
+ description: "Successful operation"
+ schema:
+ $ref: "#/definitions/ServiceInfo"
+definitions:
+ CPU:
+ type: "object"
+ properties:
+ cpu:
+ type: "string"
+ example: "0.187383"
+ description: "Usage of CPU"
+ example:
+ cpu: "0.187383"
+ Memory:
+ type: "object"
+ properties:
+ memory:
+ type: "string"
+ example: "11.871336"
+ description: "Usage of Memory"
+ example:
+ memory: "11.871336"
+ Network:
+ type: "object"
+ properties:
+ network:
+ type: "string"
+ example: "0.003023"
+ description: "Usage of Network"
+ example:
+ network: "0.003023"
+ Disk:
+ type: "object"
+ properties:
+ network:
+ type: "string"
+ example: ""
+ description: "Usage of Disk"
+ example:
+ network: ""
+ SystemParam:
+ type: "object"
+ properties:
+ ipAddr:
+ type: "string"
+ example: "127.0.0.1"
+ description: "IP Addr of device requesting service"
+ port:
+ type: "string"
+ example: "5432"
+ description: "Port number of device requesting service"
+ example:
+ port: "5432"
+ ipAddr: "127.0.0.1"
+ UserParam:
+ type: "object"
+ properties:
+ arguments:
+ type: "string"
+ example: "5"
+ description: "User parameter of requesting service"
+ example:
+ arguments: "5"
+ ServiceRequest:
+ type: "object"
+ properties:
+ serviceName:
+ type: "string"
+ example: "helloWorld_service"
+ description: "Name of requested service"
+ status:
+ type: "string"
+ example: "Start"
+ description: "Status of requested service"
+ type:
+ type: "string"
+ example: "CPU"
+ description: "Type of resource for requested service"
+ systemParam:
+ $ref: "#/definitions/SystemParam"
+ userParam:
+ $ref: "#/definitions/UserParam"
+ example:
+ userParam:
+ arguments: "5"
+ serviceName: "helloWorld_service"
+ type: "CPU"
+ systemParam:
+ port: "5432"
+ ipAddr: "127.0.0.1"
+ status: "Start"
+ ServiceInfo:
+ type: "object"
+ properties:
+ serviceName:
+ type: "string"
+ example: "helloWorld_service"
+ description: "Service name"
+ serviceID:
+ type: "string"
+ example: "helloWorld_service_deviceID_UUID"
+ description: "Unique ID of service"
+ status:
+ type: "string"
+ example: "Start"
+ description: "Status of service"
+ deviceID:
+ type: "string"
+ example: "Edge_deviceID"
+ description: "DeviceID on which the service is operating"
+ example:
+ serviceName: "helloWorld_service"
+ serviceID: "helloWorld_service_deviceID_UUID"
+ deviceID: "Edge_deviceID"
+ status: "Start"
+ ServiceList:
+ type: "array"
+ items:
+ $ref: "#/definitions/ServiceInfo"
+ APIResponse:
+ type: "object"
+ properties:
+ message:
+ type: "string"
+ description: "Return the status of the request"
+ example:
+ message: "message"
--- /dev/null
+# Go API Server for swagger
+
+Edge Orchestration support to deliver distributed service process environment.
+
+## Overview
+This server was generated by the [swagger-codegen]
+(https://github.com/swagger-api/swagger-codegen) project.
+By using the [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate a server stub.
+-
+
+To see how to make this your own, look here:
+
+[README](https://github.com/swagger-api/swagger-codegen/blob/master/README.md)
+
+- API version: v1-20190307
+- Build date: 2019-03-14T13:19:12.241+09:00
+
+
+### Running the server
+To run the server, follow these simple steps:
+
+```
+go run main.go
+```
+
--- /dev/null
+/*
+ * Edge Orchestration
+ *
+ * Edge Orchestration support to deliver distributed service process environment.
+ *
+ * API version: v1-20190307
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package swagger
+
+import (
+ "net/http"
+)
+
+func ApiV1DeviceResourceUsageCpuGet(w http.ResponseWriter, r *http.Request) {
+ w.Header().Set("Content-Type", "application/json; charset=UTF-8")
+ w.WriteHeader(http.StatusOK)
+}
+
+func ApiV1DeviceResourceUsageDiskGet(w http.ResponseWriter, r *http.Request) {
+ w.Header().Set("Content-Type", "application/json; charset=UTF-8")
+ w.WriteHeader(http.StatusOK)
+}
+
+func ApiV1DeviceResourceUsageMemoryGet(w http.ResponseWriter, r *http.Request) {
+ w.Header().Set("Content-Type", "application/json; charset=UTF-8")
+ w.WriteHeader(http.StatusOK)
+}
+
+func ApiV1DeviceResourceUsageNetworkGet(w http.ResponseWriter, r *http.Request) {
+ w.Header().Set("Content-Type", "application/json; charset=UTF-8")
+ w.WriteHeader(http.StatusOK)
+}
--- /dev/null
+/*
+ * Edge Orchestration
+ *
+ * Edge Orchestration support to deliver distributed service process environment.
+ *
+ * API version: v1-20190307
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package swagger
+
+import (
+ "net/http"
+)
+
+func ApiV1ServicemgrServiceDelete(w http.ResponseWriter, r *http.Request) {
+ w.Header().Set("Content-Type", "application/json; charset=UTF-8")
+ w.WriteHeader(http.StatusOK)
+}
+
+func ApiV1ServicemgrServiceGet(w http.ResponseWriter, r *http.Request) {
+ w.Header().Set("Content-Type", "application/json; charset=UTF-8")
+ w.WriteHeader(http.StatusOK)
+}
+
+func ApiV1ServicemgrServicePost(w http.ResponseWriter, r *http.Request) {
+ w.Header().Set("Content-Type", "application/json; charset=UTF-8")
+ w.WriteHeader(http.StatusOK)
+}
+
+func ApiV1ServicemgrServiceServiceIDGet(w http.ResponseWriter, r *http.Request) {
+ w.Header().Set("Content-Type", "application/json; charset=UTF-8")
+ w.WriteHeader(http.StatusOK)
+}
--- /dev/null
+/*
+ * Edge Orchestration
+ *
+ * Edge Orchestration support to deliver distributed service process environment.
+ *
+ * API version: v1-20190307
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package swagger
+
+import (
+ "log"
+ "net/http"
+ "time"
+)
+
+func Logger(inner http.Handler, name string) http.Handler {
+ return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ start := time.Now()
+
+ inner.ServeHTTP(w, r)
+
+ log.Printf(
+ "%s %s %s %s",
+ r.Method,
+ r.RequestURI,
+ name,
+ time.Since(start),
+ )
+ })
+}
--- /dev/null
+/*
+ * Edge Orchestration
+ *
+ * Edge Orchestration support to deliver distributed service process environment.
+ *
+ * API version: v1-20190307
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package swagger
+
+type ApiResponse struct {
+
+ // Return the status of the request
+ Message string `json:"message,omitempty"`
+}
--- /dev/null
+/*
+ * Edge Orchestration
+ *
+ * Edge Orchestration support to deliver distributed service process environment.
+ *
+ * API version: v1-20190307
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package swagger
+
+type Cpu struct {
+
+ // Usage of CPU
+ Cpu string `json:"cpu,omitempty"`
+}
--- /dev/null
+/*
+ * Edge Orchestration
+ *
+ * Edge Orchestration support to deliver distributed service process environment.
+ *
+ * API version: v1-20190307
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package swagger
+
+type Disk struct {
+
+ // Usage of Disk
+ Network string `json:"network,omitempty"`
+}
--- /dev/null
+/*
+ * Edge Orchestration
+ *
+ * Edge Orchestration support to deliver distributed service process environment.
+ *
+ * API version: v1-20190307
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package swagger
+
+type Memory struct {
+
+ // Usage of Memory
+ Memory string `json:"memory,omitempty"`
+}
--- /dev/null
+/*
+ * Edge Orchestration
+ *
+ * Edge Orchestration support to deliver distributed service process environment.
+ *
+ * API version: v1-20190307
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package swagger
+
+type Network struct {
+
+ // Usage of Network
+ Network string `json:"network,omitempty"`
+}
--- /dev/null
+/*
+ * Edge Orchestration
+ *
+ * Edge Orchestration support to deliver distributed service process environment.
+ *
+ * API version: v1-20190307
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package swagger
+
+type ServiceInfo struct {
+
+ // Service name
+ ServiceName string `json:"serviceName,omitempty"`
+
+ // Unique ID of service
+ ServiceID string `json:"serviceID,omitempty"`
+
+ // Status of service
+ Status string `json:"status,omitempty"`
+
+ // DeviceID on which the service is operating
+ DeviceID string `json:"deviceID,omitempty"`
+}
--- /dev/null
+/*
+ * Edge Orchestration
+ *
+ * Edge Orchestration support to deliver distributed service process environment.
+ *
+ * API version: v1-20190307
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package swagger
+
+type ServiceList struct {
+}
--- /dev/null
+/*
+ * Edge Orchestration
+ *
+ * Edge Orchestration support to deliver distributed service process environment.
+ *
+ * API version: v1-20190307
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package swagger
+
+type ServiceRequest struct {
+
+ // Name of requested service
+ ServiceName string `json:"serviceName,omitempty"`
+
+ // Status of requested service
+ Status string `json:"status,omitempty"`
+
+ // Type of resource for requested service
+ Type_ string `json:"type,omitempty"`
+
+ SystemParam *SystemParam `json:"systemParam,omitempty"`
+
+ UserParam *UserParam `json:"userParam,omitempty"`
+}
--- /dev/null
+/*
+ * Edge Orchestration
+ *
+ * Edge Orchestration support to deliver distributed service process environment.
+ *
+ * API version: v1-20190307
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package swagger
+
+type SystemParam struct {
+
+ // IP Addr of device requesting service
+ IpAddr string `json:"ipAddr,omitempty"`
+
+ // Port number of device requesting service
+ Port string `json:"port,omitempty"`
+}
--- /dev/null
+/*
+ * Edge Orchestration
+ *
+ * Edge Orchestration support to deliver distributed service process environment.
+ *
+ * API version: v1-20190307
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package swagger
+
+type UserParam struct {
+
+ // User parameter of requesting service
+ Arguments string `json:"arguments,omitempty"`
+}
--- /dev/null
+/*
+ * Edge Orchestration
+ *
+ * Edge Orchestration support to deliver distributed service process environment.
+ *
+ * API version: v1-20190307
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package swagger
+
+import (
+ "fmt"
+ "net/http"
+ "strings"
+
+ "github.com/gorilla/mux"
+)
+
+type Route struct {
+ Name string
+ Method string
+ Pattern string
+ HandlerFunc http.HandlerFunc
+}
+
+type Routes []Route
+
+func NewRouter() *mux.Router {
+ router := mux.NewRouter().StrictSlash(true)
+ for _, route := range routes {
+ var handler http.Handler
+ handler = route.HandlerFunc
+ handler = Logger(handler, route.Name)
+
+ router.
+ Methods(route.Method).
+ Path(route.Pattern).
+ Name(route.Name).
+ Handler(handler)
+ }
+
+ return router
+}
+
+func Index(w http.ResponseWriter, r *http.Request) {
+ fmt.Fprintf(w, "Hello World!")
+}
+
+var routes = Routes{
+ Route{
+ "Index",
+ "GET",
+ "/",
+ Index,
+ },
+
+ Route{
+ "ApiV1DeviceResourceUsageCpuGet",
+ strings.ToUpper("Get"),
+ "/api/v1/device/resource/usage/cpu",
+ ApiV1DeviceResourceUsageCpuGet,
+ },
+
+ Route{
+ "ApiV1DeviceResourceUsageDiskGet",
+ strings.ToUpper("Get"),
+ "/api/v1/device/resource/usage/disk",
+ ApiV1DeviceResourceUsageDiskGet,
+ },
+
+ Route{
+ "ApiV1DeviceResourceUsageMemoryGet",
+ strings.ToUpper("Get"),
+ "/api/v1/device/resource/usage/memory",
+ ApiV1DeviceResourceUsageMemoryGet,
+ },
+
+ Route{
+ "ApiV1DeviceResourceUsageNetworkGet",
+ strings.ToUpper("Get"),
+ "/api/v1/device/resource/usage/network",
+ ApiV1DeviceResourceUsageNetworkGet,
+ },
+
+ Route{
+ "ApiV1ServicemgrServiceDelete",
+ strings.ToUpper("Delete"),
+ "/api/v1/servicemgr/service",
+ ApiV1ServicemgrServiceDelete,
+ },
+
+ Route{
+ "ApiV1ServicemgrServiceGet",
+ strings.ToUpper("Get"),
+ "/api/v1/servicemgr/service",
+ ApiV1ServicemgrServiceGet,
+ },
+
+ Route{
+ "ApiV1ServicemgrServicePost",
+ strings.ToUpper("Post"),
+ "/api/v1/servicemgr/service",
+ ApiV1ServicemgrServicePost,
+ },
+
+ Route{
+ "ApiV1ServicemgrServiceServiceIDGet",
+ strings.ToUpper("Get"),
+ "/api/v1/servicemgr/service/{serviceID}",
+ ApiV1ServicemgrServiceServiceIDGet,
+ },
+}
--- /dev/null
+/*
+ * Edge Orchestration
+ *
+ * Edge Orchestration support to deliver distributed service process environment.
+ *
+ * API version: v1-20190307
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package main
+
+import (
+ "log"
+ "net/http"
+
+ // WARNING!
+ // Change this to a fully-qualified import path
+ // once you place this file into your project.
+ // For example,
+ //
+ // sw "github.com/myname/myrepo/go"
+ //
+ sw "./go"
+)
+
+func main() {
+ log.Printf("Server started")
+
+ router := sw.NewRouter()
+
+ log.Fatal(http.ListenAndServe(":8080", router))
+}