analyze

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2019 License: Unlicense Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeySet

type KeySet struct {
	Hash         string   `json:"pubkey_hash"`
	Signers      []Signer `json:"signers"`
	Valid        bool     `json:"valid"`
	ErrorMessage string   `json:"error_message,omitempty"`
}

func NewKeySet

func NewKeySet(b []byte) (*KeySet, error)

type Payload

type Payload struct {
	Raw                pb.Payload `json:"raw_payload"`
	Hash               string     `json:"endpoint_hash"`
	Timestamp          time.Time  `json:"timestamp"`
	TTL                string     `json:"ttl"`
	Expired            bool       `json:"expired"`
	ValidVersion       bool       `json:"valid_version"`
	ValidTimestamp     bool       `json:"valid_timestamp"`
	WithinSubmitWindow bool       `json:"within_submit_window"`
	ValidTTL           bool       `json:"valid_ttl"`
	ValidSignatures    bool       `json:"valid_signatures"`
	ValidLength        bool       `json:"valid_length"`
	ValidDataSize      bool       `json:"valid_data_size"`
	ValidPayloadSize   bool       `json:"valid_payload_size"`
	ErrorMessage       string     `json:"error_message,omitempty"`
}

Payload is the analyze struct container for the standard output.

func NewPayload

func NewPayload(b []byte) (*Payload, error)

NewPayload returns a payload analysis and runs the entire validation suite on the output

type Signer

type Signer struct {
	Type  string `json:"type"`
	Count string `json:"count,omitempty"`
	PQR   bool   `json:"pqr"`
}

Jump to

Keyboard shortcuts

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