Added seed code for caas-helm.
[ta/caas-helm.git] / src / chart-repo-handler / pkg / config / config.go
1 // Copyright 2019 Nokia
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 package config
16
17 type EnvConfig struct {
18         AuthUser     string `required:"true"`
19         AuthKey      string `required:"true"`
20         AuthUrl      string `required:"true"`
21         Container    string `required:"true"`
22         ListenOnIP   string `required:"true"`
23         ListenOnPort string `required:"true"`
24         RepoUrl      string `required:"true"`
25         IndexPath    string
26         TlsCertPath  string
27         TlsKeyPath   string
28         TlsCaPath   string
29 }
30
31 func (c *EnvConfig) ToString() string {
32         result := "AuthUser=" + c.AuthUser
33         result += " AuthKey=***"
34         result += " AuthUrl=" + c.AuthUrl
35         result += " Container=" + c.Container
36         result += " ListenOnIP=" + c.ListenOnIP
37         result += " ListenOnPort=" + c.ListenOnPort
38         result += " RepoUrl=" + c.RepoUrl
39         result += " IndexPath=" + c.IndexPath
40         result += " TlsCertPath=" + c.TlsCertPath
41         result += " TlsKeyPath=" + c.TlsKeyPath
42         result += " TlsCaPath" + c.TlsCaPath
43
44         return result
45 }
46