// List returns a list of releases matching provided parameters.
List returns a list of releases matching provided parameters.
// List returns a list of releases matching provided parameters .
func List(params ListParameters) ([]storage.Release, error) {
	settings := cli.New()
	actionConfig, err := helmInit(settings, params.Namespace)
	if err != nil {
		return nil, trace.Wrap(err)
	}
	client := action.NewList(actionConfig)
	client.All = params.All
	client.Filter = params.Filter
	client.Deployed = true
	client.Failed = true
	client.Uninstalling = true
	client.Pending = true
	client.SetStateMask()
	results, err := client.Run()
	if err != nil {
		return nil, trace.Wrap(err)
	}
	releases := make([]storage.Release, len(results))
	for i, res := range results {
		release, err := storage.NewRelease(res)
		if err != nil {
			return nil, trace.Wrap(err)
		}
		releases[i] = release
	}
	return releases, nil
}
func List ( params ListParameters ) ( [ ] storage . Release , error ) { settings := cli . New ( ) actionConfig , err := helmInit ( settings , params . Namespace ) if err != nil { return nil , trace . Wrap ( err ) } client := action . NewList ( actionConfig ) client . All = params . All client . Filter = params . Filter client . Deployed = true client . Failed = true client . Uninstalling = true client . Pending = true client . SetStateMask ( ) results , err := client . Run ( ) if err != nil { return nil , trace . Wrap ( err ) } releases := make ( [ ] storage . Release , len ( results ) ) for i , res := range results { release , err := storage . NewRelease ( res ) if err != nil { return nil , trace . Wrap ( err ) } releases [ i ] = release } return releases , nil }
List returns a list of releases matching provided parameters.
List returns a list of releases matching provided parameters .
// Default state filters if All field is not set.