Documentation ¶
Index ¶
- func Checksum(checksum []byte) func(o *selfupdate.Options)
- func Hash(hash crypto.Hash) func(o *selfupdate.Options)
- func NewSysProcAttr(setsid ...bool) *syscall.SysProcAttr
- func OldSavePath(oldSavePath string) func(o *selfupdate.Options)
- func Patcher(patcher selfupdate.Patcher) func(o *selfupdate.Options)
- func PublicKey(publicKey crypto.PublicKey) func(o *selfupdate.Options)
- func Restart(exiter func(error), executable string, mode ...string) error
- func Signature(signature []byte) func(o *selfupdate.Options)
- func TargetMode(mode os.FileMode) func(o *selfupdate.Options)
- func Update(r io.Reader, targetPath string, opts ...func(o *selfupdate.Options)) error
- func Verifier(verifier selfupdate.Verifier) func(o *selfupdate.Options)
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 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 Verifier ¶
func Verifier(verifier selfupdate.Verifier) func(o *selfupdate.Options)
Pluggable signature verification algorithm. If nil, ECDSA is used.
Types ¶
This section is empty.