// FakeID returns an ID derived from the given byte, suitable for
// testing.
189479
func FakeID(b byte) ID {
	dh := kbfshash.RawDefaultHash{b}
	h, err := kbfshash.HashFromRaw(kbfshash.DefaultHashType, dh[:])
	if err != nil {
		panic(err)
	}
	return ID{h}
}
415592
func (p *PushEventRepository) GetID() int64 {
	if p == nil || p.ID == nil {
		return 0
	}
	return *p.ID
}
495733
func (k *Key) GetID() int64 {
	if k == nil || k.ID == nil {
		return 0
	}
	return *k.ID
}
535793
func BinaryID(v checked.Bytes) ID {
	v.IncRef()
	return &id{data: v}
}
772553
func FakeIDMul(id ID, b byte) ID {
	return FakeID(id.h.Bytes()[1] * b)
}
953012
func ValidateLayerId(id string) error {
	if ok := validId.MatchString(id); !ok {
		return fmt.Errorf("invalid layer ID %q", id)
	}
	return nil
}
18834
func (s *StatusEvent) GetID() int64 {
	if s == nil || s.ID == nil {
		return 0
	}
	return *s.ID
}
1176741
func (s *Switch) ID() string {
	var b bytes.Buffer

	err := binary.Write(&b, binary.BigEndian, s.features.DatapathID)
	if err != nil {
		log.ErrorLog("switch/SWITCH_ID_ERR",
			"Failed serialize datapath identifier: ", err)

		return ""
	}

	id := fmt.Sprintf("%x", b.Bytes())
	var parts []string

	for i := 0; i < len(id); i += 2 {
		parts = append(parts, string(id[i:i+2]))
	}

	return strings.Join(parts, ":")
}
1109737
func DecodeIDFromString(value string) (ID, error) {
	buf, err := decodeFromByte([]byte(value))
	if err != nil {
		return ID{}, err
	}

	id := ID{}
	copy(id[:], buf)
	return id, nil
}
1361171
func (m *Base) ID() string {
	if _, ok := m.MapData["_id"]; !ok {
		return ""
	}
	switch id := m.MapData["_id"].(type) {
	case string:
		return id
	case bson.ObjectId:
		return id.Hex()
	default:
		return fmt.Sprintf("%v", id)
	}
}
1025752
func (p *PreReceiveHook) GetID() int64 {
	if p == nil || p.ID == nil {
		return 0
	}
	return *p.ID
}
173417
func (s *ExplainService) Id(id string) *ExplainService {
	s.id = id
	return s
}
1147216
func (a *Authorization) GetID() int64 {
	if a == nil || a.ID == nil {
		return 0
	}
	return *a.ID
}
445280
func (c *clientIdentityImpl) GetID() (string, error) {
	// The leading "x509::" distinguishes this as an X509 certificate, and
	// the subject and issuer DNs uniquely identify the X509 certificate.
	// The resulting ID will remain the same if the certificate is renewed.
	id := fmt.Sprintf("x509::%s::%s", getDN(&c.cert.Subject), getDN(&c.cert.Issuer))
	return base64.StdEncoding.EncodeToString([]byte(id)), nil
}
920569
func (m *MockContext) ID() string {
	ret := m.ctrl.Call(m, "ID")
	ret0, _ := ret[0].(string)
	return ret0
}
35121
func VerifyID(encodedEncryptedData []byte, id ID) error {
	return id.h.Verify(encodedEncryptedData)
}
982635
func (s *LookupDeveloperIdentityOutput) SetIdentityId(v string) *LookupDeveloperIdentityOutput {
	s.IdentityId = &v
	return s
}