cctray

package module
v0.0.0-...-fb33944 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

README

CCTray

Go Report Card GoDoc

This is a simple Golang library implementing the XML structure for the CCTray v1 Specification Standard.

This is a component of Drone CI I forked with the aim of having a clearer and more reusable implementation.

Tools that use the CCTray v1 Standard:

Documentation

Overview

Package cctray implements the CCTray v1 Specification Standard.

The standard is currently defined at https://cctray.org/v1/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Activity

type Activity string

Activity is the type for the Activity response attribute

const (
	// ActSleeping indicates activity state is "Sleeping"
	ActSleeping Activity = "Sleeping"
	// ActBuilding indicates activity state is "Building"
	ActBuilding Activity = "Building"
	// ActCheckingModifications indicates activity state is "CheckingModifications"
	ActCheckingModifications Activity = "CheckingModifications"
)

type CCProject

type CCProject struct {
	XMLName         xml.Name   `xml:"Project"`
	Name            string     `xml:"name,attr"`
	Activity        Activity   `xml:"activity,attr"`
	LastBuildStatus Status     `xml:"lastBuildStatus,attr"`
	LastBuildLabel  string     `xml:"lastBuildLabel,attr,omitempty"`
	LastBuildTime   time.Time  `xml:"lastBuildTime,attr"`
	NextBuildTime   *time.Time `xml:"nextBuildTime,attr,omitempty"`
	WebURL          string     `xml:"webUrl,attr"`
}

CCProject represents a <Project> node

type CCProjects

type CCProjects struct {
	XMLName  xml.Name     `xml:"Projects"`
	Projects []*CCProject `xml:"Project"`
}

CCProjects represents the base XML <Projects> node which contains projects

type Status

type Status string

Status is the type for the LastBuildStatus response attribute

const (
	// StatusSuccess indicates last build state was successful
	StatusSuccess Status = "Success"
	// StatusFailure indicates last build state was an expected failure
	StatusFailure Status = "Failure"
	// StatusException indicates the last build was an unexpected failure
	StatusException Status = "Exception"
	// StatusUnknown indicates last build state is not known
	StatusUnknown Status = "Unknown"
)

Jump to

Keyboard shortcuts

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