Documentation ¶
Index ¶
- Variables
- type Certificate
- type CertificateRepo
- func (a *CertificateRepo) GetBlockChain(ctx context.Context, sn string) (*contract.CertificateCert, error)
- func (a *CertificateRepo) GetS(ctx context.Context, id string) (*schema.Certificate, error)
- func (a *CertificateRepo) PutBlockChain(ctx context.Context, sn, ski, aki, cid, cidDocHash string) (*types.Transaction, error)
- func (a *CertificateRepo) PutS(ctx context.Context, item schema.Certificate) (*schema.IDResult, error)
- func (a *CertificateRepo) Revoke(ctx context.Context, sn string) (*types.Transaction, error)
- func (a *CertificateRepo) Verify(ctx context.Context, sn string) (*contract.CertificateCert, error)
- type Certificates
- type SchemaCertificate
Constants ¶
This section is empty.
Variables ¶
View Source
var CertificateSet = wire.NewSet(wire.Struct(new(CertificateRepo), "DB", "Eth"))
Functions ¶
This section is empty.
Types ¶
type Certificate ¶
type Certificate struct { SerialNumber string `json:"serial_number"` AuthorityKeyIdentifier string `json:"authority_key_identifier"` CertPem string `json:"cert_pem"` NotBefore time.Time `json:"not_before"` NotAfter time.Time `json:"not_after"` MetaData map[string]interface{} `json:"meta_data"` }
func (Certificate) ToSchemaCertificate ¶
func (a Certificate) ToSchemaCertificate() *schema.Certificate
type CertificateRepo ¶
type CertificateRepo struct { DB storage.ExecCloser Eth *contract.EthClient }
func (*CertificateRepo) GetBlockChain ¶
func (a *CertificateRepo) GetBlockChain(ctx context.Context, sn string) (*contract.CertificateCert, error)
func (*CertificateRepo) GetS ¶
func (a *CertificateRepo) GetS(ctx context.Context, id string) (*schema.Certificate, error)
func (*CertificateRepo) PutBlockChain ¶
func (a *CertificateRepo) PutBlockChain(ctx context.Context, sn, ski, aki, cid, cidDocHash string) (*types.Transaction, error)
func (*CertificateRepo) PutS ¶
func (a *CertificateRepo) PutS(ctx context.Context, item schema.Certificate) (*schema.IDResult, error)
func (*CertificateRepo) Revoke ¶
func (a *CertificateRepo) Revoke(ctx context.Context, sn string) (*types.Transaction, error)
func (*CertificateRepo) Verify ¶
func (a *CertificateRepo) Verify(ctx context.Context, sn string) (*contract.CertificateCert, error)
type Certificates ¶
type Certificates []*Certificate
func (Certificates) ToSchemaCertificates ¶
func (a Certificates) ToSchemaCertificates() []*schema.Certificate
type SchemaCertificate ¶
type SchemaCertificate schema.Certificate
func (SchemaCertificate) ToCertificate ¶
func (a SchemaCertificate) ToCertificate() *Certificate
Click to show internal directories.
Click to hide internal directories.