Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add checkout status endpoint #50

Merged

Conversation

tyrannosaurus-becks
Copy link
Contributor

@tyrannosaurus-becks tyrannosaurus-becks commented Sep 27, 2019

Adds the following endpoint:

READ /<mount>/library/:name/status

{
    "[email protected]": {
        "available": true
    },
    "[email protected]": {
        "available": false,
        "borrower_entity_id": "some ID",
        "lending_period": "4h",
        "due": "2018-05-24T17:14:38.677370855Z"
    }
}

Copy link
Contributor

@catsby catsby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tyrannosaurus-becks tyrannosaurus-becks merged commit 79bda87 into feature-ad-credential-checkout Sep 30, 2019
@tyrannosaurus-becks tyrannosaurus-becks deleted the add-status-endpoint branch September 30, 2019 16:18
tyrannosaurus-becks added a commit that referenced this pull request Oct 10, 2019
* change readConfig from a method to a function (#39)

* Add storage handler (#41)

* add storage handler

* changes from feedback

* add validateInputs func and tests

* fix comment indentation

* comment all exported items

* fix comment indentation

* Add password handler (#43)

* add password handler

* add ErrNotFound

* fix build ooms (#46)

* Add reserve API endpoints (#47)

* fix test edits that were for debugging (#48)

* Add checkout status endpoint (#50)

* add checkout status endpoint

* only return the available field if its checked in

* order imports

* Add enforcement toggle (#49)

* add enforcement toggle

* add more tests

* replace lending period with ttl and max ttl (#51)

* Rename reserve to set (#52)

* rename reserve to set

* update test err

* remove dupe ttl lines

* Add check-out, check-in, renewal, revocation, and race protection (#53)

* flatten check-out handler (#54)

* finish replacing Reserve with Set

* Fixes from testing (#56)

* error loudly on unauthorized check-ins

* 400 when check-outs are unavailable

* make check-ins an empty array when none are executed

* dont error if someone tries to check in an account already in

* Update plugin/path_checkouts.go

Co-Authored-By: Jim Kalafut <[email protected]>

* log and count when check-outs are unavailable (#57)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants