phab

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package phab provides functionality to interact with Phabricator.

The primary purpose is to convert failures to JSON that is compatible with the Harbormaster API.

https://secure.phabricator.com/conduit/method/harbormaster.sendmessage

Index

Constants

View Source
const (
	// DefaultHarbormasterLintResultName is the default name
	// used when populating a HarbormasterLintResult.
	DefaultHarbormasterLintResultName = "PROTOTOOL"
	// DefaultHarbormasterLintResultCode is the default code
	// used when populating a HarbormasterLintResult. This will
	// only be used if there is no ID for lint failure.
	DefaultHarbormasterLintResultCode = "PROTOTOOL"
	// DefaultHarbormasterLintResultSeverity is the default severity
	// used when populating a HarbormasterLintResult.
	DefaultHarbormasterLintResultSeverity = "error"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HarbormasterLintResult

type HarbormasterLintResult struct {
	Name        string `json:"name,omitempty"`
	Code        string `json:"code,omitempty"`
	Severity    string `json:"severity,omitempty"`
	Path        string `json:"path,omitempty"`
	Line        int    `json:"line,omitempty"`
	Char        int    `json:"char,omitempty"`
	Description string `json:"description,omitempty"`
}

HarbormasterLintResult represents a text.Failure in a structure compatible with a Harbormaster Lint Result. It is meant to be encoded to JSON.

https://secure.phabricator.com/conduit/method/harbormaster.sendmessage

func TextFailureToHarbormasterLintResult

func TextFailureToHarbormasterLintResult(textFailure *text.Failure) (*HarbormasterLintResult, error)

TextFailureToHarbormasterLintResult converts a text.Failure to a HarbormasterLintResult.

Jump to

Keyboard shortcuts

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