formats

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

AllPayloadTypes is a list of all valid Payload types.

Functions

This section is empty.

Types

type Critical

type Critical struct {
	Identity map[string]string
	Image    map[string]string
	Type     string
}

type PayloadType

type PayloadType string
const (
	PayloadTypeTekton        PayloadType = "tekton"
	PayloadTypeSimpleSigning PayloadType = "simplesigning"
)

type Payloader

type Payloader interface {
	CreatePayload(obj interface{}) (interface{}, error)
	Type() PayloadType
}

Payloader is an interface to generate a chains Payload from a TaskRun

type Simple

type Simple struct {
	Critical Critical
	Optional map[string]interface{}
}

func NewSimpleStruct

func NewSimpleStruct() Simple

func (*Simple) ImageName

func (s *Simple) ImageName() string

type SimpleSigning

type SimpleSigning struct {
}

SimpleSigning is a formatter that uses the RedHat simple signing format https://www.redhat.com/en/blog/container-image-signing

func (*SimpleSigning) CreatePayload

func (i *SimpleSigning) CreatePayload(obj interface{}) (interface{}, error)

CreatePayload implements the Payloader interface.

func (*SimpleSigning) Type

func (i *SimpleSigning) Type() PayloadType

type Tekton

type Tekton struct {
}

Tekton is a formatter that just captures the TaskRun Status with no modifications.

func (*Tekton) CreatePayload

func (i *Tekton) CreatePayload(obj interface{}) (interface{}, error)

CreatePayload implements the Payloader interface.

func (*Tekton) Type

func (i *Tekton) Type() PayloadType

Jump to

Keyboard shortcuts

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