Documentation
¶
Overview ¶
The MIT License (MIT)
Copyright (c) 2020 cupnoodles ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The MIT License (MIT)
Copyright (c) 2020 cupnoodles ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The MIT License (MIT)
Copyright (c) 2020 cupnoodles ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The MIT License (MIT)
Copyright (c) 2020 cupnoodles ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index ¶
- Constants
- Variables
- func Nonce() (nonce *[24]byte, err error)
- type AssociateRequest
- type AssociateResponse
- type ChangePublicKeysRequest
- type ChangePublicKeysResponse
- type Client
- func (c *Client) Associate() (resp AssociateResponse, err error)
- func (c *Client) AssociationData() (idKey [24]byte, identifier string)
- func (c *Client) ChangePublicKeys() (resp ChangePublicKeysResponse, err error)
- func (c *Client) GetLogins(url string) (resp GetLoginsResponse, err error)
- func (c *Client) GetTOTP(uuid string) (resp GetTOTPResponse, err error)
- func (c *Client) TestAssociate(triggerUnlock bool) (resp TestAssociateResponse, err error)
- type DBKey
- type GetLoginsRequest
- type GetLoginsResponse
- type GetTOTPRequest
- type GetTOTPResponse
- type LoginEntry
- type Request
- type Response
- type TestAssociateRequest
- type TestAssociateResponse
Constants ¶
const ( CodeUnknownError = 0 CodeDatabaseNotOpened = 1 CodeDatabaseHashNotReceived = 2 CodeClientPublicKeyNotReceived = 3 CodeCannotDecryptMessage = 4 CodeTimeoutOrNotConnected = 5 CodeActionCancelledOrDenied = 6 CodePublicKeyNotFound = 7 CodeAssociationFailed = 8 CodeKeyChangeFailed = 9 CodeEncryptionKeyUnrecognized = 10 CodeNoSavedDatabasesFound = 11 CodeIncorrectAction = 12 CodeEmptyMessageReceived = 13 CodeNoURLProvided = 14 CodeNoLoginsFound = 15 )
const ( ActionChangePublicKeys = "change-public-keys" ActionAssociate = "associate" ActionGetLogins = "get-logins" ActionTestAssociate = "test-associate" ActionGetTOTP = "get-totp" )
Variables ¶
var ( ErrUnknownError = errors.New("unknown error") ErrDatabaseNotOpened = errors.New("database not opened") ErrDatabaseHashNotReceived = errors.New("database hash not received") ErrClientPublicKeyNotReceived = errors.New("client public key not received") ErrCannotDecryptMessage = errors.New("cannot decrypt message") ErrTimeoutOrNotConnected = errors.New("timeout or not connected") ErrActionCancelledOrDenied = errors.New("action cancelled or denied") ErrPublicKeyNotFound = errors.New("public key not found") ErrAssociationFailed = errors.New("association failed") ErrKeyChangeFailed = errors.New("key change failed") ErrEncryptionKeyUnrecognized = errors.New("encryption key unrecognized") ErrNoSavedDatabasesFound = errors.New("no saved databases found") ErrIncorrectAction = errors.New("incorrect action") ErrEmptyMessageReceived = errors.New("empty message received") ErrNoURLProvided = errors.New("no url provided") ErrNoLoginsFound = errors.New("no logins found") )
var ErrFailedToOpen = errors.New("failed to open message")
Functions ¶
Types ¶
type AssociateRequest ¶
type AssociateResponse ¶
type AssociateResponse struct {
Response
}
type ChangePublicKeysRequest ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Associate ¶
func (c *Client) Associate() (resp AssociateResponse, err error)
func (*Client) AssociationData ¶
func (*Client) ChangePublicKeys ¶
func (c *Client) ChangePublicKeys() (resp ChangePublicKeysResponse, err error)
func (*Client) GetLogins ¶
func (c *Client) GetLogins(url string) (resp GetLoginsResponse, err error)
func (*Client) TestAssociate ¶
func (c *Client) TestAssociate(triggerUnlock bool) (resp TestAssociateResponse, err error)
type GetLoginsRequest ¶
type GetLoginsResponse ¶
type GetLoginsResponse struct { Response Entries []LoginEntry `json:"entries"` Count int `json:"count"` }
type GetTOTPRequest ¶
type GetTOTPResponse ¶
type LoginEntry ¶
type TestAssociateRequest ¶
type TestAssociateResponse ¶
type TestAssociateResponse struct {
Response
}