Documentation ¶
Overview ¶
Package botdata implements parsing and generation logic for BotData.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ActionType ¶
type ActionType string
ActionType describes the type of the action taken by CV against a Gerrit Change.
const ( // Start indicates that LUCI CV has started a Run for a Gerrit Change. Start ActionType = "start" // Cancel indicates that LUCI CV has cancelled a Run for Gerrit Change. Cancel = "cancel" )
func (*ActionType) UnmarshalJSON ¶
func (at *ActionType) UnmarshalJSON(b []byte) error
UnmarshalJSON sets `*at` to the `ActionType` the given bytes represents. Returns error for types other than `Start` or `Cancel`.
type BotData ¶
type BotData struct { // Action describes the action taken by CV against a Gerrit Change. Action ActionType `json:"action"` // TriggeredAt is the timestamp when this action is triggered. TriggeredAt time.Time `json:"triggered_at"` // Revision is the revision (patch set) of the change at the time this // action is triggered. Revision string `json:"revision"` }
BotData records an action taken by CV against a Gerrit Change.
type ChangeID ¶
type ChangeID struct { // Host is the Gerrit host name for the Change. Host string // Number is the Gerrit Change number. Number int64 }
ChangeID is the unique identifier for a Gerrit Change.
func (*ChangeID) MarshalText ¶
MarshalText encodes `c` in the from of "c.Host:c.Number".
func (*ChangeID) UnmarshalText ¶
UnmarshalText decodes the bytes and sets `*c` to the resurrected `ChangeID`.
Click to show internal directories.
Click to hide internal directories.