fake

package
v0.0.0-...-545a4bc Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0, BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Overview

Package fake is a fake implementation of the Client interface for testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(signer crypto.Signer) verifier.Client

NewClient constructs a new fake client given a crypto.Signer.

Types

type Claims

type Claims struct {
	jwt.RegisteredClaims
	ContainerImageSignatures []ContainerImageSignatureClaims `json:"container_image_signatures"`
	MachineStateMarshaled    string
}

Claims contains information to be formatted into a fake JWT.

func (Claims) Valid

func (c Claims) Valid() error

Valid is necessary to implement the jwt.Claims interface.

type ContainerImageSignatureClaims

type ContainerImageSignatureClaims struct {
	Payload   string `json:"payload"`
	Signature string `json:"signature"`
	PubKey    string `json:"public_key"`
	SigAlg    string `json:"signature_algorithm"`
}

ContainerImageSignatureClaims contains claims about a container image signature.

Jump to

Keyboard shortcuts

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