gen_models.go

  1// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
  2
  3package models
  4
  5import (
  6	"github.com/MichaelMure/git-bug/entities/bug"
  7	"github.com/MichaelMure/git-bug/entity/dag"
  8	"github.com/MichaelMure/git-bug/repository"
  9)
 10
 11// An object that has an author.
 12type Authored interface {
 13	IsAuthored()
 14}
 15
 16type AddCommentAndCloseBugInput struct {
 17	// A unique identifier for the client performing the mutation.
 18	ClientMutationID *string `json:"clientMutationId"`
 19	// The name of the repository. If not set, the default repository is used.
 20	RepoRef *string `json:"repoRef"`
 21	// The bug ID's prefix.
 22	Prefix string `json:"prefix"`
 23	// The message to be added to the bug.
 24	Message string `json:"message"`
 25	// The collection of file's hash required for the first message.
 26	Files []repository.Hash `json:"files"`
 27}
 28
 29type AddCommentAndCloseBugPayload struct {
 30	// A unique identifier for the client performing the mutation.
 31	ClientMutationID *string `json:"clientMutationId"`
 32	// The affected bug.
 33	Bug BugWrapper `json:"bug"`
 34	// The resulting AddComment operation.
 35	CommentOperation *bug.AddCommentOperation `json:"commentOperation"`
 36	// The resulting SetStatusOperation.
 37	StatusOperation *bug.SetStatusOperation `json:"statusOperation"`
 38}
 39
 40type AddCommentAndReopenBugInput struct {
 41	// A unique identifier for the client performing the mutation.
 42	ClientMutationID *string `json:"clientMutationId"`
 43	// The name of the repository. If not set, the default repository is used.
 44	RepoRef *string `json:"repoRef"`
 45	// The bug ID's prefix.
 46	Prefix string `json:"prefix"`
 47	// The message to be added to the bug.
 48	Message string `json:"message"`
 49	// The collection of file's hash required for the first message.
 50	Files []repository.Hash `json:"files"`
 51}
 52
 53type AddCommentAndReopenBugPayload struct {
 54	// A unique identifier for the client performing the mutation.
 55	ClientMutationID *string `json:"clientMutationId"`
 56	// The affected bug.
 57	Bug BugWrapper `json:"bug"`
 58	// The resulting AddComment operation.
 59	CommentOperation *bug.AddCommentOperation `json:"commentOperation"`
 60	// The resulting SetStatusOperation.
 61	StatusOperation *bug.SetStatusOperation `json:"statusOperation"`
 62}
 63
 64type AddCommentInput struct {
 65	// A unique identifier for the client performing the mutation.
 66	ClientMutationID *string `json:"clientMutationId"`
 67	// The name of the repository. If not set, the default repository is used.
 68	RepoRef *string `json:"repoRef"`
 69	// The bug ID's prefix.
 70	Prefix string `json:"prefix"`
 71	// The message to be added to the bug.
 72	Message string `json:"message"`
 73	// The collection of file's hash required for the first message.
 74	Files []repository.Hash `json:"files"`
 75}
 76
 77type AddCommentPayload struct {
 78	// A unique identifier for the client performing the mutation.
 79	ClientMutationID *string `json:"clientMutationId"`
 80	// The affected bug.
 81	Bug BugWrapper `json:"bug"`
 82	// The resulting operation.
 83	Operation *bug.AddCommentOperation `json:"operation"`
 84}
 85
 86// The connection type for Bug.
 87type BugConnection struct {
 88	// A list of edges.
 89	Edges []*BugEdge   `json:"edges"`
 90	Nodes []BugWrapper `json:"nodes"`
 91	// Information to aid in pagination.
 92	PageInfo *PageInfo `json:"pageInfo"`
 93	// Identifies the total count of items in the connection.
 94	TotalCount int `json:"totalCount"`
 95}
 96
 97// An edge in a connection.
 98type BugEdge struct {
 99	// A cursor for use in pagination.
100	Cursor string `json:"cursor"`
101	// The item at the end of the edge.
102	Node BugWrapper `json:"node"`
103}
104
105type ChangeLabelInput struct {
106	// A unique identifier for the client performing the mutation.
107	ClientMutationID *string `json:"clientMutationId"`
108	// The name of the repository. If not set, the default repository is used.
109	RepoRef *string `json:"repoRef"`
110	// The bug ID's prefix.
111	Prefix string `json:"prefix"`
112	// The list of label to add.
113	Added []string `json:"added"`
114	// The list of label to remove.
115	Removed []string `json:"Removed"`
116}
117
118type ChangeLabelPayload struct {
119	// A unique identifier for the client performing the mutation.
120	ClientMutationID *string `json:"clientMutationId"`
121	// The affected bug.
122	Bug BugWrapper `json:"bug"`
123	// The resulting operation.
124	Operation *bug.LabelChangeOperation `json:"operation"`
125	// The effect each source label had.
126	Results []*bug.LabelChangeResult `json:"results"`
127}
128
129type CloseBugInput struct {
130	// A unique identifier for the client performing the mutation.
131	ClientMutationID *string `json:"clientMutationId"`
132	// The name of the repository. If not set, the default repository is used.
133	RepoRef *string `json:"repoRef"`
134	// The bug ID's prefix.
135	Prefix string `json:"prefix"`
136}
137
138type CloseBugPayload struct {
139	// A unique identifier for the client performing the mutation.
140	ClientMutationID *string `json:"clientMutationId"`
141	// The affected bug.
142	Bug BugWrapper `json:"bug"`
143	// The resulting operation.
144	Operation *bug.SetStatusOperation `json:"operation"`
145}
146
147type CommentConnection struct {
148	Edges      []*CommentEdge `json:"edges"`
149	Nodes      []*bug.Comment `json:"nodes"`
150	PageInfo   *PageInfo      `json:"pageInfo"`
151	TotalCount int            `json:"totalCount"`
152}
153
154type CommentEdge struct {
155	Cursor string       `json:"cursor"`
156	Node   *bug.Comment `json:"node"`
157}
158
159type EditCommentInput struct {
160	// A unique identifier for the client performing the mutation.
161	ClientMutationID *string `json:"clientMutationId"`
162	// The name of the repository. If not set, the default repository is used.
163	RepoRef *string `json:"repoRef"`
164	// The bug ID's prefix.
165	Prefix string `json:"prefix"`
166	// The ID of the comment to be changed.
167	Target string `json:"target"`
168	// The new message to be set.
169	Message string `json:"message"`
170	// The collection of file's hash required for the first message.
171	Files []repository.Hash `json:"files"`
172}
173
174type EditCommentPayload struct {
175	// A unique identifier for the client performing the mutation.
176	ClientMutationID *string `json:"clientMutationId"`
177	// The affected bug.
178	Bug BugWrapper `json:"bug"`
179	// The resulting operation.
180	Operation *bug.EditCommentOperation `json:"operation"`
181}
182
183type IdentityConnection struct {
184	Edges      []*IdentityEdge   `json:"edges"`
185	Nodes      []IdentityWrapper `json:"nodes"`
186	PageInfo   *PageInfo         `json:"pageInfo"`
187	TotalCount int               `json:"totalCount"`
188}
189
190type IdentityEdge struct {
191	Cursor string          `json:"cursor"`
192	Node   IdentityWrapper `json:"node"`
193}
194
195type LabelConnection struct {
196	Edges      []*LabelEdge `json:"edges"`
197	Nodes      []bug.Label  `json:"nodes"`
198	PageInfo   *PageInfo    `json:"pageInfo"`
199	TotalCount int          `json:"totalCount"`
200}
201
202type LabelEdge struct {
203	Cursor string    `json:"cursor"`
204	Node   bug.Label `json:"node"`
205}
206
207type NewBugInput struct {
208	// A unique identifier for the client performing the mutation.
209	ClientMutationID *string `json:"clientMutationId"`
210	// The name of the repository. If not set, the default repository is used.
211	RepoRef *string `json:"repoRef"`
212	// The title of the new bug.
213	Title string `json:"title"`
214	// The first message of the new bug.
215	Message string `json:"message"`
216	// The collection of file's hash required for the first message.
217	Files []repository.Hash `json:"files"`
218}
219
220type NewBugPayload struct {
221	// A unique identifier for the client performing the mutation.
222	ClientMutationID *string `json:"clientMutationId"`
223	// The created bug.
224	Bug BugWrapper `json:"bug"`
225	// The resulting operation.
226	Operation *bug.CreateOperation `json:"operation"`
227}
228
229type OpenBugInput struct {
230	// A unique identifier for the client performing the mutation.
231	ClientMutationID *string `json:"clientMutationId"`
232	// The name of the repository. If not set, the default repository is used.
233	RepoRef *string `json:"repoRef"`
234	// The bug ID's prefix.
235	Prefix string `json:"prefix"`
236}
237
238type OpenBugPayload struct {
239	// A unique identifier for the client performing the mutation.
240	ClientMutationID *string `json:"clientMutationId"`
241	// The affected bug.
242	Bug BugWrapper `json:"bug"`
243	// The resulting operation.
244	Operation *bug.SetStatusOperation `json:"operation"`
245}
246
247// The connection type for an Operation
248type OperationConnection struct {
249	Edges      []*OperationEdge `json:"edges"`
250	Nodes      []dag.Operation  `json:"nodes"`
251	PageInfo   *PageInfo        `json:"pageInfo"`
252	TotalCount int              `json:"totalCount"`
253}
254
255// Represent an Operation
256type OperationEdge struct {
257	Cursor string        `json:"cursor"`
258	Node   dag.Operation `json:"node"`
259}
260
261// Information about pagination in a connection.
262type PageInfo struct {
263	// When paginating forwards, are there more items?
264	HasNextPage bool `json:"hasNextPage"`
265	// When paginating backwards, are there more items?
266	HasPreviousPage bool `json:"hasPreviousPage"`
267	// When paginating backwards, the cursor to continue.
268	StartCursor string `json:"startCursor"`
269	// When paginating forwards, the cursor to continue.
270	EndCursor string `json:"endCursor"`
271}
272
273type SetTitleInput struct {
274	// A unique identifier for the client performing the mutation.
275	ClientMutationID *string `json:"clientMutationId"`
276	// The name of the repository. If not set, the default repository is used.
277	RepoRef *string `json:"repoRef"`
278	// The bug ID's prefix.
279	Prefix string `json:"prefix"`
280	// The new title.
281	Title string `json:"title"`
282}
283
284type SetTitlePayload struct {
285	// A unique identifier for the client performing the mutation.
286	ClientMutationID *string `json:"clientMutationId"`
287	// The affected bug.
288	Bug BugWrapper `json:"bug"`
289	// The resulting operation
290	Operation *bug.SetTitleOperation `json:"operation"`
291}
292
293// The connection type for TimelineItem
294type TimelineItemConnection struct {
295	Edges      []*TimelineItemEdge `json:"edges"`
296	Nodes      []bug.TimelineItem  `json:"nodes"`
297	PageInfo   *PageInfo           `json:"pageInfo"`
298	TotalCount int                 `json:"totalCount"`
299}
300
301// Represent a TimelineItem
302type TimelineItemEdge struct {
303	Cursor string           `json:"cursor"`
304	Node   bug.TimelineItem `json:"node"`
305}