+++ /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-20190318"
- title: "Edge Orchestration"
-tags:
-- name: "Discovery Manager"
- description: "Edge Discovery"
-- name: "Device Resource"
- description: "Device resource"
-- name: "Service Manager"
- description: "Managing services"
-schemes:
-- "http"
-paths:
- /api/v1/discoverymgr/devices:
- get:
- tags:
- - "Discovery Manager"
- description: "Get result of Edge discovery"
- consumes:
- - "application/json"
- produces:
- - "application/json"
- parameters: []
- responses:
- 200:
- description: "Successful operation"
- schema:
- $ref: "#/definitions/DiscoveryEdgeList"
- /api/v1/discoverymgr/devices/{deviceid}:
- get:
- tags:
- - "Discovery Manager"
- description: "Get result of Edge discovery"
- consumes:
- - "application/json"
- produces:
- - "application/json"
- parameters:
- - name: "deviceid"
- in: "path"
- description: "ID of Edge device"
- required: true
- type: "string"
- x-exportParamName: "Deviceid"
- responses:
- 200:
- description: "Successful operation"
- schema:
- $ref: "#/definitions/DiscoveryEdge"
- /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/services:
- get:
- tags:
- - "Service Manager"
- description: "Get information of user service"
- consumes:
- - "application/json"
- produces:
- - "application/json"
- parameters: []
- responses:
- 200:
- description: "Successful operation"
- schema:
- $ref: "#/definitions/ServiceList"
- post:
- tags:
- - "Service Manager"
- description: "Create user app object"
- consumes:
- - "application/json"
- produces:
- - "application/json"
- parameters:
- - in: "body"
- name: "body"
- description: "Parameters for request user service creation"
- required: false
- schema:
- $ref: "#/definitions/ServiceRequest"
- x-exportParamName: "Body"
- responses:
- 200:
- description: "Successful operation"
- schema:
- $ref: "#/definitions/ServiceObjectList"
- delete:
- tags:
- - "Service Manager"
- description: "Destroy user app object"
- consumes:
- - "application/json"
- produces:
- - "application/json"
- parameters:
- - name: "appname"
- in: "path"
- description: "Name of user app to be destroied"
- required: true
- type: "string"
- x-exportParamName: "Appname"
- responses:
- 200:
- description: "Successful operation"
- schema:
- $ref: "#/definitions/APIResponse"
- /api/v1/servicemgr/services/{serviceid}:
- get:
- tags:
- - "Service Manager"
- description: "Get information of micro-service"
- consumes:
- - "application/json"
- produces:
- - "application/json"
- parameters:
- - name: "serviceid"
- in: "path"
- description: "ID of micro-service"
- required: true
- type: "string"
- x-exportParamName: "Serviceid"
- responses:
- 200:
- description: "Successful operation"
- schema:
- $ref: "#/definitions/MicroServiceInfo"
- post:
- tags:
- - "Service Manager"
- description: "Execute requested service"
- consumes:
- - "application/json"
- produces:
- - "application/json"
- parameters:
- - name: "serviceid"
- in: "path"
- description: "ID of micro-service"
- required: true
- type: "string"
- x-exportParamName: "Serviceid"
- - in: "body"
- name: "serviceParam"
- description: "Parameters for request micro-service creation"
- required: false
- schema:
- $ref: "#/definitions/MicroServiceRequest"
- x-exportParamName: "ServiceParam"
- responses:
- 200:
- description: "Successful operation"
- schema:
- $ref: "#/definitions/APIResponse"
- delete:
- tags:
- - "Service Manager"
- description: "Destroy requested micro-service"
- consumes:
- - "application/json"
- produces:
- - "application/json"
- parameters:
- - name: "serviceid"
- in: "path"
- description: "ID of micro-service"
- required: true
- type: "string"
- x-exportParamName: "Serviceid"
- responses:
- 200:
- description: "Successful operation"
- schema:
- $ref: "#/definitions/APIResponse"
- /api/v1/servicemgr/services/{appname}:
- get:
- tags:
- - "Service Manager"
- description: "Get information of app"
- consumes:
- - "application/json"
- produces:
- - "application/json"
- parameters:
- - name: "appname"
- in: "path"
- description: "Name of executed app"
- required: true
- type: "string"
- x-exportParamName: "Appname"
- responses:
- 200:
- description: "Successful operation"
- schema:
- $ref: "#/definitions/ServiceInfo"
-definitions:
- EdgeResource:
- type: "string"
- description: "H/W resource of Edge device can support"
- DiscoveryEdge:
- type: "object"
- properties:
- deviceID:
- type: "string"
- example: "edge-0001"
- description: "Unique ID of Edge device"
- deviceIPAddr:
- type: "string"
- example: "10.113.175.249"
- description: "IP address of Edge device"
- deviceProperties:
- type: "array"
- example:
- - "display"
- - "speaker"
- description: "Edge resources"
- items:
- $ref: "#/definitions/EdgeResource"
- status:
- type: "string"
- example: "Up"
- description: "Status of Edge device"
- example:
- deviceIPAddr: "10.113.175.249"
- deviceProperties:
- - "display"
- - "speaker"
- deviceID: "edge-0001"
- status: "Up"
- DiscoveryEdgeList:
- type: "array"
- items:
- $ref: "#/definitions/DiscoveryEdge"
- 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"
- MicroServiceRequest:
- type: "object"
- properties:
- systemParam:
- $ref: "#/definitions/SystemParam"
- userParam:
- $ref: "#/definitions/UserParam"
- example:
- userParam:
- arguments: "5"
- systemParam:
- port: "5432"
- ipAddr: "127.0.0.1"
- ServiceObject:
- type: "object"
- properties:
- id:
- type: "integer"
- description: "Created ID of micro-service"
- time:
- type: "string"
- description: "The time when micro-service created"
- ServiceObjectList:
- type: "object"
- properties:
- serviceList:
- type: "array"
- example:
- - id: 2
- time: "2019-03-14T13:43:38+09:00"
- - id: 3
- time: "2019-03-14T13:43:38+09:00"
- items:
- $ref: "#/definitions/ServiceObject"
- example:
- serviceList:
- - id: 2
- time: "2019-03-14T13:43:38+09:00"
- - id: 3
- time: "2019-03-14T13:43:38+09:00"
- ServiceRequest:
- type: "object"
- properties:
- appName:
- type: "string"
- example: "GreetWorldApp"
- description: "Name of requested user service"
- serviceName:
- type: "string"
- example: "HelloWorldService"
- description: "Name of micro-services"
- count:
- type: "integer"
- example: 2
- description: "Count of micro-services"
- example:
- appName: "GreetWorldApp"
- count: 2
- serviceName: "HelloWorldService"
- ServiceInfo:
- type: "object"
- properties:
- appName:
- type: "string"
- example: "GreetWorldApp"
- description: "Name of requested user service"
- serviceList:
- $ref: "#/definitions/MicroServiceList"
- example:
- appName: "GreetWorldApp"
- serviceList: ""
- ServiceList:
- type: "array"
- items:
- $ref: "#/definitions/ServiceInfo"
- MicroServiceInfo:
- type: "object"
- properties:
- serviceName:
- type: "string"
- example: "HelloWorldService#1"
- description: "Service name"
- serviceID:
- type: "integer"
- example: 2
- description: "Unique ID of service"
- status:
- type: "string"
- example: "started"
- description: "Status of service"
- deviceID:
- type: "string"
- example: "Edge_deviceID"
- description: "DeviceID on which the service is operating"
- example:
- serviceName: "HelloWorldService#1"
- serviceID: 2
- deviceID: "Edge_deviceID"
- status: "started"
- MicroServiceList:
- type: "array"
- items:
- $ref: "#/definitions/MicroServiceInfo"
- example:
- - serviceName: "HelloWorldService#1"
- serviceID: 2
- status: "started"
- deviceID: "10.113.175.249"
- - serviceName: "HelloWorldService#2"
- serviceID: 3
- status: "progressing"
- deviceID: "10.113.175.239"
- 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-20190318
- * 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-20190318
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
- */
-
-package swagger
-
-import (
- "net/http"
-)
-
-func ApiV1DiscoverymgrDevicesDeviceidGet(w http.ResponseWriter, r *http.Request) {
- w.Header().Set("Content-Type", "application/json; charset=UTF-8")
- w.WriteHeader(http.StatusOK)
-}
-
-func ApiV1DiscoverymgrDevicesGet(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-20190318
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
- */
-
-package swagger
-
-import (
- "net/http"
-)
-
-func ApiV1ServicemgrServicesAppnameGet(w http.ResponseWriter, r *http.Request) {
- w.Header().Set("Content-Type", "application/json; charset=UTF-8")
- w.WriteHeader(http.StatusOK)
-}
-
-func ApiV1ServicemgrServicesDelete(w http.ResponseWriter, r *http.Request) {
- w.Header().Set("Content-Type", "application/json; charset=UTF-8")
- w.WriteHeader(http.StatusOK)
-}
-
-func ApiV1ServicemgrServicesGet(w http.ResponseWriter, r *http.Request) {
- w.Header().Set("Content-Type", "application/json; charset=UTF-8")
- w.WriteHeader(http.StatusOK)
-}
-
-func ApiV1ServicemgrServicesPost(w http.ResponseWriter, r *http.Request) {
- w.Header().Set("Content-Type", "application/json; charset=UTF-8")
- w.WriteHeader(http.StatusOK)
-}
-
-func ApiV1ServicemgrServicesServiceidDelete(w http.ResponseWriter, r *http.Request) {
- w.Header().Set("Content-Type", "application/json; charset=UTF-8")
- w.WriteHeader(http.StatusOK)
-}
-
-func ApiV1ServicemgrServicesServiceidGet(w http.ResponseWriter, r *http.Request) {
- w.Header().Set("Content-Type", "application/json; charset=UTF-8")
- w.WriteHeader(http.StatusOK)
-}
-
-func ApiV1ServicemgrServicesServiceidPost(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-20190318
- * 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-20190318
- * 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-20190318
- * 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-20190318
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
- */
-
-package swagger
-
-type DiscoveryEdge struct {
-
- // Unique ID of Edge device
- DeviceID string `json:"deviceID,omitempty"`
-
- // IP address of Edge device
- DeviceIPAddr string `json:"deviceIPAddr,omitempty"`
-
- // Edge resources
- DeviceProperties []EdgeResource `json:"deviceProperties,omitempty"`
-
- // Status of Edge device
- Status string `json:"status,omitempty"`
-}
+++ /dev/null
-/*
- * Edge Orchestration
- *
- * Edge Orchestration support to deliver distributed service process environment.
- *
- * API version: v1-20190318
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
- */
-
-package swagger
-
-type DiscoveryEdgeList struct {
-}
+++ /dev/null
-/*
- * Edge Orchestration
- *
- * Edge Orchestration support to deliver distributed service process environment.
- *
- * API version: v1-20190318
- * 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-20190318
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
- */
-
-package swagger
-
-// H/W resource of Edge device can support
-type EdgeResource struct {
-}
+++ /dev/null
-/*
- * Edge Orchestration
- *
- * Edge Orchestration support to deliver distributed service process environment.
- *
- * API version: v1-20190318
- * 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-20190318
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
- */
-
-package swagger
-
-type MicroServiceInfo struct {
-
- // Service name
- ServiceName string `json:"serviceName,omitempty"`
-
- // Unique ID of service
- ServiceID int32 `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-20190318
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
- */
-
-package swagger
-
-type MicroServiceList struct {
-}
+++ /dev/null
-/*
- * Edge Orchestration
- *
- * Edge Orchestration support to deliver distributed service process environment.
- *
- * API version: v1-20190318
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
- */
-
-package swagger
-
-type MicroServiceRequest struct {
-
- 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-20190318
- * 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-20190318
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
- */
-
-package swagger
-
-type ServiceInfo struct {
-
- // Name of requested user service
- AppName string `json:"appName,omitempty"`
-
- ServiceList *MicroServiceList `json:"serviceList,omitempty"`
-}
+++ /dev/null
-/*
- * Edge Orchestration
- *
- * Edge Orchestration support to deliver distributed service process environment.
- *
- * API version: v1-20190318
- * 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-20190318
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
- */
-
-package swagger
-
-type ServiceObject struct {
-
- // Created ID of micro-service
- Id int32 `json:"id,omitempty"`
-
- // The time when micro-service created
- Time string `json:"time,omitempty"`
-}
+++ /dev/null
-/*
- * Edge Orchestration
- *
- * Edge Orchestration support to deliver distributed service process environment.
- *
- * API version: v1-20190318
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
- */
-
-package swagger
-
-type ServiceObjectList struct {
-
- ServiceList []ServiceObject `json:"serviceList,omitempty"`
-}
+++ /dev/null
-/*
- * Edge Orchestration
- *
- * Edge Orchestration support to deliver distributed service process environment.
- *
- * API version: v1-20190318
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
- */
-
-package swagger
-
-type ServiceRequest struct {
-
- // Name of requested user service
- AppName string `json:"appName,omitempty"`
-
- // Name of micro-services
- ServiceName string `json:"serviceName,omitempty"`
-
- // Count of micro-services
- Count int32 `json:"count,omitempty"`
-}
+++ /dev/null
-/*
- * Edge Orchestration
- *
- * Edge Orchestration support to deliver distributed service process environment.
- *
- * API version: v1-20190318
- * 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-20190318
- * 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-20190318
- * 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{
- "ApiV1DiscoverymgrDevicesDeviceidGet",
- strings.ToUpper("Get"),
- "/api/v1/discoverymgr/devices/{deviceid}",
- ApiV1DiscoverymgrDevicesDeviceidGet,
- },
-
- Route{
- "ApiV1DiscoverymgrDevicesGet",
- strings.ToUpper("Get"),
- "/api/v1/discoverymgr/devices",
- ApiV1DiscoverymgrDevicesGet,
- },
-
- Route{
- "ApiV1ServicemgrServicesAppnameGet",
- strings.ToUpper("Get"),
- "/api/v1/servicemgr/services/{appname}",
- ApiV1ServicemgrServicesAppnameGet,
- },
-
- Route{
- "ApiV1ServicemgrServicesDelete",
- strings.ToUpper("Delete"),
- "/api/v1/servicemgr/services",
- ApiV1ServicemgrServicesDelete,
- },
-
- Route{
- "ApiV1ServicemgrServicesGet",
- strings.ToUpper("Get"),
- "/api/v1/servicemgr/services",
- ApiV1ServicemgrServicesGet,
- },
-
- Route{
- "ApiV1ServicemgrServicesPost",
- strings.ToUpper("Post"),
- "/api/v1/servicemgr/services",
- ApiV1ServicemgrServicesPost,
- },
-
- Route{
- "ApiV1ServicemgrServicesServiceidDelete",
- strings.ToUpper("Delete"),
- "/api/v1/servicemgr/services/{serviceid}",
- ApiV1ServicemgrServicesServiceidDelete,
- },
-
- Route{
- "ApiV1ServicemgrServicesServiceidGet",
- strings.ToUpper("Get"),
- "/api/v1/servicemgr/services/{serviceid}",
- ApiV1ServicemgrServicesServiceidGet,
- },
-
- Route{
- "ApiV1ServicemgrServicesServiceidPost",
- strings.ToUpper("Post"),
- "/api/v1/servicemgr/services/{serviceid}",
- ApiV1ServicemgrServicesServiceidPost,
- },
-}
+++ /dev/null
-/*
- * Edge Orchestration
- *
- * Edge Orchestration support to deliver distributed service process environment.
- *
- * API version: v1-20190318
- * 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))
-}