//
// GetAllVars return a copy of all variables available at the current scope
//
552960
func (ctx *Context) GetVarNames() (names []string) {
	for name, _ := range ctx.GetAllVars() {
		names = append(names, name)
	}

	sort.Strings(names)
	return
}
572208
func (s *server) GetAllGauges(in *metricspb.EmptyMessage, stream metricspb.MetricsService_GetAllGaugesServer) error {
	s.mutex.RLock()
	defer s.mutex.RUnlock()

	for name, gauge := range s.gauges {
		if err := stream.Send(&metricspb.GaugeResponse{Name: name, Value: &metricspb.GaugeResponse_LongValue{LongValue: gauge.get()}}); err != nil {
			return err
		}
	}
	return nil
}
797967
func (head *Head) Vars() VarSet {
	vis := &VarVisitor{vars: VarSet{}}
	// TODO: improve test coverage for this.
	if head.Args != nil {
		Walk(vis, head.Args)
	}
	if head.Key != nil {
		Walk(vis, head.Key)
	}
	if head.Value != nil {
		Walk(vis, head.Value)
	}
	return vis.vars
}
269611
func (be *Backend) GetAll(c context.Context, t backend.GetAllTarget, path string, p backend.Params) (
	[]*config.Config, error) {

	svc := be.GetConfigInterface(c, p.Authority)

	var fn func(context.Context, string, bool) ([]config.Config, error)
	switch t {
	case backend.GetAllProject:
		fn = svc.GetProjectConfigs
	case backend.GetAllRef:
		fn = svc.GetRefConfigs
	default:
		return nil, errors.Reason("unknown GetAllType: %q", t).Err()
	}

	cfgs, err := fn(c, path, !p.Content)
	if err != nil || len(cfgs) == 0 {
		return nil, translateConfigErr(err)
	}

	items := make([]*config.Config, len(cfgs))
	for i := range cfgs {
		items[i] = makeItem(&cfgs[i])
	}
	return items, nil
}
916034
func (_class VMGuestMetricsClass) GetAll(sessionID SessionRef) (_retval []VMGuestMetricsRef, _err error) {
	_method := "VM_guest_metrics.get_all"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg)
	if _err != nil {
		return
	}
	_retval, _err = convertVMGuestMetricsRefSetToGo(_method + " -> ", _result.Value)
	return
}
1066802
func (h *RevelHeader) GetAll(key string) (values []string) {
	if h.Server != nil {
		values = h.Server.Get(key)
	}
	return
}
602173
func (c *Context) GetGlobalSysVar(ctx sessionctx.Context, name string) (string, error) {
	v := variable.GetSysVar(name)
	if v == nil {
		return "", variable.UnknownSystemVar.GenWithStackByArgs(name)
	}
	return v.Value, nil
}
620339
func resolveAllVariables(scope map[string]interface{}, tmplStr string) error {
	var unresolvedErr error
	_, allowAllItemRefs := scope[anyItemMagicValue] // 'item.*' is a magic placeholder value set by addItemsToScope
	fstTmpl := fasttemplate.New(tmplStr, "{{", "}}")

	fstTmpl.ExecuteFuncString(func(w io.Writer, tag string) (int, error) {

		// Skip the custom variable references
		if !checkValidWorkflowVariablePrefix(tag) {
			return 0, nil
		}
		_, ok := scope[tag]
		if !ok && unresolvedErr == nil {
			if (tag == "item" || strings.HasPrefix(tag, "item.")) && allowAllItemRefs {
				// we are *probably* referencing a undetermined item using withParam
				// NOTE: this is far from foolproof.
			} else if strings.HasPrefix(tag, common.GlobalVarWorkflowCreationTimestamp) {
			} else {
				unresolvedErr = fmt.Errorf("failed to resolve {{%s}}", tag)
			}
		}
		return 0, nil
	})
	return unresolvedErr
}
949292
func (body Body) Vars(params VarVisitorParams) VarSet {
	vis := NewVarVisitor().WithParams(params)
	Walk(vis, body)
	return vis.Vars()
}
305180
func (_class PVSServerClass) GetAll(sessionID SessionRef) (_retval []PVSServerRef, _err error) {
	_method := "PVS_server.get_all"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg)
	if _err != nil {
		return
	}
	_retval, _err = convertPVSServerRefSetToGo(_method + " -> ", _result.Value)
	return
}
131153
func GetAllQueries(req *http.Request) map[string][]string {
	if ok, values := extractQueries(req); ok {
		return values
	}
	return nil
}
904292
func GetAll() map[Kind][]Plugin {
	plugins := pluginGlobal.plugins()
	if plugins == nil {
		return nil
	}
	return plugins.plugins
}
13922
func (p *Proxy) functionVars() (args []string) {

	args = append(args, "-var")
	args = append(args, fmt.Sprintf("aws_region=%s", p.Region))

	args = append(args, "-var")
	args = append(args, fmt.Sprintf("apex_environment=%s", p.Environment))

	if p.Role != "" {
		args = append(args, "-var")
		args = append(args, fmt.Sprintf("apex_function_role=%s", p.Role))
	}

	// GetConfig is slow, so store the results and then use the configurations as needed
	var relations []ConfigRelation
	for _, fn := range p.Functions {
		config, err := fn.GetConfig()
		if err != nil {
			log.Debugf("can't fetch function config: %s", err.Error())
			continue
		}

		var relation ConfigRelation
		relation.Function = fn
		relation.Configuration = config.Configuration
		relations = append(relations, relation)
	}

	args = append(args, getFunctionArnVars(relations)...)
	args = append(args, getFunctionNameVars(relations)...)
	args = append(args, getFunctionArns(relations)...)
	args = append(args, getFunctionNames(relations)...)

	return args
}
148087
func (_class FeatureClass) GetAll(sessionID SessionRef) (_retval []FeatureRef, _err error) {
	_method := "Feature.get_all"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg)
	if _err != nil {
		return
	}
	_retval, _err = convertFeatureRefSetToGo(_method + " -> ", _result.Value)
	return
}
809712
func (q TemplateQuery) Vars(vars map[string]interface{}) TemplateQuery {
	q.vars = vars
	return q
}
1365159
func (_class VBDClass) GetAll(sessionID SessionRef) (_retval []VBDRef, _err error) {
	_method := "VBD.get_all"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg)
	if _err != nil {
		return
	}
	_retval, _err = convertVBDRefSetToGo(_method + " -> ", _result.Value)
	return
}
685973
func (p *ListParam) Vars() (string, string) {
	if len(p.values) == 0 {
		return p.Name(), p.Default()
	}
	out := make([]string, len(p.values))
	for i, v := range p.values {
		_, out[i] = v.EnvVars()
	}
	return p.Name(), strings.Join(out, ",")
}