github.com/x-helm/helm@v3.0.0-beta.3+incompatible/pkg/helmpath/home.go (about)

     1  // Copyright The Helm Authors.
     2  // Licensed under the Apache License, Version 2.0 (the "License");
     3  // you may not use this file except in compliance with the License.
     4  // You may obtain a copy of the License at
     5  
     6  // http://www.apache.org/licenses/LICENSE-2.0
     7  
     8  // Unless required by applicable law or agreed to in writing, software
     9  // distributed under the License is distributed on an "AS IS" BASIS,
    10  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    11  // See the License for the specific language governing permissions and
    12  // limitations under the License.
    13  
    14  package helmpath
    15  
    16  // This helper builds paths to Helm's configuration, cache and data paths.
    17  const lp = lazypath("helm")
    18  
    19  // ConfigPath returns the path where Helm stores configuration.
    20  func ConfigPath(elem ...string) string { return lp.configPath(elem...) }
    21  
    22  // CachePath returns the path where Helm stores cached objects.
    23  func CachePath(elem ...string) string { return lp.cachePath(elem...) }
    24  
    25  // DataPath returns the path where Helm stores data.
    26  func DataPath(elem ...string) string { return lp.dataPath(elem...) }
    27  
    28  // CacheIndex returns the path to an index for the given named repository.
    29  func CacheIndexFile(name string) string {
    30  	if name != "" {
    31  		name += "-"
    32  	}
    33  	return name + "index.yaml"
    34  }