MCPcopy Index your code
hub / github.com/dnote/dnote / GetPresignin

Function GetPresignin

pkg/cli/client/client.go:542–554  ·  view source on GitHub ↗

GetPresignin gets presignin credentials

(ctx context.DnoteCtx, email string)

Source from the content-addressed store, hash-verified

540
541// GetPresignin gets presignin credentials
542func 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
557type SigninPayload struct {

Callers

nothing calls this directly

Calls 1

doReqFunction · 0.85

Tested by

no test coverage detected