Movatterモバイル変換


[0]ホーム

URL:


Alert GO-2024-3228: Coder vulnerable to post-auth URL redirection to untrusted site ('Open Redirect') in github.com/coder/coder
Notice  The highest tagged major version isv2.

updatecheck

package
v0.27.3Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License:AGPL-3.0Imports:12Imported by:0

Details

Repository

github.com/coder/coder

Links

Documentation

Overview

Package updatecheck provides a mechanism for periodically checkingfor updates to Coder.

The update check is performed by querying the GitHub API for thelatest release of Coder.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

typeChecker

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

Checker is responsible for periodically checking for updates.

funcNew

func New(dbdatabase.Store, logslog.Logger, optsOptions) *Checker

New returns a new Checker that periodically checks for Coder updates.

func (*Checker)Close

func (c *Checker) Close()error

func (*Checker)Latest

func (c *Checker) Latest(ctxcontext.Context) (rResult, errerror)

Latest returns the latest version of Coder.

typeOptions

type Options struct {// Client is the HTTP client to use for the update check,// if omitted, http.DefaultClient will be used.Client *http.Client// URL is the URL to check for the latest version of Coder,// if omitted, the default URL will be used.URLstring// Interval is the interval at which to check for updates,// default 24h.Intervaltime.Duration// UpdateTimeout sets the timeout for the update check,// default 30s.UpdateTimeouttime.Duration// Notify is called when a newer version of Coder (than the// last update check) is available.Notify func(rResult)}

Options set optional parameters for the update check.

typeResult

type Result struct {Checkedtime.Time `json:"checked,omitempty"`Versionstring    `json:"version,omitempty"`URLstring    `json:"url,omitempty"`}

Result is the result from the last update check.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp