// Get Only Array of Job Names, Color, URL
// Does not query each single Job.
327905
func (j *Jenkins) GetAllJobNames() ([]InnerJob, error) {
	exec := Executor{Raw: new(ExecutorResponse), Jenkins: j}
	_, err := j.Requester.GetJSON("/", exec.Raw, nil)

	if err != nil {
		return nil, err
	}

	return exec.Raw.Jobs, nil
}
52918
func (p *PullRequestsService) All() (pulls []PullRequest, result *Result) {
	result = p.client.get(p.URL, &pulls)
	return
}
75301
func (_class ClusterHostClass) GetAll(sessionID SessionRef) (_retval []ClusterHostRef, _err error) {
	_method := "Cluster_host.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 = convertClusterHostRefSetToGo(_method + " -> ", _result.Value)
	return
}
228692
func (status Status) JobIds() ([]string, error) {
	conn := redisPool.Get()
	defer conn.Close()
	return redis.Strings(conn.Do("ZREVRANGE", status.Key(), 0, -1))
}
166124
func (c *RedisClient) Get(timeout time.Duration, queues ...string) (Job, error) {

	ret, err := c.GetMulti(0, timeout, queues...)
	if err != nil {
		return Job{}, err
	}
	if ret == nil || len(ret) == 0 {
		return Job{}, errors.New("disque: no jobs returned")
	}
	return ret[0], nil

}
1236490
func (r *Client) GetAllDatasources() ([]Datasource, error) {
	var (
		raw  []byte
		ds   []Datasource
		code int
		err  error
	)
	if raw, code, err = r.get("api/datasources", nil); err != nil {
		return nil, err
	}
	if code != 200 {
		return nil, fmt.Errorf("HTTP error %d: returns %s", code, raw)
	}
	err = json.Unmarshal(raw, &ds)
	return ds, err
}
854975
func (api *TasksAPI) GetAll(options *TaskGetOptions) (result *TaskList, err error) {
	uri := api.client.Endpoint + taskUrl
	if options != nil {
		uri += getQueryString(options)
	}
	res, err := api.client.restClient.GetList(api.client.Endpoint, uri, api.client.options.TokenOptions)
	if err != nil {
		return
	}

	result = &TaskList{}
	err = json.Unmarshal(res, result)

	return
}
1171081
func (s *jobLister) Jobs(namespace string) JobNamespaceLister {
	return jobNamespaceLister{indexer: s.indexer, namespace: namespace}
}
576258
func (e *engineImpl) GetVisibleJobBatch(c context.Context, jobIDs []string) (map[string]*Job, error) {
	// TODO(vadimsh): This can be parallelized to be single GetMulti RPC to fetch
	// jobs and single filterForRole to check ACLs. In practice O(len(jobIDs)) is
	// small, so there's no pressing need to do this.
	visible := make(map[string]*Job, len(jobIDs))
	for _, id := range jobIDs {
		switch job, err := e.GetVisibleJob(c, id); {
		case err == nil:
			visible[id] = job
		case err != ErrNoSuchJob:
			return nil, err
		}
	}
	return visible, nil
}
733806
func (js *JobsService) Find(opt *JobFindOptions) ([]Job, *http.Response, error) {
	if opt != nil && !opt.IsValid() {
		return nil, nil, fmt.Errorf(
			"More than one value set in provided JobFindOptions instance",
		)
	}

	u, err := urlWithOptions("/jobs", opt)
	if err != nil {
		return nil, nil, err
	}

	req, err := js.client.NewRequest("GET", u, nil, nil)
	if err != nil {
		return nil, nil, err
	}

	var jobsResp findJobsResponse
	resp, err := js.client.Do(req, &jobsResp)
	if err != nil {
		return nil, resp, err
	}

	return jobsResp.Jobs, resp, err
}
500766
func (e *delayedEnvironment) GetAll(key string) []string {
	e.Load()
	return e.env.GetAll(key)
}
752687
func (_class SMClass) GetAll(sessionID SessionRef) (_retval []SMRef, _err error) {
	_method := "SM.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 = convertSMRefSetToGo(_method + " -> ", _result.Value)
	return
}
888121
func (c *Client) get(url string) (string, error) {
	resp, err := http.Get(url)
	if err != nil {
		return "", err
	}
	defer resp.Body.Close()

	taskList := new(TaskList)
	if err = json.NewDecoder(resp.Body).Decode(taskList); err != nil {
		return "", err
	}
	return strings.Join(taskList.Tasks, ", "), nil
}
337836
func (c *Context) GetQueryArray(key string) ([]string, bool) {
	if values, ok := c.Request.URL.Query()[key]; ok && len(values) > 0 {
		return values, true
	}
	return []string{}, false
}
920011
func (s *SchedulerServer) GetJobs(ctx context.Context, in *scheduler.JobsRequest) (*scheduler.JobsReply, error) {
	if in.GetCursor() != "" {
		// Paging in GetJobs isn't implemented until we have enough jobs to care.
		// Until then, not empty cursor implies no more jobs to return.
		return &scheduler.JobsReply{Jobs: []*scheduler.Job{}, NextCursor: ""}, nil
	}
	var ejobs []*engine.Job
	var err error
	if in.GetProject() == "" {
		ejobs, err = s.Engine.GetVisibleJobs(ctx)
	} else {
		ejobs, err = s.Engine.GetVisibleProjectJobs(ctx, in.GetProject())
	}
	if err != nil {
		return nil, status.Errorf(codes.Internal, "internal error: %s", err)
	}

	jobs := make([]*scheduler.Job, len(ejobs))
	for i, ej := range ejobs {
		traits, err := presentation.GetJobTraits(ctx, s.Catalog, ej)
		if err != nil {
			return nil, status.Errorf(codes.Internal, "failed to get traits: %s", err)
		}
		jobs[i] = &scheduler.Job{
			JobRef: &scheduler.JobRef{
				Project: ej.ProjectID,
				Job:     ej.JobName(),
			},
			Schedule: ej.Schedule,
			State: &scheduler.JobState{
				UiStatus: string(presentation.GetPublicStateKind(ej, traits)),
			},
			Paused: ej.Paused,
		}
	}
	return &scheduler.JobsReply{Jobs: jobs, NextCursor: ""}, nil
}
398558
func (js *JobsService) Get(id uint) (*Job, *http.Response, error) {
	u, err := urlWithOptions(fmt.Sprintf("/jobs/%d", id), nil)
	if err != nil {
		return nil, nil, err
	}

	req, err := js.client.NewRequest("GET", u, nil, nil)
	if err != nil {
		return nil, nil, err
	}

	var jobResp getJobResponse
	resp, err := js.client.Do(req, &jobResp)
	if err != nil {
		return nil, resp, err
	}

	return &jobResp.Job, resp, err
}
20361
func (jenkins *Jenkins) GetJobs() ([]Job, error) {
	var payload = struct {
		Jobs []Job `json:"jobs"`
	}{}
	err := jenkins.get("", nil, &payload)
	return payload.Jobs, err
}