Skip to content

Commit fc7448c

Browse files
committed
exposed files
1 parent fabd64b commit fc7448c

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

graphql.go

+12-6
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ type graphResponse struct {
266266
type Request struct {
267267
q string
268268
vars map[string]interface{}
269-
files []file
269+
files []File
270270

271271
// Header represent any request headers that will be set
272272
// when the request is made.
@@ -294,26 +294,32 @@ func (req *Request) Var(key string, value interface{}) {
294294
// Files are only supported with a Client that was created with
295295
// the UseMultipartForm option.
296296
func (req *Request) File(fieldname, filename string, r io.Reader) {
297-
req.files = append(req.files, file{
297+
req.files = append(req.files, File{
298298
Field: fieldname,
299299
Name: filename,
300300
R: r,
301301
})
302302
}
303303

304-
// file represents a file to upload.
305-
type file struct {
304+
// File represents a file to upload.
305+
type File struct {
306306
Field string
307307
Name string
308308
R io.Reader
309309
}
310310

311-
// RequestVars gets the variables from a request.
311+
// RequestVars gets the variables from a Request.
312312
func RequestVars(req *Request) map[string]interface{} {
313313
return req.vars
314314
}
315315

316-
// RequestQuery gets the query from the request.
316+
// RequestQuery gets the query from the Request.
317317
func RequestQuery(req *Request) string {
318318
return req.q
319319
}
320+
321+
// RequestFiles gets the files that have been set in a
322+
// Request.
323+
func RequestFiles(req *Request) []File {
324+
return req.files
325+
}

0 commit comments

Comments
 (0)