-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
2,185 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace SunnyPHP\TTLock\Contract\Request\Key; | ||
|
||
use DateTimeImmutable; | ||
use SunnyPHP\TTLock\Contract\Request\RequestInterface; | ||
|
||
interface AuthorizeInterface extends RequestInterface | ||
{ | ||
public function getLockId(): int; | ||
|
||
public function getKeyId(): int; | ||
|
||
/** | ||
* Current unix time stamp in millisecond | ||
* @see getCurrentDateTime | ||
* @return int | ||
*/ | ||
public function getCurrentTimeStamp(): int; | ||
|
||
/** | ||
* Current date & time | ||
* @see getCurrentTimeStamp | ||
* @return DateTimeImmutable | ||
*/ | ||
public function getCurrentDateTime(): DateTimeImmutable; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace SunnyPHP\TTLock\Contract\Request\Key; | ||
|
||
use DateTimeImmutable; | ||
use SunnyPHP\TTLock\Contract\Request\RequestInterface; | ||
|
||
interface DeleteInterface extends RequestInterface | ||
{ | ||
public function getKeyId(): int; | ||
|
||
/** | ||
* Current unix time stamp in millisecond | ||
* @see getCurrentDateTime | ||
* @return int | ||
*/ | ||
public function getCurrentTimeStamp(): int; | ||
|
||
/** | ||
* Current date & time | ||
* @see getCurrentTimeStamp | ||
* @return DateTimeImmutable | ||
*/ | ||
public function getCurrentDateTime(): DateTimeImmutable; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace SunnyPHP\TTLock\Contract\Request\Key; | ||
|
||
use DateTimeImmutable; | ||
use SunnyPHP\TTLock\Contract\Request\RequestInterface; | ||
|
||
interface FreezeInterface extends RequestInterface | ||
{ | ||
public function getKeyId(): int; | ||
|
||
/** | ||
* Current unix time stamp in millisecond | ||
* @see getCurrentDateTime | ||
* @return int | ||
*/ | ||
public function getCurrentTimeStamp(): int; | ||
|
||
/** | ||
* Current date & time | ||
* @see getCurrentTimeStamp | ||
* @return DateTimeImmutable | ||
*/ | ||
public function getCurrentDateTime(): DateTimeImmutable; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace SunnyPHP\TTLock\Contract\Request\Key; | ||
|
||
use DateTimeImmutable; | ||
use SunnyPHP\TTLock\Contract\Request\RequestInterface; | ||
|
||
interface GetDetailInterface extends RequestInterface | ||
{ | ||
public function getLockId(): int; | ||
|
||
/** | ||
* Current unix time stamp in millisecond | ||
* @see getCurrentDateTime | ||
* @return int | ||
*/ | ||
public function getCurrentTimeStamp(): int; | ||
|
||
/** | ||
* Current date & time | ||
* @see getCurrentTimeStamp | ||
* @return DateTimeImmutable | ||
*/ | ||
public function getCurrentDateTime(): DateTimeImmutable; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace SunnyPHP\TTLock\Contract\Request\Key; | ||
|
||
use DateTimeImmutable; | ||
use SunnyPHP\TTLock\Contract\Request\RequestInterface; | ||
|
||
interface GetListByLockInterface extends RequestInterface | ||
{ | ||
public function getLockId(): int; | ||
|
||
/** | ||
* Page no, start from 1 | ||
* @return int | ||
*/ | ||
public function getPageNo(): int; | ||
|
||
/** | ||
* Items per page, max 100 | ||
* @return int | ||
*/ | ||
public function getPageSize(): int; | ||
|
||
/** | ||
* Current unix time stamp in millisecond | ||
* @see getCurrentDateTime | ||
* @return int | ||
*/ | ||
public function getCurrentTimeStamp(): int; | ||
|
||
/** | ||
* Current date & time | ||
* @see getCurrentTimeStamp | ||
* @return DateTimeImmutable | ||
*/ | ||
public function getCurrentDateTime(): DateTimeImmutable; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace SunnyPHP\TTLock\Contract\Request\Key; | ||
|
||
use DateTimeImmutable; | ||
use SunnyPHP\TTLock\Contract\Request\RequestInterface; | ||
|
||
interface GetListInterface extends RequestInterface | ||
{ | ||
public function getLockAlias(): ?string; | ||
|
||
public function getGroupId(): ?int; | ||
|
||
/** | ||
* Page no, start from 1 | ||
* @return int | ||
*/ | ||
public function getPageNo(): int; | ||
|
||
/** | ||
* Items per page, max 1000 | ||
* @return int | ||
*/ | ||
public function getPageSize(): int; | ||
|
||
/** | ||
* Current unix time stamp in millisecond | ||
* @see getCurrentDateTime | ||
* @return int | ||
*/ | ||
public function getCurrentTimeStamp(): int; | ||
|
||
/** | ||
* Current date & time | ||
* @see getCurrentTimeStamp | ||
* @return DateTimeImmutable | ||
*/ | ||
public function getCurrentDateTime(): DateTimeImmutable; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace SunnyPHP\TTLock\Contract\Request\Key; | ||
|
||
use DateTimeImmutable; | ||
use SunnyPHP\TTLock\Contract\Request\RequestInterface; | ||
|
||
interface SendInterface extends RequestInterface | ||
{ | ||
public function getLockId(): int; | ||
|
||
/** | ||
* Key receiver username | ||
* @return string | ||
*/ | ||
public function getReceiverUsername(): string; | ||
|
||
/** | ||
* Key name | ||
* @return string | ||
*/ | ||
public function getKeyName(): string; | ||
|
||
/** | ||
* Returns True if key has management right of a lock to an ekey user, including rights of sending keys, creating passcodes, lock settings, etc.; | ||
* null if not set | ||
* @return bool|null | ||
*/ | ||
public function isManagementRight(): ?bool; | ||
|
||
/** | ||
* Returns True if remote enabled, null if not set | ||
* @return bool|null | ||
*/ | ||
public function isRemoteUnlock(): ?bool; | ||
|
||
/** | ||
* Auto create TTLock account if receiverUsername is not a registered TTLock account. | ||
* This parameter take effect only when receiverUsername is a mobile number or email, the created account's password is | ||
* the last six characters of the username. | ||
* @return bool | ||
*/ | ||
public function isAutoCreateUser(): bool; | ||
|
||
/** | ||
* Key comments, null if not set | ||
* @return string|null | ||
*/ | ||
public function getRemarks(): ?string; | ||
|
||
/** | ||
* Key time when it becomes valid, unix time stamp in millisecond, null if not set | ||
* @return int | ||
*/ | ||
public function getStartTimeStamp(): int; | ||
|
||
/** | ||
* Key time when it becomes valid, null if not set | ||
* @return DateTimeImmutable | ||
*/ | ||
public function getStartDateTime(): DateTimeImmutable; | ||
|
||
/** | ||
* Key time when it is expired, unix time stamp in millisecond, null if not set | ||
* @return int | ||
*/ | ||
public function getEndTimeStamp(): int; | ||
|
||
/** | ||
* Key time when it is expired, null if not set | ||
* @return DateTimeImmutable | ||
*/ | ||
public function getEndDateTime(): DateTimeImmutable; | ||
|
||
/** | ||
* Current unix time stamp in millisecond | ||
* @see getCurrentDateTime | ||
* @return int | ||
*/ | ||
public function getCurrentTimeStamp(): int; | ||
|
||
/** | ||
* Current date & time | ||
* @see getCurrentTimeStamp | ||
* @return DateTimeImmutable | ||
*/ | ||
public function getCurrentDateTime(): DateTimeImmutable; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace SunnyPHP\TTLock\Contract\Request\Key; | ||
|
||
use DateTimeImmutable; | ||
use SunnyPHP\TTLock\Contract\Request\RequestInterface; | ||
|
||
interface UnauthorizeInterface extends RequestInterface | ||
{ | ||
public function getLockId(): int; | ||
|
||
public function getKeyId(): int; | ||
|
||
/** | ||
* Current unix time stamp in millisecond | ||
* @see getCurrentDateTime | ||
* @return int | ||
*/ | ||
public function getCurrentTimeStamp(): int; | ||
|
||
/** | ||
* Current date & time | ||
* @see getCurrentTimeStamp | ||
* @return DateTimeImmutable | ||
*/ | ||
public function getCurrentDateTime(): DateTimeImmutable; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace SunnyPHP\TTLock\Contract\Request\Key; | ||
|
||
use DateTimeImmutable; | ||
use SunnyPHP\TTLock\Contract\Request\RequestInterface; | ||
|
||
interface UnfreezeInterface extends RequestInterface | ||
{ | ||
public function getKeyId(): int; | ||
|
||
/** | ||
* Current unix time stamp in millisecond | ||
* @see getCurrentDateTime | ||
* @return int | ||
*/ | ||
public function getCurrentTimeStamp(): int; | ||
|
||
/** | ||
* Current date & time | ||
* @see getCurrentTimeStamp | ||
* @return DateTimeImmutable | ||
*/ | ||
public function getCurrentDateTime(): DateTimeImmutable; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace SunnyPHP\TTLock\Contract\Request\Key; | ||
|
||
use DateTimeImmutable; | ||
use SunnyPHP\TTLock\Contract\Request\RequestInterface; | ||
|
||
interface UpdateInterface extends RequestInterface | ||
{ | ||
public function getKeyId(): int; | ||
|
||
public function getKeyName(): string; | ||
|
||
public function isRemoteUnlock(): ?bool; | ||
|
||
/** | ||
* Current unix time stamp in millisecond | ||
* @see getCurrentDateTime | ||
* @return int | ||
*/ | ||
public function getCurrentTimeStamp(): int; | ||
|
||
/** | ||
* Current date & time | ||
* @see getCurrentTimeStamp | ||
* @return DateTimeImmutable | ||
*/ | ||
public function getCurrentDateTime(): DateTimeImmutable; | ||
} |
Oops, something went wrong.