GetPresignin gets presignin credentials
(ctx context.DnoteCtx, email string)
| 540 | |
| 541 | // GetPresignin gets presignin credentials |
| 542 | func GetPresignin(ctx context.DnoteCtx, email string) (PresigninResponse, error) { |
| 543 | res, err := doReq(ctx, "GET", fmt.Sprintf("/v3/presignin?email=%s", email), "", nil) |
| 544 | if err != nil { |
| 545 | return PresigninResponse{}, errors.Wrap(err, "making http request") |
| 546 | } |
| 547 | |
| 548 | var resp PresigninResponse |
| 549 | if err := json.NewDecoder(res.Body).Decode(&resp); err != nil { |
| 550 | return PresigninResponse{}, errors.Wrap(err, "decoding payload") |
| 551 | } |
| 552 | |
| 553 | return resp, nil |
| 554 | } |
| 555 | |
| 556 | // SigninPayload is a payload for /v3/signin |
| 557 | type SigninPayload struct { |