symbol

package
v0.0.0-...-1ae3dfb Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2017 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ArchX86 = "x86"
	ArchX64 = "x64"
)

Variables

View Source
var (
	ErrBuildNotExist       = fmt.Errorf("build not exist")
	ErrBranchNotInit       = fmt.Errorf("branch not initialized")
	ErrBranchOnSymbolStore = fmt.Errorf("invalid branch on symbol store")
	ErrBranchOnBuildServer = fmt.Errorf("invalid branch on build server")
)

Functions

func GetServer

func GetServer() *sserver

GetServer return single instance of sserver

Types

type BrBuilder

type BrBuilder struct {
	Branch
	// contains filtered or unexported fields
}

BrBuilder represent pdb release

func (*BrBuilder) AddBuild

func (b *BrBuilder) AddBuild(buildVerion string) error

AddBuild add new version of pdb

func (*BrBuilder) CanBrowse

func (b *BrBuilder) CanBrowse() bool

CanBrowse check if current branch is valid on local symbol store.

func (*BrBuilder) CanUpdate

func (b *BrBuilder) CanUpdate() bool

CanUpdate check if current branch is valid on build server.

func (*BrBuilder) Delete

func (b *BrBuilder) Delete() error

Delete current branch

func (*BrBuilder) GetBranch

func (b *BrBuilder) GetBranch() *Branch

GetBranch get branch information

func (*BrBuilder) GetLatestID

func (b *BrBuilder) GetLatestID() string

GetLatestID return the last symbol build id

func (*BrBuilder) GetSymbolPath

func (b *BrBuilder) GetSymbolPath(hash, name string) string

GetSymbolPath return symbol's full path

func (*BrBuilder) Load

func (b *BrBuilder) Load() error

Load will load branch information from 000Admin/branch.bin

func (*BrBuilder) Name

func (b *BrBuilder) Name() string

Name return name in symbol store

func (*BrBuilder) ParseBuilds

func (b *BrBuilder) ParseBuilds(handler func(b *Build) error) (int, error)

ParseBuilds parse server.txt to get pdb history

func (*BrBuilder) ParseSymbols

func (b *BrBuilder) ParseSymbols(buildID string, handler func(sym *Symbol) error) (int, error)

ParseSymbols parse 000000001(*) from pdb path

func (*BrBuilder) Persist

func (b *BrBuilder) Persist() error

Persist will save branch information into 000Admin/branch.bin

func (*BrBuilder) SetSubpath

func (b *BrBuilder) SetSubpath(buildserver, localstore string) error

SetSubpath change the subpath on build server and local store. `buildserver` is the subpath relative to config.BuildSource. `localstore` is the subpath relative to config.Destination.

type Branch

type Branch struct {
	BuildName   string `json:"buildName"`
	StoreName   string `json:"storeName"`
	BuildPath   string `json:"buildPath"`
	StorePath   string `json:"storePath"`
	UpdateDate  string `json:"updateDate"`
	LatestBuild string `json:"latestBuild"`
	BuildsCount int    `json:"buildsCount"`
}

Branch ... information

type Build

type Build struct {
	ID      string `json:"id"`
	Date    string `json:"date"`
	Branch  string `json:"branch"`
	Version string `json:"version"`
	Comment string `json:"comment"`
}

Build ... analyze from server.txt

type Builder

type Builder interface {
	// Name return builder name
	Name() string
	// Get struct *Branch {}
	GetBranch() *Branch

	// CanUpdate check if current branch is valid on build server.
	CanUpdate() bool
	// CanBrowse check if current branch is valid on local symbol store.
	CanBrowse() bool

	// SetSubpath change the subpath on build server and local store.
	SetSubpath(buildserver, localstore string) error

	// Add an given build pdb to symbol server.
	// if `buildVersion` is empty, it will try to add the latest build on build server if exist.
	AddBuild(buildVerion string) error

	// GetSymbolPath get given symbol file full path on symbol server.
	// The path can be used to serve download.
	GetSymbolPath(hash, name string) string

	// ParseBuilds parse all version of builds that already in the symbol server of curent branch.
	//
	ParseBuilds(handler func(b *Build) error) (int, error)

	// ParseSymbols parse all the symbols of given build vesrion
	//
	ParseSymbols(buildID string, handler func(sym *Symbol) error) (int, error)
}

Builder interface

func NewBranch

func NewBranch(buildName, storeName string) Builder

NewBranch create an new `BrBuilder`, `Init` must be called after `NewBranch`.

func NewBranch2

func NewBranch2(branch *Branch) Builder

NewBranch2 ...

type Symbol

type Symbol struct {
	Arch    string `json:"arch"` // x64 or x86
	Hash    string `json:"hash"`
	Name    string `json:"name"`
	Path    string `json:"path"`
	URL     string `json:"url"`
	Version string `json:"version"`
}

Symbol represent each symbol file's detail

Jump to

Keyboard shortcuts

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