// NewGetItems creates a new http.Handler for the get items operation
762369
func NewGetItems(ctx *middleware.Context, handler GetItemsHandler) *GetItems {
	return &GetItems{Context: ctx, Handler: handler}
}
262176
func NewGetResponseBodyForInterceptionArgs(interceptionID InterceptionID) *GetResponseBodyForInterceptionArgs {
	args := new(GetResponseBodyForInterceptionArgs)
	args.InterceptionID = interceptionID
	return args
}
1271900
func (ctr *ContainerController) HandleGetAccessories(r io.Reader) (io.Reader, error) {
	result, err := json.Marshal(ctr.container)
	return bytes.NewBuffer(result), err
}
13212
func NewGetHello(ctx *middleware.Context, handler GetHelloHandler) *GetHello {
	return &GetHello{Context: ctx, Handler: handler}
}
1073448
func (item *MultiGetItem) FetchSource(fetchSourceContext *FetchSourceContext) *MultiGetItem {
	item.fsc = fetchSourceContext
	return item
}
896111
func HTTPGet(httpUrl string) ([]byte, error) {

	r, err := http.Get(httpUrl)

	if err != nil {
		return nil, err
	}

	defer r.Body.Close()

	if err != nil {
		return nil, err
	}

	// read the response and check
	body, err := ioutil.ReadAll(r.Body)
	if err != nil {
		return nil, err
	}

	return body, nil
}
32146
func (c *Client) NewGetBucketRequest(bucket string) *RpbGetBucketReq {
	return &RpbGetBucketReq{
		Bucket: []byte(bucket),
	}
}
562562
func (h HTTP) New() cue.Collector {
	if h.RequestFormatter == nil {
		log.Warn("HTTP.New called to created a collector, but RequestFormatter param is empty.  Returning nil collector.")
		return nil
	}
	if h.Client == nil {
		h.Client = &http.Client{}
	}
	return &httpCollector{HTTP: h}
}
446599
func GetItem(key string) (s string, err error) {
	if localStorage == nil || localStorage == js.Undefined {
		return "", ErrLocalStorageNotSupported
	}
	defer func() {
		if r := recover(); r != nil {
			var ok bool
			err, ok = r.(error)
			if !ok {
				err = fmt.Errorf("could not use local storage: %v", r)
			}
			s = ""
		}
	}()

	item := localStorage.Call("getItem", key)
	if item == js.Undefined || item == nil {
		err = newItemNotFoundError(
			"Could not find an item with the given key: %s", key)
	} else {
		s = item.String()
	}
	return s, err
}
788467
func (c *Client) GetItem(accessToken string) (resp GetItemResponse, err error) {
	if accessToken == "" {
		return resp, errors.New("/item/get - access token must be specified")
	}

	jsonBody, err := json.Marshal(getItemRequest{
		ClientID:    c.clientID,
		Secret:      c.secret,
		AccessToken: accessToken,
	})

	if err != nil {
		return resp, err
	}

	err = c.Call("/item/get", jsonBody, &resp)
	return resp, err
}
844299
func NewItemsItem(in interface{}, context *compiler.Context) (*ItemsItem, error) {
	errors := make([]error, 0)
	x := &ItemsItem{}
	m, ok := compiler.UnpackMap(in)
	if !ok {
		message := fmt.Sprintf("has unexpected value for item array: %+v (%T)", in, in)
		errors = append(errors, compiler.NewError(context, message))
	} else {
		x.Schema = make([]*Schema, 0)
		y, err := NewSchema(m, compiler.NewContext("<array>", context))
		if err != nil {
			return nil, err
		}
		x.Schema = append(x.Schema, y)
	}
	return x, compiler.NewErrorGroupOrNil(errors)
}
63592
func NewGetOrder(ctx *middleware.Context, handler GetOrderHandler) *GetOrder {
	return &GetOrder{Context: ctx, Handler: handler}
}
1300107
func NewGetGreeting(ctx *middleware.Context, handler GetGreetingHandler) *GetGreeting {
	return &GetGreeting{Context: ctx, Handler: handler}
}
529756
func NewGetPetByID(ctx *middleware.Context, handler GetPetByIDHandler) *GetPetByID {
	return &GetPetByID{Context: ctx, Handler: handler}
}
449401
func NewGetErrorResponse(key string, err error) GetResponse {
	resp := &genericResponse{
		err:           err,
		allowNotFound: true,
	}
	resp.item.Key = key
	return resp
}
97974
func (collection *Collection) SearchItems(profile string) ([]Item, error) {
  attributes := make(map[string]string)
  attributes["profile"] = profile

  var paths []dbus.ObjectPath

  err := collection.dbus.Call("org.freedesktop.Secret.Collection.SearchItems", 0, attributes).Store(&paths)
  if err != nil {
    return []Item{}, err
  }

  items := []Item{}
  for _, path := range paths {
    items = append(items, *NewItem(collection.conn, path))
  }

  return items, nil
}
283031
func (h *Handler) handleGetNodes(w http.ResponseWriter, r *http.Request) {
	if !validHeaderAcceptJSON(r.Header) {
		http.Error(w, "JSON only acceptable response", http.StatusNotAcceptable)
		return
	}

	// Retrieve all nodes.
	nodes := h.api.Hosts(r.Context())

	// Write to response.
	if err := json.NewEncoder(w).Encode(nodes); err != nil {
		h.logger.Printf("json write error: %s", err)
	}
}