1 // Copyright 2019 Nokia
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
7 // http://www.apache.org/licenses/LICENSE-2.0
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.
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"`
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