1
- package util
1
+ /*
2
+ * Copyright (c) 2022, AcmeStack
3
+ * All rights reserved.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ package openapi
2
19
3
20
import (
21
+ "io/ioutil"
22
+
4
23
"github.com/acmestack/envcd/internal/pkg/context"
5
24
"github.com/acmestack/envcd/pkg/entity/data"
6
25
"github.com/gin-gonic/gin"
7
- "io/ioutil"
8
26
)
9
27
10
- // BuildContext build plugin context
28
+ // buildContext build plugin context
11
29
// @param params params
12
30
// @return *context.Context context
13
31
// @return error error
14
- func BuildContext (ginCtx * gin.Context ) (* context.Context , error ) {
32
+ func buildContext (ginCtx * gin.Context ) (* context.Context , error ) {
15
33
ctx := & context.Context {
16
34
Uri : ginCtx .Request .RequestURI ,
17
35
Method : ginCtx .Request .Method ,
@@ -27,11 +45,11 @@ func BuildContext(ginCtx *gin.Context) (*context.Context, error) {
27
45
return nil , nil
28
46
}
29
47
30
- // ParseContext parse context to envcd data
48
+ // parseContext parse context to envcd data
31
49
// @param ctx context
32
50
// @return *data.EnvcdData data
33
51
// @return error error
34
- func ParseContext (ctx * context.Context ) (* data.EnvcdData , error ) {
52
+ func parseContext (ctx * context.Context ) (* data.EnvcdData , error ) {
35
53
// TODO parse context to envcd data
36
54
return nil , nil
37
55
}
0 commit comments