models

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

TODO create a separate package just for these structs, then import them in Veriif and CerTiiF.

TODO create a separate package just for these structs, then import them in Veriif and CerTiiF.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SchemeCertDataDecoder

func SchemeCertDataDecoder(s string) reflect.Value

Types

type CertData

type CertData map[string]string

type CertPacket

type CertPacket struct {
	Data        CertData      `json:"data"`
	Hash        EncodingGroup `json:"hash"`
	MerkleProof MerkleProof   `json:"merkle_proof"`
	MerkleRoot  EncodingGroup `json:"merkle_root"`
	KeyType     string        `json:"key_type"`
	PublicKey   string        `json:"public_key"`
	Signature   EncodingGroup `json:"signature"`
}

type CertPacketLite

type CertPacketLite struct {
	D CertData `json:"d"` // Certificate [D]ata
	H string   `json:"h"` // [H]ash of certificate data
	P []string `json:"p"` // Merkle [P]roof
	R string   `json:"r"` // Merkle [R]oot
	T string   `json:"t"` // Signing key [T]ype
	K string   `json:"k"` // Signing [K]ey public element
	S string   `json:"s"` // Signing key [S]ignature of certificate hash
}

func (CertPacketLite) ToCertPacket

func (cpl CertPacketLite) ToCertPacket() (*CertPacket, error)

func (*CertPacketLite) UnmarshalSchemaQuery

func (cpl *CertPacketLite) UnmarshalSchemaQuery(uv url.Values) error

type EncodingGroup

type EncodingGroup struct {
	Hex    string `json:"hex"`
	Base64 string `json:"base64"`
}

func NewEncodingGroup

func NewEncodingGroup(hash []byte) EncodingGroup

func (*EncodingGroup) Decode

func (e *EncodingGroup) Decode() ([]byte, error)

type MerkleProof

type MerkleProof []map[string]EncodingGroup

Jump to

Keyboard shortcuts

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