// Adds acoount to a project
324249
func (c *Client) AddAccountToProject(p *AddAccountToProjectParameter) (*Result, error) {
	obj, err := c.Request("addAccountToProject", convertParamToMap(p))
	if err != nil {
		return nil, err
	}
	return obj.(*Result), err
}
1135182
func addPendingTiming(c context.Context, build *ui.MiloBuildLegacy, sr *swarming.SwarmingRpcsTaskResult) {
	created, err := time.Parse(SwarmingTimeLayout, sr.CreatedTs)
	if err != nil {
		return
	}
	build.Summary.PendingTime = ui.NewInterval(c, created, build.Summary.ExecutionTime.Started)
}
1139910
func (s *Server) AddAppEndpointFunc(method, path string, handler func(w http.ResponseWriter, r *http.Request, app *models.App)) {
	s.AddAppEndpoint(method, path, ApiAppHandlerFunc(handler))
}
214373
func (s *AccountService) AddAccountToProject(p *AddAccountToProjectParams) (*AddAccountToProjectResponse, error) {
	resp, err := s.cs.newRequest("addAccountToProject", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r AddAccountToProjectResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}

	// If we have a async client, we need to wait for the async result
	if s.cs.async {
		b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout)
		if err != nil {
			if err == AsyncTimeoutErr {
				return &r, err
			}
			return nil, err
		}

		if err := json.Unmarshal(b, &r); err != nil {
			return nil, err
		}
	}

	return &r, nil
}
758743
func (c *CollaboratorsController) Add(ctx *app.AddCollaboratorsContext) error {
	return proxy.RouteHTTP(ctx, c.config.GetAuthShortServiceHostName())
}
586498
func (f *ListenerStack) Add(fx ElemEventMux) int {
	var ind int

	f.lock.RLock()
	ind = len(f.listeners)
	f.lock.RUnlock()

	f.lock.Lock()
	f.listeners = append(f.listeners, fx)
	f.lock.Unlock()

	return ind
}
1201245
func (e *SimpleEventHandler) Add(s string) {
	e.items = append(e.items, s)
	e.levels = append(e.levels, e.current)
}
537693
func (i IntCounter) Add(key int) (changed bool) {
	value, exists := i[key]
	if !exists {
		changed = true
	}
	i[key] = value + 1
	return changed
}
1025440
func (r *ActionResponse) AddAction(action *bees.Action) {
	r.actions = append(r.actions, action)
	r.Actions = append(r.Actions, prepareActionResponse(r.Context, action))
}
889825
func (b *multiErrBuilder) Add(err error) {
	if err != nil {
		b.errs = append(b.errs, err)
	}
}
608886
func (m *TaskManager) Add(ctx context.Context, task runtime.Task) error {
	return m.tasks.Add(ctx, task)
}
948689
func (c *gceCloudImplementation) ServiceAccount() (string, error) {
	if c.projectInfo == nil {
		// Find the project info from the compute API, which includes the default service account
		glog.V(2).Infof("fetching project %q from compute API", c.project)
		p, err := c.compute.Projects.Get(c.project).Do()
		if err != nil {
			return "", fmt.Errorf("error fetching info for project %q: %v", c.project, err)
		}

		c.projectInfo = p
	}

	if c.projectInfo.DefaultServiceAccount == "" {
		return "", fmt.Errorf("compute project %q did not have DefaultServiceAccount", c.project)
	}

	return c.projectInfo.DefaultServiceAccount, nil
}
322915
func (s *Statement) Add(code ...Code) *Statement {
	*s = append(*s, code...)
	return s
}
1017776
func (r *Runtime) Add(ctx context.Context, task runtime.Task) error {
	return r.tasks.Add(ctx, task)
}
49978
func AddProjectInfo(build *ui.MiloBuildLegacy, tags strpair.Map) {
	if proj := tags.Get("luci_project"); proj != "" {
		if build.Trigger == nil {
			build.Trigger = &ui.Trigger{}
		}
		build.Trigger.Project = proj
	}
}
830362
func (s *AccountService) NewAddAccountToProjectParams(projectid string) *AddAccountToProjectParams {
	p := &AddAccountToProjectParams{}
	p.p = make(map[string]interface{})
	p.p["projectid"] = projectid
	return p
}
386262
func AddAccount(bundle *stellar1.Bundle, secretKey stellar1.SecretKey, name string, makePrimary bool) (err error) {
	if bundle == nil {
		return fmt.Errorf("nil bundle")
	}
	secretKey, accountID, _, err := libkb.ParseStellarSecretKey(string(secretKey))
	if err != nil {
		return err
	}
	if name == "" {
		return fmt.Errorf("Name required for new account")
	}
	if makePrimary {
		for i := range bundle.Accounts {
			bundle.Accounts[i].IsPrimary = false
		}
	}
	bundle.Accounts = append(bundle.Accounts, stellar1.BundleEntry{
		AccountID:          accountID,
		Mode:               stellar1.AccountMode_USER,
		IsPrimary:          makePrimary,
		AcctBundleRevision: 1,
		Name:               name,
	})
	bundle.AccountBundles[accountID] = stellar1.AccountBundle{
		AccountID: accountID,
		Signers:   []stellar1.SecretKey{secretKey},
	}
	return bundle.CheckInvariants()
}