certificate

package
v0.0.0-...-86cf879 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

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 (*CertificateRepo) PutBlockChain

func (a *CertificateRepo) PutBlockChain(ctx context.Context, sn, ski, aki, cid, cidDocHash string) (*types.Transaction, error)

func (*CertificateRepo) PutS

func (*CertificateRepo) Revoke

func (a *CertificateRepo) Revoke(ctx context.Context, sn string) (*types.Transaction, error)

func (*CertificateRepo) Verify

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL