selfupdate

package
v0.6.32 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Checksum

func Checksum(checksum []byte) func(o *selfupdate.Options)

Checksum of the new binary to verify against. If nil, no checksum or signature verification is done.

func Hash

func Hash(hash crypto.Hash) func(o *selfupdate.Options)

Use this hash function to generate the checksum. If not set, SHA256 is used.

func NewSysProcAttr

func NewSysProcAttr(setsid ...bool) *syscall.SysProcAttr

func OldSavePath

func OldSavePath(oldSavePath string) func(o *selfupdate.Options)

Store the old executable file at this path after a successful update. The empty string means the old executable file will be removed after the update.

func Patcher

func Patcher(patcher selfupdate.Patcher) func(o *selfupdate.Options)

If nil, treat the update as a complete replacement for the contents of the file at TargetPath. If non-nil, treat the update contents as a patch and use this object to apply the patch.

func PublicKey

func PublicKey(publicKey crypto.PublicKey) func(o *selfupdate.Options)

Public key to use for signature verification. If nil, no signature verification is done.

func Restart

func Restart(exiter func(error), executable string, mode ...string) error

func Signature

func Signature(signature []byte) func(o *selfupdate.Options)

Signature to verify the updated file. If nil, no signature verification is done.

func TargetMode

func TargetMode(mode os.FileMode) func(o *selfupdate.Options)

Create TargetPath replacement with this file mode. If zero, defaults to 0755.

func Update

func Update(r io.Reader, targetPath string, opts ...func(o *selfupdate.Options)) error

func Verifier

func Verifier(verifier selfupdate.Verifier) func(o *selfupdate.Options)

Pluggable signature verification algorithm. If nil, ECDSA is used.

Types

This section is empty.

Jump to

Keyboard shortcuts

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