buildlog

package
v0.0.0-...-185445a Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package buildlog provides a build log viewer for Spyglass

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildLogsView

type BuildLogsView struct {
	LogViews           []LogArtifactView
	RawGetAllRequests  map[string]string
	RawGetMoreRequests map[string]string
}

BuildLogsView holds each log file view

type Lens

type Lens struct{}

Lens implements the build lens.

func (Lens) Body

func (lens Lens) Body(artifacts []lenses.Artifact, resourceDir string, data string) string

Body returns the <body> content for a build log (or multiple build logs)

func (Lens) Callback

func (lens Lens) Callback(artifacts []lenses.Artifact, resourceDir string, data string) string

Callback is used to retrieve new log segments

func (Lens) Header

func (lens Lens) Header(artifacts []lenses.Artifact, resourceDir string) string

Header executes the "header" section of the template.

func (Lens) Name

func (lens Lens) Name() string

Name returns the name.

func (Lens) Priority

func (lens Lens) Priority() int

Priority returns the priority.

func (Lens) Title

func (lens Lens) Title() string

Title returns the title.

type LineGroup

type LineGroup struct {
	Skip                   bool
	Start, End             int // closed, open
	ByteOffset, ByteLength int
	LogLines               []LogLine
}

LineGroup holds multiple lines that can be collapsed/expanded as a block

func (LineGroup) LinesSkipped

func (g LineGroup) LinesSkipped() int

LinesSkipped returns the number of lines skipped in a line group.

type LineRequest

type LineRequest struct {
	Artifact  string `json:"artifact"`
	Offset    int64  `json:"offset"`
	Length    int64  `json:"length"`
	StartLine int    `json:"startLine"`
}

type LogArtifactView

type LogArtifactView struct {
	ArtifactName string
	ArtifactLink string
	LineGroups   []LineGroup
	ViewAll      bool
}

LogArtifactView holds a single log file's view

type LogLine

type LogLine struct {
	Number      int
	Length      int
	Highlighted bool
	Skip        bool
	SubLines    []SubLine
}

LogLine represents a line displayed in the LogArtifactView.

type SubLine

type SubLine struct {
	Highlighted bool
	Text        string
}

SubLine is a part of a LogLine, used so that error terms can be highlighted.

Jump to

Keyboard shortcuts

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