infrastructure

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GPGSigner

type GPGSigner struct {
	// contains filtered or unexported fields
}

GPGSigner signs commits using a GPG key.

func NewGPGSigner

func NewGPGSigner(key *openpgp.Entity) *GPGSigner

NewGPGSigner creates a new GPGSigner with the given GPG key entity.

func (*GPGSigner) Key

func (s *GPGSigner) Key() *openpgp.Entity

Key returns the underlying GPG key entity for use with go-git's SignKey option.

func (*GPGSigner) Sign

func (s *GPGSigner) Sign(_ context.Context, commitContent []byte) (string, error)

Sign signs the commit content using the GPG key and returns the armored signature.

type SSHSigner

type SSHSigner struct {
	// contains filtered or unexported fields
}

SSHSigner signs commits using an SSH key.

func NewSSHSigner

func NewSSHSigner(keyPath string) *SSHSigner

NewSSHSigner creates a new SSHSigner with the given SSH key file path.

func (*SSHSigner) Sign

func (s *SSHSigner) Sign(ctx context.Context, commitContent []byte) (string, error)

Sign signs the commit content using ssh-keygen and returns the SSH signature.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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