trackers

package
v0.0.0-...-8d94386 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ImportTrackerDump

func ImportTrackerDump(ctx context.Context, trackerID int, dump io.Reader)

Schedules a tracker import.

func Middleware

func Middleware(queue *work.Queue) func(next http.Handler) http.Handler

Types

type Comment

type Comment struct {
	ID      int         `json:"id"`
	Created time.Time   `json:"created"`
	Author  Participant `json:"author"`
	Text    string      `json:"text"`
}

type CommentSignatureData

type CommentSignatureData struct {
	TrackerID int    `json:"tracker_id"`
	TicketID  int    `json:"ticket_id"`
	Comment   string `json:"comment"`
	AuthorID  int    `json:"author_id"`
	Upstream  string `json:"upstream"`
}

type Event

type Event struct {
	ID            int          `json:"id"`
	Created       time.Time    `json:"created"`
	EventType     []string     `json:"event_type"`
	OldStatus     *string      `json:"old_status"`
	OldResolution *string      `json:"old_resolution"`
	NewStatus     *string      `json:"new_status"`
	NewResolution *string      `json:"new_resolution"`
	Participant   *Participant `json:"participant"`
	Comment       *Comment     `json:"comment"`
	Label         *string      `json:"label"`
	ByUser        *Participant `json:"by_user"`
	FromTicket    *Ticket      `json:"from_ticket"`
	Upstream      string       `json:"upstream"`
	Signature     string       `json:"X-Payload-Signature"`
	Nonce         string       `json:"X-Payload-Nonce"`
}

type Label

type Label struct {
	ID              int       `json:"id"`
	Created         time.Time `json:"created"`
	Name            string    `json:"name"`
	BackgroundColor string    `json:"background_color"`
	ForegroundColor string    `json:"foreground_color"`
}

type Participant

type Participant struct {
	Type          string `json:"type"`
	UserID        int    `json:"user_id"`
	CanonicalName string `json:"canonical_name"`
	Name          string `json:"name"`
	Address       string `json:"address"`
	ExternalID    string `json:"external_id"`
	ExternalURL   string `json:"external_url"`
}

type Ticket

type Ticket struct {
	ID         int         `json:"id"`
	Created    time.Time   `json:"created"`
	Updated    time.Time   `json:"updated"`
	Submitter  Participant `json:"submitter"`
	Ref        string      `json:"ref"`
	Subject    string      `json:"subject"`
	Body       string      `json:"body"`
	Status     string      `json:"status"`
	Resolution string      `json:"resolution"`
	Labels     []string    `json:"labels"`
	Assignees  []User      `json:"assignees"`
	Upstream   string      `json:"upstream"`
	Signature  string      `json:"X-Payload-Signature"`
	Nonce      string      `json:"X-Payload-Nonce"`
	Events     []Event     `json:"events"`
}

type TicketSignatureData

type TicketSignatureData struct {
	TrackerID   int    `json:"tracker_id"`
	TicketID    int    `json:"ticket_id"`
	Subject     string `json:"subject"`
	Body        string `json:"body"`
	SubmitterID int    `json:"submitter_id"`
	Upstream    string `json:"upstream"`
}

type TrackerDump

type TrackerDump struct {
	ID          int       `json:"id"`
	Owner       User      `json:"owner"`
	Created     time.Time `json:"created"`
	Updated     time.Time `json:"updated"`
	Name        string    `json:"name"`
	Description string    `json:"description"`
	Labels      []Label   `json:"labels"`
	Tickets     []Ticket  `json:"tickets"`
}

type User

type User struct {
	ID            int    `json:"id"`
	CanonicalName string `json:"canonical_name"`
	Name          string `json:"name"`
}

Jump to

Keyboard shortcuts

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