aboutsummaryrefslogtreecommitdiffstats
path: root/lulu.go
diff options
context:
space:
mode:
Diffstat (limited to 'lulu.go')
-rw-r--r--lulu.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/lulu.go b/lulu.go
index a4e12cb..b6f5942 100644
--- a/lulu.go
+++ b/lulu.go
@@ -54,7 +54,8 @@ func ApiKeyPage() string {
}
type Client struct {
- c *http.Client
+ ctx context.Context
+ c *http.Client
}
// NewClient returns a client that will use the given client-key and
@@ -70,9 +71,12 @@ func NewClient(ctx context.Context, key, secret string) (*Client, error) {
ClientSecret: secret,
TokenURL: tokenUrl,
}
- return &Client{cfg.Client(ctx)}, nil
+ return &Client{ctx, cfg.Client(ctx)}, nil
}
+// Context returns the client's context.
+func (c *Client) Context() context.Context { return c.ctx }
+
// ValidateInterior starts a server-side validation job for the given
// interior file and polls its status until it finishes or the context
// expires. See also: StartInteriorValidation() and