> For the complete documentation index, see [llms.txt](https://yeasy.gitbook.io/hyperledger_code_fabric/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yeasy.gitbook.io/hyperledger_code_fabric/msp/identities_go.md).

# identities.go

定义了 identity 和 signingidentity 私有结构。

```go
type identity struct {
    // id contains the identifier (MSPID and identity identifier) for this instance
    id *IdentityIdentifier

    // cert contains the x.509 certificate that signs the public key of this instance
    cert *x509.Certificate

    // this is the public key of this instance
    pk bccsp.Key

    // reference to the MSP that "owns" this identity
    msp *bccspmsp
}

type signingidentity struct {
    // we embed everything from a base identity
    identity

    // signer corresponds to the object that can produce signatures from this identity
    signer *signer.CryptoSigner
}
```
