Documentation ¶
Index ¶
- func CompleteTicketAssignByUser(client *gqlclient.Client, ctx context.Context, username string, name string, ...) (me *User, user *User, err error)
- func PermissionIcon(permission bool) string
- type ACL
- type ACLCursor
- type ACLInput
- type ACLValue
- type AccessKind
- type AccessScope
- type ActivitySubscription
- type ActivitySubscriptionCursor
- type ActivitySubscriptionValue
- type Assignment
- type Authenticity
- type Comment
- type Created
- type Cursor
- type DefaultACL
- type EmailAddress
- type EmailCmd
- type Entity
- type EntityValue
- type Event
- func AssignUser(client *gqlclient.Client, ctx context.Context, trackerId int32, ticketId int32, ...) (assignUser *Event, err error)
- func LabelTicket(client *gqlclient.Client, ctx context.Context, trackerId int32, ticketId int32, ...) (labelTicket *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 UnlabelTicket(client *gqlclient.Client, ctx context.Context, trackerId int32, ticketId int32, ...) (unlabelTicket *Event, err error)
- func UpdateTicketStatus(client *gqlclient.Client, ctx context.Context, trackerId int32, ticketId int32, ...) (updateTicketStatus *Event, err error)
- type EventCreated
- type EventCursor
- type EventDetail
- type EventDetailValue
- type EventType
- type ExternalUser
- type ImportInput
- type Label
- type LabelCursor
- type LabelEvent
- type LabelUpdate
- type OAuthClient
- type StatusChange
- type SubmitCommentEmailInput
- type SubmitCommentInput
- type SubmitTicketEmailInput
- type SubmitTicketInput
- type Ticket
- func DeleteTicket(client *gqlclient.Client, ctx context.Context, trackerId int32, ticketId int32) (deleteTicket *Ticket, err error)
- func SubmitTicket(client *gqlclient.Client, ctx context.Context, trackerId int32, ...) (submitTicket *Ticket, err error)
- func UpdateTicket(client *gqlclient.Client, ctx context.Context, trackerId int32, ticketId int32, ...) (updateTicket *Ticket, err error)
- type TicketCursor
- type TicketDeletedEvent
- type TicketEvent
- 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 TicketWebhookInput
- type TicketWebhookSubscription
- type Tracker
- func CreateTracker(client *gqlclient.Client, ctx context.Context, name string, ...) (createTracker *Tracker, err error)
- func DeleteTracker(client *gqlclient.Client, ctx context.Context, id int32) (deleteTracker *Tracker, err error)
- func ImportTracker(client *gqlclient.Client, ctx context.Context, name string, ...) (createTracker *Tracker, err error)
- type TrackerACL
- type TrackerCursor
- func ExportTrackers(client *gqlclient.Client, ctx context.Context, cursor *Cursor) (trackers *TrackerCursor, err error)
- func TrackerNames(client *gqlclient.Client, ctx context.Context) (trackers *TrackerCursor, err error)
- func Trackers(client *gqlclient.Client, ctx context.Context, cursor *Cursor) (trackers *TrackerCursor, err error)
- type TrackerEvent
- type TrackerInput
- type TrackerSubscription
- type TrackerWebhookInput
- type TrackerWebhookSubscription
- type URL
- type UpdateLabelInput
- type UpdateStatusInput
- type UpdateTicketInput
- type User
- func AclByTrackerName(client *gqlclient.Client, ctx context.Context, name string, cursor *Cursor) (me *User, err error)
- func AclByUser(client *gqlclient.Client, ctx context.Context, username string, name string, ...) (user *User, err error)
- func Assignees(client *gqlclient.Client, ctx context.Context, name string, id int32) (me *User, err error)
- func AssigneesByUser(client *gqlclient.Client, ctx context.Context, username string, name string, ...) (user *User, err error)
- func CompleteLabel(client *gqlclient.Client, ctx context.Context, name string) (me *User, err error)
- func CompleteLabelByUser(client *gqlclient.Client, ctx context.Context, username string, name string) (user *User, err error)
- func CompleteTicketAssign(client *gqlclient.Client, ctx context.Context, name string, id int32) (me *User, err error)
- func CompleteTicketId(client *gqlclient.Client, ctx context.Context, name string, subscription bool) (me *User, err error)
- func CompleteTicketIdByUser(client *gqlclient.Client, ctx context.Context, username string, name string, ...) (user *User, err error)
- func ExportTracker(client *gqlclient.Client, ctx context.Context, username string, name string) (user *User, err error)
- func LabelIDByName(client *gqlclient.Client, ctx context.Context, trackerName string, ...) (me *User, err error)
- func LabelIDByUser(client *gqlclient.Client, ctx context.Context, username string, ...) (user *User, err error)
- func Labels(client *gqlclient.Client, ctx context.Context, name string, cursor *Cursor) (me *User, err error)
- func LabelsByUser(client *gqlclient.Client, ctx context.Context, username string, name string, ...) (user *User, err error)
- func TicketBodyByName(client *gqlclient.Client, ctx context.Context, name string, id int32) (me *User, err error)
- func TicketBodyByUser(client *gqlclient.Client, ctx context.Context, username string, tracker string, ...) (user *User, err error)
- func TicketByName(client *gqlclient.Client, ctx context.Context, name string, id int32) (me *User, err error)
- func TicketByUser(client *gqlclient.Client, ctx context.Context, username string, tracker string, ...) (user *User, err error)
- func TicketWebhooks(client *gqlclient.Client, ctx context.Context, name string, id int32, ...) (me *User, err error)
- func TicketWebhooksByUser(client *gqlclient.Client, ctx context.Context, username string, name string, ...) (user *User, err error)
- func Tickets(client *gqlclient.Client, ctx context.Context, name string, cursor *Cursor) (me *User, err error)
- func TicketsByUser(client *gqlclient.Client, ctx context.Context, username string, name string, ...) (user *User, err error)
- func TrackerIDByName(client *gqlclient.Client, ctx context.Context, name string) (me *User, err error)
- func TrackerIDByUser(client *gqlclient.Client, ctx context.Context, username string, name string) (user *User, err error)
- func TrackerWebhooks(client *gqlclient.Client, ctx context.Context, name string, cursor *Cursor) (me *User, err error)
- func TrackerWebhooksByUser(client *gqlclient.Client, ctx context.Context, username string, name string, ...) (user *User, err error)
- func TrackersByUser(client *gqlclient.Client, ctx context.Context, username string, cursor *Cursor) (user *User, err error)
- func UserIDByName(client *gqlclient.Client, ctx context.Context, username string) (user *User, err error)
- type UserMention
- type UserWebhookInput
- type UserWebhookSubscription
- type Version
- type Visibility
- type WebhookDelivery
- type WebhookDeliveryCursor
- type WebhookEvent
- type WebhookPayload
- type WebhookPayloadValue
- type WebhookSubscription
- func CreateTicketWebhook(client *gqlclient.Client, ctx context.Context, trackerId int32, ticketId int32, ...) (createTicketWebhook *WebhookSubscription, err error)
- func CreateTrackerWebhook(client *gqlclient.Client, ctx context.Context, trackerId int32, ...) (createTrackerWebhook *WebhookSubscription, err error)
- func CreateUserWebhook(client *gqlclient.Client, ctx context.Context, config UserWebhookInput) (createUserWebhook *WebhookSubscription, err error)
- func DeleteTicketWebhook(client *gqlclient.Client, ctx context.Context, id int32) (deleteTicketWebhook *WebhookSubscription, err error)
- func DeleteTrackerWebhook(client *gqlclient.Client, ctx context.Context, id int32) (deleteTrackerWebhook *WebhookSubscription, err error)
- func DeleteUserWebhook(client *gqlclient.Client, ctx context.Context, id int32) (deleteUserWebhook *WebhookSubscription, err error)
- type WebhookSubscriptionCursor
- type WebhookSubscriptionValue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompleteTicketAssignByUser ¶ added in v0.2.0
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"` // Underlying value of the GraphQL interface Value ACLValue `json:"-"` }
func (*ACL) UnmarshalJSON ¶ added in v0.4.0
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 ACLValue ¶ added in v0.4.0
type ACLValue interface {
// contains filtered or unexported methods
}
ACLValue is one of: TrackerACL | DefaultACL
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 ActivitySubscription struct { Id int32 `json:"id"` Created gqlclient.Time `json:"created"` // Underlying value of the GraphQL interface Value ActivitySubscriptionValue `json:"-"` }
func (*ActivitySubscription) UnmarshalJSON ¶ added in v0.4.0
func (base *ActivitySubscription) UnmarshalJSON(b []byte) error
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 ActivitySubscriptionValue ¶ added in v0.4.0
type ActivitySubscriptionValue interface {
// contains filtered or unexported methods
}
ActivitySubscriptionValue is one of: TrackerSubscription | TicketSubscription
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 Entity ¶
type Entity struct { CanonicalName string `json:"canonicalName"` // Underlying value of the GraphQL interface Value EntityValue `json:"-"` }
func (*Entity) UnmarshalJSON ¶ added in v0.4.0
type EntityValue ¶ added in v0.4.0
type EntityValue interface {
// contains filtered or unexported methods
}
EntityValue is one of: User | EmailAddress | ExternalUser
type Event ¶
type Event struct { Id int32 `json:"id"` Created gqlclient.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 LabelTicket ¶ added in v0.3.0
func SubmitComment ¶
func UnassignUser ¶
func UnlabelTicket ¶ added in v0.3.0
type EventCreated ¶ added in v0.2.0
type EventCreated struct { Uuid string `json:"uuid"` Event WebhookEvent `json:"event"` Date gqlclient.Time `json:"date"` NewEvent *Event `json:"newEvent"` }
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 EventDetail struct { EventType EventType `json:"eventType"` Ticket *Ticket `json:"ticket"` // Underlying value of the GraphQL interface Value EventDetailValue `json:"-"` }
func (*EventDetail) UnmarshalJSON ¶ added in v0.4.0
func (base *EventDetail) UnmarshalJSON(b []byte) error
type EventDetailValue ¶ added in v0.4.0
type EventDetailValue interface {
// contains filtered or unexported methods
}
EventDetailValue is one of: Created | Assignment | Comment | LabelUpdate | StatusChange | UserMention | TicketMention
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 gqlclient.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 gqlclient.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 LabelEvent ¶ added in v0.2.0
type LabelEvent struct { Uuid string `json:"uuid"` Event WebhookEvent `json:"event"` Date gqlclient.Time `json:"date"` Label *Label `json:"label"` }
type LabelUpdate ¶
type OAuthClient ¶ added in v0.2.0
type OAuthClient struct {
Uuid string `json:"uuid"`
}
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 SubmitCommentEmailInput ¶ added in v0.2.0
type SubmitCommentEmailInput struct { Text string `json:"text"` SenderId int32 `json:"senderId"` Cmd *EmailCmd `json:"cmd,omitempty"` Resolution *TicketResolution `json:"resolution,omitempty"` LabelIds []int32 `json:"labelIds,omitempty"` }
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 SubmitTicketEmailInput ¶ added in v0.2.0
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 gqlclient.Time `json:"created"` Updated gqlclient.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"` // Returns a list of ticket webhook subscriptions. For clients // authenticated with a personal access token, this returns all webhooks // configured by all GraphQL clients for your account. For clients // authenticated with an OAuth 2.0 access token, this returns only webhooks // registered for your client. Webhooks *WebhookSubscriptionCursor `json:"webhooks"` // Returns details of a ticket webhook subscription by its ID. Webhook *WebhookSubscription `json:"webhook,omitempty"` }
func DeleteTicket ¶ added in v0.2.0
func SubmitTicket ¶ added in v0.3.0
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 TicketDeletedEvent ¶ added in v0.2.0
type TicketEvent ¶ added in v0.2.0
type TicketEvent struct { Uuid string `json:"uuid"` Event WebhookEvent `json:"event"` Date gqlclient.Time `json:"date"` Ticket *Ticket `json:"ticket"` }
type TicketMention ¶
type TicketResolution ¶
type TicketResolution string
const ( TicketResolutionUnresolved TicketResolution = "UNRESOLVED" TicketResolutionClosed TicketResolution = "CLOSED" 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 gqlclient.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 TicketWebhookInput ¶ added in v0.2.0
type TicketWebhookInput struct { Url string `json:"url"` Events []WebhookEvent `json:"events"` Query string `json:"query"` }
type TicketWebhookSubscription ¶ added in v0.2.0
type TicketWebhookSubscription struct { Id int32 `json:"id"` Events []WebhookEvent `json:"events"` Query string `json:"query"` Url string `json:"url"` Client *OAuthClient `json:"client,omitempty"` Deliveries *WebhookDeliveryCursor `json:"deliveries"` Sample string `json:"sample"` Ticket *Ticket `json:"ticket"` }
type Tracker ¶
type Tracker struct { Id int32 `json:"id"` Created gqlclient.Time `json:"created"` Updated gqlclient.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"` Label *Label `json:"label,omitempty"` 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"` // Returns a list of tracker webhook subscriptions. For clients // authenticated with a personal access token, this returns all webhooks // configured by all GraphQL clients for your account. For clients // authenticated with an OAuth 2.0 access token, this returns only webhooks // registered for your client. Webhooks *WebhookSubscriptionCursor `json:"webhooks"` // Returns details of a tracker webhook subscription by its ID. Webhook *WebhookSubscription `json:"webhook,omitempty"` }
func CreateTracker ¶ added in v0.2.0
func DeleteTracker ¶
type TrackerACL ¶
type TrackerACL struct { Id int32 `json:"id"` Created gqlclient.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 ExportTrackers ¶ added in v0.4.0
func TrackerNames ¶
type TrackerEvent ¶ added in v0.2.0
type TrackerEvent struct { Uuid string `json:"uuid"` Event WebhookEvent `json:"event"` Date gqlclient.Time `json:"date"` Tracker *Tracker `json:"tracker"` }
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 gqlclient.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 TrackerWebhookInput ¶ added in v0.2.0
type TrackerWebhookInput struct { Url string `json:"url"` Events []WebhookEvent `json:"events"` Query string `json:"query"` }
type TrackerWebhookSubscription ¶ added in v0.2.0
type TrackerWebhookSubscription struct { Id int32 `json:"id"` Events []WebhookEvent `json:"events"` Query string `json:"query"` Url string `json:"url"` Client *OAuthClient `json:"client,omitempty"` Deliveries *WebhookDeliveryCursor `json:"deliveries"` Sample string `json:"sample"` Tracker *Tracker `json:"tracker"` }
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 gqlclient.Time `json:"created"` Updated gqlclient.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"` // Returns a specific tracker. Tracker *Tracker `json:"tracker,omitempty"` Trackers *TrackerCursor `json:"trackers"` }
func AclByTrackerName ¶
func AssigneesByUser ¶ added in v0.2.0
func CompleteLabel ¶ added in v0.3.0
func CompleteLabelByUser ¶ added in v0.3.0
func CompleteTicketAssign ¶
func CompleteTicketId ¶
func CompleteTicketIdByUser ¶ added in v0.2.0
func ExportTracker ¶ added in v0.5.0
func LabelIDByName ¶ added in v0.3.0
func LabelIDByUser ¶ added in v0.3.0
func LabelsByUser ¶ added in v0.2.0
func TicketBodyByName ¶ added in v0.5.0
func TicketBodyByUser ¶ added in v0.5.0
func TicketByName ¶ added in v0.3.0
func TicketByUser ¶ added in v0.3.0
func TicketWebhooks ¶ added in v0.2.0
func TicketWebhooksByUser ¶ added in v0.2.0
func TicketsByUser ¶ added in v0.2.0
func TrackerIDByName ¶
func TrackerIDByUser ¶ added in v0.2.0
func TrackerWebhooks ¶ added in v0.2.0
func TrackerWebhooksByUser ¶ added in v0.2.0
func TrackersByUser ¶
type UserMention ¶
type UserWebhookInput ¶ added in v0.2.0
type UserWebhookInput struct { Url string `json:"url"` Events []WebhookEvent `json:"events"` Query string `json:"query"` }
type UserWebhookSubscription ¶ added in v0.2.0
type UserWebhookSubscription struct { Id int32 `json:"id"` Events []WebhookEvent `json:"events"` Query string `json:"query"` Url string `json:"url"` Client *OAuthClient `json:"client,omitempty"` Deliveries *WebhookDeliveryCursor `json:"deliveries"` Sample string `json:"sample"` }
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 gqlclient.Time `json:"deprecationDate,omitempty"` }
type Visibility ¶
type Visibility string
const ( VisibilityPublic Visibility = "PUBLIC" VisibilityUnlisted Visibility = "UNLISTED" VisibilityPrivate Visibility = "PRIVATE" )
func ParseVisibility ¶ added in v0.2.0
func ParseVisibility(s string) (Visibility, error)
func (Visibility) TermString ¶
func (visibility Visibility) TermString() string
type WebhookDelivery ¶ added in v0.2.0
type WebhookDelivery struct { Uuid string `json:"uuid"` Date gqlclient.Time `json:"date"` Event WebhookEvent `json:"event"` Subscription *WebhookSubscription `json:"subscription"` RequestBody string `json:"requestBody"` // These details are provided only after a response is received from the // remote server. If a response is sent whose Content-Type is not text/*, or // cannot be decoded as UTF-8, the response body will be null. It will be // truncated after 64 KiB. ResponseBody *string `json:"responseBody,omitempty"` ResponseHeaders *string `json:"responseHeaders,omitempty"` ResponseStatus *int32 `json:"responseStatus,omitempty"` }
type WebhookDeliveryCursor ¶ added in v0.2.0
type WebhookDeliveryCursor struct { Results []WebhookDelivery `json:"results"` Cursor *Cursor `json:"cursor,omitempty"` }
A cursor for enumerating a list of webhook deliveries
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 WebhookEvent ¶ added in v0.2.0
type WebhookEvent string
const ( WebhookEventTrackerCreated WebhookEvent = "TRACKER_CREATED" WebhookEventTrackerUpdate WebhookEvent = "TRACKER_UPDATE" WebhookEventTrackerDeleted WebhookEvent = "TRACKER_DELETED" WebhookEventTicketCreated WebhookEvent = "TICKET_CREATED" WebhookEventTicketUpdate WebhookEvent = "TICKET_UPDATE" WebhookEventTicketDeleted WebhookEvent = "TICKET_DELETED" WebhookEventLabelCreated WebhookEvent = "LABEL_CREATED" WebhookEventLabelUpdate WebhookEvent = "LABEL_UPDATE" WebhookEventLabelDeleted WebhookEvent = "LABEL_DELETED" WebhookEventEventCreated WebhookEvent = "EVENT_CREATED" )
func ParseTicketWebhookEvents ¶ added in v0.2.0
func ParseTicketWebhookEvents(events []string) ([]WebhookEvent, error)
func ParseTrackerWebhookEvents ¶ added in v0.2.0
func ParseTrackerWebhookEvents(events []string) ([]WebhookEvent, error)
func ParseUserEvents ¶ added in v0.2.0
func ParseUserEvents(events []string) ([]WebhookEvent, error)
type WebhookPayload ¶ added in v0.2.0
type WebhookPayload struct { Uuid string `json:"uuid"` Event WebhookEvent `json:"event"` Date gqlclient.Time `json:"date"` // Underlying value of the GraphQL interface Value WebhookPayloadValue `json:"-"` }
func (*WebhookPayload) UnmarshalJSON ¶ added in v0.4.0
func (base *WebhookPayload) UnmarshalJSON(b []byte) error
type WebhookPayloadValue ¶ added in v0.4.0
type WebhookPayloadValue interface {
// contains filtered or unexported methods
}
WebhookPayloadValue is one of: TrackerEvent | TicketEvent | TicketDeletedEvent | EventCreated | LabelEvent
type WebhookSubscription ¶ added in v0.2.0
type WebhookSubscription struct { Id int32 `json:"id"` Events []WebhookEvent `json:"events"` Query string `json:"query"` Url string `json:"url"` // If this webhook was registered by an authorized OAuth 2.0 client, this // field is non-null. Client *OAuthClient `json:"client,omitempty"` // All deliveries which have been sent to this webhook. Deliveries *WebhookDeliveryCursor `json:"deliveries"` // Returns a sample payload for this subscription, for testing purposes Sample string `json:"sample"` // Underlying value of the GraphQL interface Value WebhookSubscriptionValue `json:"-"` }
func CreateTicketWebhook ¶ added in v0.2.0
func CreateTicketWebhook(client *gqlclient.Client, ctx context.Context, trackerId int32, ticketId int32, config TicketWebhookInput) (createTicketWebhook *WebhookSubscription, err error)
func CreateTrackerWebhook ¶ added in v0.2.0
func CreateTrackerWebhook(client *gqlclient.Client, ctx context.Context, trackerId int32, config TrackerWebhookInput) (createTrackerWebhook *WebhookSubscription, err error)
func CreateUserWebhook ¶ added in v0.2.0
func CreateUserWebhook(client *gqlclient.Client, ctx context.Context, config UserWebhookInput) (createUserWebhook *WebhookSubscription, err error)
func DeleteTicketWebhook ¶ added in v0.2.0
func DeleteTrackerWebhook ¶ added in v0.2.0
func DeleteUserWebhook ¶ added in v0.2.0
func (*WebhookSubscription) UnmarshalJSON ¶ added in v0.4.0
func (base *WebhookSubscription) UnmarshalJSON(b []byte) error
type WebhookSubscriptionCursor ¶ added in v0.2.0
type WebhookSubscriptionCursor struct { Results []WebhookSubscription `json:"results"` Cursor *Cursor `json:"cursor,omitempty"` }
A cursor for enumerating a list of webhook 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.
func UserWebhooks ¶ added in v0.2.0
type WebhookSubscriptionValue ¶ added in v0.4.0
type WebhookSubscriptionValue interface {
// contains filtered or unexported methods
}
WebhookSubscriptionValue is one of: UserWebhookSubscription | TrackerWebhookSubscription | TicketWebhookSubscription