trustedpublisher

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExistingByteMatch   = "existing_byte_match"
	Mixed               = "mixed"
	PublishedByWorkflow = "published_by_workflow"
)

Variables

This section is empty.

Functions

func AdmitPublicationMode

func AdmitPublicationMode(raw string, context string) (string, error)

func PublicationModeRequiresIdentity

func PublicationModeRequiresIdentity(raw string, context string) (bool, error)

func RepositorySlugFromGitHubURL

func RepositorySlugFromGitHubURL(rawURL string) (string, error)

Types

type Expected

type Expected struct {
	Environment string
	Job         string
	ProjectName string
	Provider    string
	Registry    string
	Repository  string
	WorkflowRef string
}

type Identity

type Identity struct {
	Environment string `json:"environment"`
	Job         string `json:"job"`
	ProjectName string `json:"projectName"`
	Provider    string `json:"provider"`
	Registry    string `json:"registry"`
	Repository  string `json:"repository"`
	WorkflowRef string `json:"workflowRef"`
}

func Admit

func Admit(identity Identity, expected Expected, context string) (Identity, error)

func FromEnv

func FromEnv(prefix string, expected Expected, getenv func(string) string) (Identity, error)

Jump to

Keyboard shortcuts

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