chrome_branch

package
v0.0.0-...-e0ff526 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RefMain is the ref name for the main branch.
	RefMain = git.DefaultRef
)

Variables

This section is empty.

Functions

func Get

func Get(ctx context.Context, c *http.Client) (*Branches, []*Branch, error)

Get retrieves the current Branches and the list of active milestones.

func ReleaseBranchRef

func ReleaseBranchRef(number int) string

ReleaseBranchRef returns the fully-qualified ref for the release branch with the given number.

Types

type Branch

type Branch struct {
	// Milestone number for this branch.
	Milestone int `json:"milestone"`
	// Branch number for this branch. Always zero for the main branch, because
	// numbered release candidates are cut from this branch regularly and there
	// is no single number which refers to it.
	Number int `json:"number"`
	// Fully-qualified ref for this branch.
	Ref string `json:"ref"`
	// Corresponding V8 ref (calculated)
	V8Branch string
}

Branch describes a single Chrome release branch.

func (*Branch) Copy

func (b *Branch) Copy() *Branch

Copy the Branch.

func (*Branch) Validate

func (b *Branch) Validate() error

Validate returns an error if the Branch is not valid.

type Branches

type Branches struct {
	Main   *Branch `json:"main"`
	Dev    *Branch `json:"dev"`
	Beta   *Branch `json:"beta"`
	Stable *Branch `json:"stable"`
}

Branches describes the mapping from Chrome release channel name to branch number.

func (*Branches) Copy

func (b *Branches) Copy() *Branches

Copy the Branches.

func (*Branches) Validate

func (b *Branches) Validate() error

Validate returns an error if the Branches are not valid.

type Client

type Client interface {
	// Get retrieves the current Branches and the list of active milestones.
	Get(context.Context) (*Branches, []*Branch, error)
}

Client is a wrapper for Get which facilitates testing.

func NewClient

func NewClient(c *http.Client) Client

NewClient returns a Client instance.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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