forked from eclipse-iofog/iofog-go-sdk
/
api.go
33 lines (28 loc) · 1.1 KB
/
api.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
* *******************************************************************************
* * Copyright (c) 2019 Edgeworx, Inc.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Eclipse Public License v. 2.0 which is available at
* * http://www.eclipse.org/legal/epl-2.0
* *
* * SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*
*/
package apps
import (
"net/url"
)
func DeployApplicationTemplate(controller IofogController, controllerBaseURL *url.URL, template interface{}, name string) error {
exe := newApplicationTemplateExecutor(controller, controllerBaseURL, template, name)
return exe.execute()
}
func DeployApplication(controller IofogController, application interface{}, name string) error {
exe := newApplicationExecutor(controller, application, name)
return exe.execute()
}
func DeployMicroservice(controller IofogController, microservice interface{}, appName, name string) error {
exe := newMicroserviceExecutor(controller, microservice, appName, name)
return exe.execute()
}