// getGid for a user
515800
func getGid(u *user.User) (int, error) {
	gid, err := strconv.Atoi(u.Gid)
	if err != nil {
		return 0, fmt.Errorf("Unable to convert Gid to an int: %v", err)
	}

	return gid, nil
}
861656
func (c *Connection) GetMessageID(msg api.Message) (uint16, error) {
	if c == nil {
		return 0, errors.New("nil connection passed in")
	}

	if msgID, ok := c.msgIDs[getMsgNameWithCrc(msg)]; ok {
		return msgID, nil
	}

	msgID, err := c.vppClient.GetMsgID(msg.GetMessageName(), msg.GetCrcString())
	if err != nil {
		return 0, err
	}

	c.msgIDs[getMsgNameWithCrc(msg)] = msgID
	c.msgMap[msgID] = msg

	return msgID, nil
}
943933
func GoID() int64 {
	g := getg()
	p_goid := (*int64)(unsafe.Pointer(g + goidOffset))
	return *p_goid
}
544409
func GetRootUIDGID(uidMap, gidMap []IDMap) (int, int, error) {
	uid, err := toHost(0, uidMap)
	if err != nil {
		return -1, -1, err
	}
	gid, err := toHost(0, gidMap)
	if err != nil {
		return -1, -1, err
	}
	return uid, gid, nil
}
125619
func GetOwnedOrgsByUserID(userID int64) ([]*User, error) {
	sess := x.NewSession()
	return getOwnedOrgsByUserID(sess, userID)
}
2662
func (m *Manager) GetByGrant(grant Grant, globalID string) ([]SavedGrants, error) {
	var usersWithGrant []SavedGrants

	if err := m.collection.Find(bson.M{"grants": grant, "globalid": globalID}).All(&usersWithGrant); err != nil {
		return nil, err
	}

	return usersWithGrant, nil
}
32702
func (s *UsersService) GetGPGKey(ctx context.Context, id int64) (*GPGKey, *Response, error) {
	u := fmt.Sprintf("user/gpg_keys/%v", id)
	req, err := s.client.NewRequest("GET", u, nil)
	if err != nil {
		return nil, nil, err
	}

	key := &GPGKey{}
	resp, err := s.client.Do(ctx, req, key)
	if err != nil {
		return nil, resp, err
	}

	return key, resp, nil
}
834026
func (s *UsersService) GetByID(ctx context.Context, id int64) (*User, *Response, error) {
	u := fmt.Sprintf("user/%d", id)
	req, err := s.client.NewRequest("GET", u, nil)
	if err != nil {
		return nil, nil, err
	}

	user := new(User)
	resp, err := s.client.Do(ctx, req, user)
	if err != nil {
		return nil, resp, err
	}

	return user, resp, nil
}
184709
func LookupGid(groupName string) (gid int, err error) {
	return LookupGidFromFile(groupName, groupFilePath)
}
1159969
func (i *Idm) GetID(serial bool) (uint64, error) {
	if i.handle == nil {
		return 0, errors.New("ID set is not initialized")
	}
	ordinal, err := i.handle.SetAny(serial)
	return i.start + ordinal, err
}
840448
func (m *UserManager) GetByID(id int64) (user User, err error) {
	stmt := Users.Select().Where(Users.C("id").Equals(id))
	if err = m.conn.Query(stmt, &user); err != nil {
		return
	}
	if !user.Exists() {
		err = fmt.Errorf("auth: no user with id %d exists", id)
	}
	return
}
1329692
func (m User) GetETagData() []interface{} {
	// using the 'ID' and 'UpdatedAt' (converted to number of seconds since epoch) fields
	return []interface{}{m.ID, strconv.FormatInt(m.UpdatedAt.Unix(), 10)}
}
829155
func (db UserDB) GetByID(id string) (u *models.User, ok bool) {
	u, ok = db.ids[id]
	return
}
391466
func (client *Client) GetStack(guid string) (Stack, Warnings, error) {
	request, err := client.newHTTPRequest(requestOptions{
		RequestName: internal.GetStackRequest,
		URIParams:   Params{"stack_guid": guid},
	})
	if err != nil {
		return Stack{}, nil, err
	}

	var stack Stack
	response := cloudcontroller.Response{
		DecodeJSONResponseInto: &stack,
	}

	err = client.connection.Make(request, &response)
	return stack, response.Warnings, err
}
363023
func (s *Secret) GetUsageID() (string, error) {
	var err C.virError
	result := C.virSecretGetUsageIDWrapper(s.ptr, &err)
	if result == nil {
		return "", makeError(&err)
	}
	return C.GoString(result), nil
}
757392
func (c *Client) GetGifById(id string) (*Gif, error) {

	// construct and execute the HTTP request
	u := fmt.Sprintf("gifs/%s", id)
	sr := &singleResult{}
	if err := c.makeRequest(u, &url.Values{}, sr); err != nil {
		return nil, err
	}

	return sr.Data, nil
}
523085
func (client *Client) GetService(serviceGUID string) (Service, Warnings, error) {
	request, err := client.newHTTPRequest(requestOptions{
		RequestName: internal.GetServiceRequest,
		URIParams:   Params{"service_guid": serviceGUID},
	})
	if err != nil {
		return Service{}, nil, err
	}

	var service Service
	response := cloudcontroller.Response{
		DecodeJSONResponseInto: &service,
	}

	err = client.connection.Make(request, &response)
	return service, response.Warnings, err
}