// ModelGet returns all model settings.
769271
func (c *Client) ModelGet() (map[string]interface{}, error) {
	result := params.ModelConfigResults{}
	err := c.facade.FacadeCall("ModelGet", nil, &result)
	if err != nil {
		return nil, errors.Trace(err)
	}
	values := make(map[string]interface{})
	for name, val := range result.Config {
		values[name] = val.Value
	}
	return values, nil
}
1004741
func (s *Server) indexGet(ctx *middleware.Context, req models.IndexGet) {

	// query nodes don't own any data.
	if s.MetricIndex == nil {
		response.Write(ctx, response.NewMsgp(404, nil))
		return
	}

	def, ok := s.MetricIndex.Get(req.MKey)
	if !ok {
		response.Write(ctx, response.NewError(http.StatusNotFound, "Not Found"))
		return
	}

	response.Write(ctx, response.NewMsgp(200, &def))
}
1092048
func (st modelManagerStateShim) ModelConfig() (*config.Config, error) {
	model, err := st.State.Model()
	if err != nil {
		return nil, errors.Trace(err)
	}
	return model.ModelConfig()
}
1008110
func (c *MemStore) ModelByName(controller, model string) (*ModelDetails, error) {
	c.mu.Lock()
	defer c.mu.Unlock()

	if err := ValidateControllerName(controller); err != nil {
		return nil, err
	}
	if err := ValidateModelName(model); err != nil {
		return nil, err
	}
	controllerModels, ok := c.Models[controller]
	if !ok {
		return nil, errors.NotFoundf("model %s:%s", controller, model)
	}
	details, ok := controllerModels.Models[model]
	if !ok {
		return nil, errors.NotFoundf("model %s:%s", controller, model)
	}
	return &details, nil
}
1180145
func (h *modelRestHandler) processGet(r *http.Request, w http.ResponseWriter, st *state.State) error {
	query := r.URL.Query()
	entity := query.Get(":entity")
	// TODO(wallyworld) - support more than just "remote-application"
	switch entity {
	case "remote-application":
		return h.processRemoteApplication(r, w, st)
	default:
		return errors.NotSupportedf("entity %v", entity)
	}
}
12080
func QueryGet(request *http.Request, key string) string {
	return request.URL.Query().Get(key)
}
1353298
func baseGet(ctx context.Context, table []byte, key []byte,
	options ...func(Call) error) (*Get, error) {
	g := &Get{
		base: base{
			key:      key,
			table:    table,
			ctx:      ctx,
			resultch: make(chan RPCResult, 1),
		},
		baseQuery: newBaseQuery(),
	}
	err := applyOptions(g, options...)
	if err != nil {
		return nil, err
	}
	return g, nil
}
124656
func atomGet(xu *xgbutil.XUtil, name string) (xproto.Atom, bool) {
	xu.AtomsLck.RLock()
	defer xu.AtomsLck.RUnlock()

	aid, ok := xu.Atoms[name]
	return aid, ok
}
847134
func (api *APIv5) Get(args params.ApplicationGet) (params.ApplicationGetResults, error) {
	results, err := api.getConfig(args, describe)
	if err != nil {
		return params.ApplicationGetResults{}, err
	}
	results.ApplicationConfig = nil
	return results, nil
}
794091
func ModelContext(c context.Context, model ...interface{}) *orm.Query {
	return orm.NewQueryContext(c, nil, model...)
}
2606
func (m *FuncRegistry) FuncGet(name string) (Func, bool) {
	m.mu.RLock()
	fn, ok := m.funcs[name]
	m.mu.RUnlock()
	return fn, ok
}
683475
func NewGet(ctx context.Context, table, key []byte,
	options ...func(Call) error) (*Get, error) {
	return baseGet(ctx, table, key, options...)
}
1010411
func (m *Mem) Get(key models.Key, model models.Model) error {
	m.mut.RLock()
	defer m.mut.RUnlock()
	md, ok := m.m[key.String()]
	if !ok {
		return ErrNotFound
	}
	return model.Set(md)
}
666739
func (mvcc *MVCCLevelDB) BatchGet(ks [][]byte, startTS uint64, isoLevel kvrpcpb.IsolationLevel) []Pair {
	mvcc.mu.RLock()
	defer mvcc.mu.RUnlock()

	pairs := make([]Pair, 0, len(ks))
	for _, k := range ks {
		v, err := mvcc.getValue(k, startTS, isoLevel)
		if v == nil && err == nil {
			continue
		}
		pairs = append(pairs, Pair{
			Key:   k,
			Value: v,
			Err:   errors.Trace(err),
		})
	}
	return pairs
}
605980
func (db *DB) GetModel(obj interface{}) (*Model, error) {
	return db.getModel(reflect.TypeOf(obj))
}
728193
func (s *Server) Get(ctx context.Context, q *SettingsQuery) (*Settings, error) {
	argoCDSettings, err := s.mgr.GetSettings()
	if err != nil {
		return nil, err
	}

	overrides := make(map[string]*v1alpha1.ResourceOverride)
	for k := range argoCDSettings.ResourceOverrides {
		val := argoCDSettings.ResourceOverrides[k]
		overrides[k] = &val
	}
	set := Settings{
		URL:               argoCDSettings.URL,
		AppLabelKey:       argoCDSettings.GetAppInstanceLabelKey(),
		ResourceOverrides: overrides,
	}
	if argoCDSettings.DexConfig != "" {
		var cfg DexConfig
		err = yaml.Unmarshal([]byte(argoCDSettings.DexConfig), &cfg)
		if err == nil {
			set.DexConfig = &cfg
		}
	}
	if oidcConfig := argoCDSettings.OIDCConfig(); oidcConfig != nil {
		set.OIDCConfig = &OIDCConfig{
			Name:        oidcConfig.Name,
			Issuer:      oidcConfig.Issuer,
			ClientID:    oidcConfig.ClientID,
			CLIClientID: oidcConfig.CLIClientID,
		}
	}
	return &set, nil
}
848196
func SimpleGet(cli client.Client, key string, recursive bool) (*client.Response, error) {
	k := client.NewKeysAPI(cli)
	return k.Get(dctx(), key, &client.GetOptions{Recursive: recursive})
}