// GetAccount returns the account with given id if any, nil otherwise.
437155
func (db *DB) GetAccount(id int) (model AccountModel, ok bool) {
	db.Lock()
	defer db.Unlock()
	var p *AccountModel
	if p, ok = db.accounts[id]; ok {
		model = *p
		ok = true
	}
	return
}
825837
func (c *Client) GetIdentity(accessToken string) (resp GetIdentityResponse, err error) {
	if accessToken == "" {
		return resp, errors.New("/identity/get - access token must be specified")
	}

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

	if err != nil {
		return resp, err
	}

	err = c.Call("/identity/get", jsonBody, &resp)
	return resp, err
}
430096
func (c *Client) EnableAccount(p *EnableAccountParameter) (*Account, error) {
	obj, err := c.Request("enableAccount", convertParamToMap(p))
	if err != nil {
		return nil, err
	}
	return obj.(*Account), err
}
780276
func (s *ScopedKeyManager) AccountName(ns walletdb.ReadBucket, account uint32) (string, error) {
	return fetchAccountName(ns, &s.scope, account)
}
210623
func (api *Client) GetAccount() (*Account, error) {
	result, _, err := api.makeRequest(http.MethodGet, api.concatUserPath(accountPath), &Account{})
	if err != nil {
		return nil, err
	}
	return result.(*Account), nil
}
345979
func (c *ApiController) GetAccountOrganizations() {
	fmt.Println("Start get account organizations")

	client := github.NewClient(oauthCfg.Client(oauth2.NoContext, tkn))

	organizations, _, err := client.Organizations.List("", nil)
	if err != nil {
		fmt.Println("error getting organizations")
		fmt.Println(nil)
	}

	c.Data["json"] = organizations
	c.ServeJson()
}
418287
func (r *RestartTracker) GetCount() int {
	r.lock.Lock()
	defer r.lock.Unlock()
	return r.count
}
110953
func (qs *queryServer) GetAccount(ctx context.Context, param *GetAccountParam) (*acm.Account, error) {
	acc, err := qs.accounts.GetAccount(param.Address)
	if acc == nil {
		acc = &acm.Account{}
	}
	return acc, err
}
43663
func GenesisAccountFromAccount(name string, account *acm.Account) Account {
	return Account{
		Name:        name,
		Permissions: account.Permissions,
		BasicAccount: BasicAccount{
			Address: account.Address,
			Amount:  account.Balance,
		},
	}
}
816648
func (az *Cloud) getStorageAccounts(matchingAccountType, matchingAccountKind, resourceGroup, matchingLocation string) ([]accountWithLocation, error) {
	ctx, cancel := getContextWithCancel()
	defer cancel()
	result, err := az.StorageAccountClient.ListByResourceGroup(ctx, resourceGroup)
	if err != nil {
		return nil, err
	}
	if result.Value == nil {
		return nil, fmt.Errorf("unexpected error when listing storage accounts from resource group %s", resourceGroup)
	}

	accounts := []accountWithLocation{}
	for _, acct := range *result.Value {
		if acct.Name != nil && acct.Location != nil && acct.Sku != nil {
			storageType := string((*acct.Sku).Name)
			if matchingAccountType != "" && !strings.EqualFold(matchingAccountType, storageType) {
				continue
			}

			if matchingAccountKind != "" && !strings.EqualFold(matchingAccountKind, string(acct.Kind)) {
				continue
			}

			location := *acct.Location
			if matchingLocation != "" && !strings.EqualFold(matchingLocation, location) {
				continue
			}
			accounts = append(accounts, accountWithLocation{Name: *acct.Name, StorageType: storageType, Location: location})
		}
	}

	return accounts, nil
}
899925
func NewAccount(AccountId string, Name *Name, Email string, EmailVerified bool, Disabled bool) *Account {
	s := new(Account)
	s.AccountId = AccountId
	s.Name = Name
	s.Email = Email
	s.EmailVerified = EmailVerified
	s.Disabled = Disabled
	return s
}
458949
func (s *PrivateAccountAPI) LockAccount(addr common.Address) bool {
	return fetchKeystore(s.am).Lock(addr) == nil
}
501672
func (c *Client) CreateAccount(p *CreateAccountParameter) (*Account, error) {
	obj, err := c.Request("createAccount", convertParamToMap(p))
	if err != nil {
		return nil, err
	}
	return obj.(*Account), err
}
970567
func GetAccount(host, token, id string) (*map[string]interface{}, error) {
	path := variables.APIPathAccount
	path = strings.Replace(path, ":id", id, 1)
	return GenericRequest(host, path, token, nil)
}
112560
func (c *Client) GetAuth(accessToken string) (resp GetAuthResponse, err error) {
	options := GetAuthOptions{
		AccountIDs: []string{},
	}
	return c.GetAuthWithOptions(accessToken, options)
}
1125142
func (client *Client) DeleteAccount(instanceId, accountName string) (resp *DeleteAccountResponse, err error) {
	args := DeleteAccountArgs{
		DBInstanceId: instanceId,
		AccountName:  accountName,
	}

	response := DeleteAccountResponse{}
	err = client.Invoke("DeleteAccount", &args, &response)

	if err != nil {
		return nil, err
	}
	return &response, nil
}
302342
func (c *Client) DeleteAccount(p *DeleteAccountParameter) (*Result, error) {
	obj, err := c.Request("deleteAccount", convertParamToMap(p))
	if err != nil {
		return nil, err
	}
	return obj.(*Result), err
}