checkpoint

package
v0.20260720.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checkpoint

type Checkpoint struct {
	Origin     string
	Tree       tlog.Tree
	Extensions []string
}

Checkpoint represents a tlog-checkpoint note text.

https://c2sp.org/tlog-checkpoint

func Open

func Open(signedNote []byte, verifiers note.Verifiers) (*Checkpoint, *note.Note, error)

Open opens a signed checkpoint note and parses its text. An error is returned if signedNote is not a well-formed note, if any of the verifiers rejects a signature (note.InvalidSignatureError), if none of the verifiers has signed the note (note.UnverifiedNoteError), or if the note's text is not a well-formed checkpoint. Signatures from unknown keys are ignored.

func Unmarshal

func Unmarshal(text string) (*Checkpoint, error)

Unmarshal parses a checkpoint note text. The text must not have any signature lines. For a signed note, use Open.

func (*Checkpoint) Marshal

func (c *Checkpoint) Marshal() (string, error)

Marshal returns the note text, first checking the checkpoint against the tlog-checkpoint requirements. It returns an error if the checkpoint is invalid.

Jump to

Keyboard shortcuts

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