Documentation
¶
Index ¶
- func CompleteTicketAssign(client *gqlclient.Client, ctx context.Context, name string, id int32) (me *User, trackerByName *Tracker, err error)
- func CompleteTicketAssignByOwner(client *gqlclient.Client, ctx context.Context, owner string, tracker string, ...) (me *User, trackerByOwner *Tracker, err error)
- func PermissionIcon(permission bool) string
- type ACL
- type ACLCursor
- type ACLInput
- type AccessKind
- type AccessScope
- type ActivitySubscription
- type ActivitySubscriptionCursor
- type Assignment
- type Authenticity
- type Comment
- type Created
- type Cursor
- type DefaultACL
- type EmailAddress
- type Entity
- type Event
- func AssignUser(client *gqlclient.Client, ctx context.Context, trackerId int32, ticketId int32, ...) (assignUser *Event, err error)
- func SubmitComment(client *gqlclient.Client, ctx context.Context, trackerId int32, ticketId int32, ...) (submitComment *Event, err error)
- func UnassignUser(client *gqlclient.Client, ctx context.Context, trackerId int32, ticketId int32, ...) (unassignUser *Event, err error)
- func UpdateTicketStatus(client *gqlclient.Client, ctx context.Context, trackerId int32, ticketId int32, ...) (updateTicketStatus *Event, err error)
- type EventCursor
- type EventDetail
- type EventType
- type ExternalUser
- type ImportInput
- type Label
- type LabelCursor
- type LabelUpdate
- type StatusChange
- type SubmitCommentInput
- type SubmitTicketInput
- type Ticket
- type TicketCursor
- type TicketMention
- type TicketResolution
- type TicketStatus
- type TicketSubscription
- func TicketSubscribe(client *gqlclient.Client, ctx context.Context, trackerId int32, ticketId int32) (ticketSubscribe *TicketSubscription, err error)
- func TicketUnsubscribe(client *gqlclient.Client, ctx context.Context, trackerId int32, ticketId int32) (ticketUnsubscribe *TicketSubscription, err error)
- type Tracker
- func AclByTrackerName(client *gqlclient.Client, ctx context.Context, name string) (trackerByName *Tracker, err error)
- func Assignees(client *gqlclient.Client, ctx context.Context, name string, id int32) (trackerByName *Tracker, err error)
- func AssigneesByOwner(client *gqlclient.Client, ctx context.Context, owner string, tracker string, ...) (trackerByOwner *Tracker, err error)
- func CompleteTicketId(client *gqlclient.Client, ctx context.Context, name string) (trackerByName *Tracker, err error)
- func CompleteTicketIdByOwner(client *gqlclient.Client, ctx context.Context, owner string, tracker string) (trackerByOwner *Tracker, err error)
- func DeleteTracker(client *gqlclient.Client, ctx context.Context, id int32) (deleteTracker *Tracker, err error)
- func Labels(client *gqlclient.Client, ctx context.Context, name string) (trackerByName *Tracker, err error)
- func LabelsByOwner(client *gqlclient.Client, ctx context.Context, owner string, tracker string) (trackerByOwner *Tracker, err error)
- func Tickets(client *gqlclient.Client, ctx context.Context, name string) (trackerByName *Tracker, err error)
- func TicketsByOwner(client *gqlclient.Client, ctx context.Context, owner string, tracker string) (trackerByOwner *Tracker, err error)
- func TrackerIDByName(client *gqlclient.Client, ctx context.Context, name string) (trackerByName *Tracker, err error)
- func TrackerIDByOwner(client *gqlclient.Client, ctx context.Context, owner string, tracker string) (trackerByOwner *Tracker, err error)
- type TrackerACL
- type TrackerCursor
- type TrackerInput
- type TrackerSubscription
- type URL
- type UpdateLabelInput
- type UpdateStatusInput
- type UpdateTicketInput
- type User
- type UserMention
- type Version
- type Visibility
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompleteTicketAssign ¶
func PermissionIcon ¶
Types ¶
type ACL ¶
type ACL struct { // Permission to view tickets Browse bool `json:"browse"` // Permission to submit tickets Submit bool `json:"submit"` // Permission to comment on tickets Comment bool `json:"comment"` // Permission to edit tickets Edit bool `json:"edit"` // Permission to resolve, re-open, transfer, or label tickets Triage bool `json:"triage"` }
type ACLCursor ¶
type ACLCursor struct { Results []TrackerACL `json:"results"` Cursor *Cursor `json:"cursor,omitempty"` }
A cursor for enumerating access control list entries
If there are additional results available, the cursor object may be passed back into the same endpoint to retrieve another page. If the cursor is null, there are no remaining results to return.
type ACLInput ¶
type ACLInput struct { // Permission to view tickets Browse bool `json:"browse"` // Permission to submit tickets Submit bool `json:"submit"` // Permission to comment on tickets Comment bool `json:"comment"` // Permission to edit tickets Edit bool `json:"edit"` // Permission to resolve, re-open, transfer, or label tickets Triage bool `json:"triage"` }
type AccessKind ¶
type AccessKind string
const ( AccessKindRo AccessKind = "RO" AccessKindRw AccessKind = "RW" )
type AccessScope ¶
type AccessScope string
const ( AccessScopeProfile AccessScope = "PROFILE" AccessScopeTrackers AccessScope = "TRACKERS" AccessScopeTickets AccessScope = "TICKETS" AccessScopeAcls AccessScope = "ACLS" AccessScopeEvents AccessScope = "EVENTS" AccessScopeSubscriptions AccessScope = "SUBSCRIPTIONS" )
type ActivitySubscription ¶
type ActivitySubscriptionCursor ¶
type ActivitySubscriptionCursor struct { Results []ActivitySubscription `json:"results"` Cursor *Cursor `json:"cursor,omitempty"` }
A cursor for enumerating subscriptions
If there are additional results available, the cursor object may be passed back into the same endpoint to retrieve another page. If the cursor is null, there are no remaining results to return.
type Assignment ¶
type Authenticity ¶
type Authenticity string
const ( // The server vouches for this information as entered verbatim by the // attributed entity. AuthenticityAuthentic Authenticity = "AUTHENTIC" // The server does not vouch for this information as entered by the attributed // entity, no authentication was provided. AuthenticityUnauthenticated Authenticity = "UNAUTHENTICATED" // The server has evidence that the information has likely been manipulated by // a third-party. AuthenticityTampered Authenticity = "TAMPERED" )
type Comment ¶
type Comment struct { EventType EventType `json:"eventType"` Ticket *Ticket `json:"ticket"` Author *Entity `json:"author"` Text string `json:"text"` Authenticity Authenticity `json:"authenticity"` // If this comment has been edited, this field points to the new revision. SupersededBy *Comment `json:"supersededBy,omitempty"` }
type DefaultACL ¶
type DefaultACL struct { Browse bool `json:"browse"` Submit bool `json:"submit"` Comment bool `json:"comment"` Edit bool `json:"edit"` Triage bool `json:"triage"` }
These ACL policies are applied non-specifically, e.g. the default ACL for all authenticated users.
func (DefaultACL) TermString ¶
func (acl DefaultACL) TermString() string
type EmailAddress ¶
type Event ¶
type Event struct { Id int32 `json:"id"` Created time.Time `json:"created"` Changes []EventDetail `json:"changes"` Ticket *Ticket `json:"ticket"` }
Represents an event which affects a ticket. Multiple changes can occur in a single event, and are enumerated in the "changes" field.
func AssignUser ¶
func SubmitComment ¶
func UnassignUser ¶
type EventCursor ¶
type EventCursor struct { Results []Event `json:"results"` Cursor *Cursor `json:"cursor,omitempty"` }
A cursor for enumerating events
If there are additional results available, the cursor object may be passed back into the same endpoint to retrieve another page. If the cursor is null, there are no remaining results to return.
type EventDetail ¶
type EventType ¶
type EventType string
const ( EventTypeCreated EventType = "CREATED" EventTypeComment EventType = "COMMENT" EventTypeStatusChange EventType = "STATUS_CHANGE" EventTypeLabelAdded EventType = "LABEL_ADDED" EventTypeLabelRemoved EventType = "LABEL_REMOVED" EventTypeAssignedUser EventType = "ASSIGNED_USER" EventTypeUnassignedUser EventType = "UNASSIGNED_USER" EventTypeUserMentioned EventType = "USER_MENTIONED" EventTypeTicketMentioned EventType = "TICKET_MENTIONED" )
type ExternalUser ¶
type ExternalUser struct { CanonicalName string `json:"canonicalName"` // <service>:<service specific details...> // e.g. github:ddevault ExternalId string `json:"externalId"` // The canonical external URL for this user, e.g. https://github.com/ddevault ExternalUrl *string `json:"externalUrl,omitempty"` }
type ImportInput ¶
type ImportInput struct { Created time.Time `json:"created"` // External user ID. By convention this should be "service:username", e.g. // "codeberg:ddevault". ExternalId string `json:"externalId"` // A URL at which the user's external profile may be found, e.g. // "https://codeberg.org/ddevault". ExternalUrl string `json:"externalUrl"` }
This is used for importing tickets from third-party services, and may only be used by the tracker owner. It causes a ticket submission, update, or comment to be attributed to an external user and appear as if it were submitted at a specific time.
type Label ¶
type Label struct { Id int32 `json:"id"` Created time.Time `json:"created"` Name string `json:"name"` Tracker *Tracker `json:"tracker"` // In CSS hexadecimal format BackgroundColor string `json:"backgroundColor"` ForegroundColor string `json:"foregroundColor"` Tickets *TicketCursor `json:"tickets"` }
func CreateLabel ¶
func DeleteLabel ¶
func (Label) TermString ¶
type LabelCursor ¶
type LabelCursor struct { Results []Label `json:"results"` Cursor *Cursor `json:"cursor,omitempty"` }
A cursor for enumerating labels
If there are additional results available, the cursor object may be passed back into the same endpoint to retrieve another page. If the cursor is null, there are no remaining results to return.
type LabelUpdate ¶
type StatusChange ¶
type StatusChange struct { EventType EventType `json:"eventType"` Ticket *Ticket `json:"ticket"` Editor *Entity `json:"editor"` OldStatus TicketStatus `json:"oldStatus"` NewStatus TicketStatus `json:"newStatus"` OldResolution TicketResolution `json:"oldResolution"` NewResolution TicketResolution `json:"newResolution"` }
type SubmitCommentInput ¶
type SubmitCommentInput struct { Text string `json:"text"` Status *TicketStatus `json:"status,omitempty"` Resolution *TicketResolution `json:"resolution,omitempty"` // For use by the tracker owner only Import *ImportInput `json:"import,omitempty"` }
You may omit the status or resolution fields to leave them unchanged (or if you do not have permission to change them). "resolution" is required if status is RESOLVED.
type SubmitTicketInput ¶
type Ticket ¶
type Ticket struct { // The ticket ID is unique within each tracker, but is not globally unique. // The first ticket opened on a given tracker will have ID 1, then 2, and so // on. Id int32 `json:"id"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` Submitter *Entity `json:"submitter"` Tracker *Tracker `json:"tracker"` // Canonical ticket reference string; may be used in comments to identify the // ticket from anywhere. Ref string `json:"ref"` Subject string `json:"subject"` Body *string `json:"body,omitempty"` Status TicketStatus `json:"status"` Resolution TicketResolution `json:"resolution"` Authenticity Authenticity `json:"authenticity"` Labels []Label `json:"labels"` Assignees []Entity `json:"assignees"` Events *EventCursor `json:"events"` // If the authenticated user is subscribed to this ticket, this is that // subscription. Subscription *TicketSubscription `json:"subscription,omitempty"` }
type TicketCursor ¶
type TicketCursor struct { Results []Ticket `json:"results"` Cursor *Cursor `json:"cursor,omitempty"` }
A cursor for enumerating tickets
If there are additional results available, the cursor object may be passed back into the same endpoint to retrieve another page. If the cursor is null, there are no remaining results to return.
type TicketMention ¶
type TicketResolution ¶
type TicketResolution string
const ( TicketResolutionUnresolved TicketResolution = "UNRESOLVED" TicketResolutionFixed TicketResolution = "FIXED" TicketResolutionImplemented TicketResolution = "IMPLEMENTED" TicketResolutionWontFix TicketResolution = "WONT_FIX" TicketResolutionByDesign TicketResolution = "BY_DESIGN" TicketResolutionInvalid TicketResolution = "INVALID" TicketResolutionDuplicate TicketResolution = "DUPLICATE" TicketResolutionNotOurBug TicketResolution = "NOT_OUR_BUG" )
func ParseTicketResolution ¶
func ParseTicketResolution(s string) (TicketResolution, error)
type TicketStatus ¶
type TicketStatus string
const ( TicketStatusReported TicketStatus = "REPORTED" TicketStatusConfirmed TicketStatus = "CONFIRMED" TicketStatusInProgress TicketStatus = "IN_PROGRESS" TicketStatusPending TicketStatus = "PENDING" TicketStatusResolved TicketStatus = "RESOLVED" )
func ParseTicketStatus ¶
func ParseTicketStatus(s string) (TicketStatus, error)
func (TicketStatus) TermString ¶
func (status TicketStatus) TermString() string
type TicketSubscription ¶
type TicketSubscription struct { Id int32 `json:"id"` Created time.Time `json:"created"` Ticket *Ticket `json:"ticket"` }
A ticket subscription will notify a participant when activity occurs on a ticket.
func TicketSubscribe ¶
func TicketUnsubscribe ¶
type Tracker ¶
type Tracker struct { Id int32 `json:"id"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` Owner *Entity `json:"owner"` Name string `json:"name"` Description *string `json:"description,omitempty"` Visibility Visibility `json:"visibility"` Ticket *Ticket `json:"ticket"` Tickets *TicketCursor `json:"tickets"` Labels *LabelCursor `json:"labels"` // If the authenticated user is subscribed to this tracker, this is that // subscription. Subscription *TrackerSubscription `json:"subscription,omitempty"` // The access control list entry (or the default ACL) which describes the // authenticated user's permissions with respect to this tracker. Acl *ACL `json:"acl,omitempty"` DefaultACL *DefaultACL `json:"defaultACL"` Acls *ACLCursor `json:"acls"` // Returns a URL from which the tracker owner may download a gzipped JSON // archive of the tracker. Export URL `json:"export"` }
func AclByTrackerName ¶
func AssigneesByOwner ¶
func CompleteTicketId ¶
func CompleteTicketIdByOwner ¶
func DeleteTracker ¶
func LabelsByOwner ¶
func TicketsByOwner ¶
func TrackerIDByName ¶
type TrackerACL ¶
type TrackerACL struct { Id int32 `json:"id"` Created time.Time `json:"created"` Tracker *Tracker `json:"tracker"` Entity *Entity `json:"entity"` Browse bool `json:"browse"` Submit bool `json:"submit"` Comment bool `json:"comment"` Edit bool `json:"edit"` Triage bool `json:"triage"` }
These ACLs are configured for specific entities, and may be used to expand or constrain the rights of a participant.
type TrackerCursor ¶
type TrackerCursor struct { Results []Tracker `json:"results"` Cursor *Cursor `json:"cursor,omitempty"` }
A cursor for enumerating trackers
If there are additional results available, the cursor object may be passed back into the same endpoint to retrieve another page. If the cursor is null, there are no remaining results to return.
func TrackerNames ¶
type TrackerInput ¶
type TrackerInput struct { Description *string `json:"description,omitempty"` Visibility *Visibility `json:"visibility,omitempty"` }
You may omit any fields to leave them unchanged.
type TrackerSubscription ¶
type TrackerSubscription struct { Id int32 `json:"id"` Created time.Time `json:"created"` Tracker *Tracker `json:"tracker"` }
A tracker subscription will notify a participant of all activity for a tracker, including all new tickets and their events.
func TrackerSubscribe ¶
func TrackerUnsubscribe ¶
type UpdateLabelInput ¶
type UpdateLabelInput struct { Name *string `json:"name,omitempty"` ForegroundColor *string `json:"foregroundColor,omitempty"` BackgroundColor *string `json:"backgroundColor,omitempty"` }
You may omit any fields to leave them unchanged.
type UpdateStatusInput ¶
type UpdateStatusInput struct { Status TicketStatus `json:"status"` Resolution *TicketResolution `json:"resolution,omitempty"` // For use by the tracker owner only Import *ImportInput `json:"import,omitempty"` }
"resolution" is required if status is RESOLVED.
type UpdateTicketInput ¶
type UpdateTicketInput struct { Subject *string `json:"subject,omitempty"` Body *string `json:"body,omitempty"` // For use by the tracker owner only Import *ImportInput `json:"import,omitempty"` }
You may omit any fields to leave them unchanged. To remove the ticket body, set it to null.
type User ¶
type User struct { Id int32 `json:"id"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` CanonicalName string `json:"canonicalName"` Username string `json:"username"` Email string `json:"email"` Url *string `json:"url,omitempty"` Location *string `json:"location,omitempty"` Bio *string `json:"bio,omitempty"` Trackers *TrackerCursor `json:"trackers"` }
func TrackersByUser ¶
type UserMention ¶
type Version ¶
type Version struct { Major int32 `json:"major"` Minor int32 `json:"minor"` Patch int32 `json:"patch"` // If this API version is scheduled for deprecation, this is the date on which // it will stop working; or null if this API version is not scheduled for // deprecation. DeprecationDate time.Time `json:"deprecationDate,omitempty"` }
type Visibility ¶
type Visibility string
const ( VisibilityPublic Visibility = "PUBLIC" VisibilityUnlisted Visibility = "UNLISTED" VisibilityPrivate Visibility = "PRIVATE" )
func (Visibility) TermString ¶
func (visibility Visibility) TermString() string