This commit is contained in:
gfleury 2017-12-27 15:25:09 +02:00
commit 4b528f791c

View File

@ -9,14 +9,14 @@ import (
) )
func main() { func main() {
basicAuth := bitbucketv1.BasicAuth{UserName: "gfleury", Password: "killmore"} basicAuth := bitbucketv1.BasicAuth{UserName: "", Password: ""}
ctx, cancel := context.WithTimeout(context.Background(), 6000*time.Millisecond) ctx, cancel := context.WithTimeout(context.Background(), 6000*time.Millisecond)
ctx = context.WithValue(ctx, bitbucketv1.ContextBasicAuth, basicAuth) ctx = context.WithValue(ctx, bitbucketv1.ContextBasicAuth, basicAuth)
defer cancel() defer cancel()
client := bitbucketv1.NewAPIClient( client := bitbucketv1.NewAPIClient(
ctx, ctx,
bitbucketv1.NewConfiguration("http://ec2-54-186-25-213.us-west-2.compute.amazonaws.com/rest"), bitbucketv1.NewConfiguration("http://amazonaws.com/rest"),
) )
response, err := client.DefaultApi.GetUsers(nil) response, err := client.DefaultApi.GetUsers(nil)
if err != nil { if err != nil {