2 * Copyright 2020 Huawei Technologies Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 _ "github.com/jinzhu/gorm/dialects/mysql"
22 type CreateApplicationReq struct {
23 AppDID string `yaml:"appDId"`
24 AppInstancename string `yaml:"appInstancename"`
25 AppInstanceDescriptor string `yaml:"appInstanceDescriptor"`
28 type CreateApplicationRsp struct {
29 AppInstanceID string `yaml:"appInstanceId"`
32 type OnBoardPkgApplicationRsp struct {
33 AppPkgID string `yaml:"appPkgId"`
36 type InstantiateApplicationReq struct {
37 SelectedMECHostInfo struct {
38 HostName string `yaml:"hostName"`
39 HostID string `yaml:"hostId"`
40 } `yaml:"selectedMECHostInfo"`
43 type QueryApplicationInstanceInfoReq struct {
44 Filter string `yaml:"filter"`
45 AttributeSelector string `yaml:"attributeSelector"`
48 type QueryApplicationLCMOperStatusReq struct {
49 LifecycleOperationOccurrenceID string `yaml:"lifecycleOperationOccurrenceId"`
52 // User represents a user account
53 type AppPackageInfo struct {
55 ID string `gorm:"primary_key;not null;unique"`
56 AppDID string `yaml:"appDId"`
57 AppProvider string `yaml:"appProvider"`
58 AppName string `yaml:"appName"`
59 AppSoftwareVersion string `yaml:"appSoftwareVersion"`
60 AppDVersion string `yaml:"appDVersion"`
61 OnboardingState string `yaml:"onboardingState"`
62 DeployType string `yaml:"deployType"`
63 AppPackage string `yaml:"appPackage"`
66 // Task represents a task for the user
67 type AppInstanceInfo struct {
69 ID string `gorm:"primary_key;not null;unique"`
70 AppInstanceName string `yaml:"appInstanceName"`
71 AppInstanceDescription string `yaml:"appInstanceDescription"`
72 AppDID string `yaml:"appDId"`
73 AppProvider string `yaml:"appProvider"`
74 AppName string `yaml:"appName"`
75 AppSoftVersion string `yaml:"appSoftVersion"`
76 AppDVersion string `yaml:"appDVersion"`
77 AppPkgID string `yaml:"appPkgId"`
78 InstantiationState string `yaml:"instantiationState"`
79 Host string `yaml:"host"`
80 WorkloadID string `yaml:"workloadId"`
81 InstantiatedAppState string `yaml:"instantiatedAppState"`