コード例 #1
0
ファイル: certstore.go プロジェクト: roger2000/goczmq
// Lookup looks up a certificate in the store by public key and
// returns it.
func (c *CertStore) Lookup(key string) *Cert {
	ptr := C.zcertstore_lookup(c.zcertstoreT, C.CString(key))
	if ptr == nil {
		return nil
	}
	return &Cert{
		zcertT: ptr,
	}
}
コード例 #2
0
ファイル: certstore.go プロジェクト: nbargnesi/goczmq
// Lookup looks up a certificate in the store by public key and
// returns it.
func (c *CertStore) Lookup(key string) *Cert {
	cKey := C.CString(key)
	defer C.free(unsafe.Pointer(cKey))

	ptr := C.zcertstore_lookup(c.zcertstoreT, cKey)
	if ptr == nil {
		return nil
	}
	return &Cert{
		zcertT: ptr,
	}
}
コード例 #3
0
ファイル: certstore.go プロジェクト: vonwenm/goczmq
// Lookup looks up a certificate in the store by public key and
// returns it.
func (c *CertStore) Lookup(key string) *Cert {
	return &Cert{
		zcertT: C.zcertstore_lookup(c.zcertstoreT, C.CString(key)),
	}
}