Documentation ¶
Index ¶
- Constants
- func DeleteCipher(ctx context.Context, uuid string, cfg *config.Config) error
- func DoFullSync(ctx context.Context, vault *vault.Vault, config *config.Config, ...) error
- func GetCipher(ctx context.Context, uuid string, cfg *config.Config) (models.Cipher, error)
- func PostCipher(ctx context.Context, cipher models.Cipher, cfg *config.Config) (models.Cipher, error)
- func PutAuthRequest(ctx context.Context, requestUUID string, authRequest AuthRequestData, ...) error
- func PutCipher(ctx context.Context, uuid string, cipher models.Cipher, cfg *config.Config) (models.Cipher, error)
- func ReadVault(path string) (models.SyncData, error)
- func RefreshToken(ctx context.Context, cfg *config.Config) bool
- func RunWebsocketDaemon(ctx context.Context, vault *vault.Vault, cfg *config.Config)
- func Sync(ctx context.Context, config *config.Config) (models.SyncData, error)
- func WriteVault(data models.SyncData, path string) error
- type AuthRequestData
- func CreateAuthRequest(ctx context.Context, code string, deviceIdentifier string, email string, ...) (AuthRequestData, error)
- func GetAuthRequest(ctx context.Context, requestUUID string, config *config.Config) (AuthRequestData, error)
- func GetAuthRequests(ctx context.Context, config *config.Config) ([]AuthRequestData, error)
- func GetAuthResponse(ctx context.Context, code string, requestUUID string, config *config.Config) (AuthRequestData, error)
- type AuthRequestResponseData
- type AuthToken
- type CreateAuthRequestData
- type LoginResponseToken
- func LoginWithApiKey(ctx context.Context, email string, cfg *config.Config, vault *vault.Vault) (LoginResponseToken, crypto.MasterKey, string, error)
- func LoginWithDevice(ctx context.Context, email string, cfg *config.Config, vault *vault.Vault) (LoginResponseToken, crypto.MasterKey, string, error)
- func LoginWithMasterpassword(ctx context.Context, email string, cfg *config.Config, vault *vault.Vault) (LoginResponseToken, crypto.MasterKey, string, error)
- func Perform2FA(values url.Values, errsc *errStatusCode, cfg *config.Config, ...) (LoginResponseToken, error)
- type NotificationMessageType
Constants ¶
View Source
const (
WEBSOCKET_SLEEP_DURATION_SECONDS = 60
)
Variables ¶
This section is empty.
Functions ¶
func DoFullSync ¶
func PostCipher ¶
func PutAuthRequest ¶
func RunWebsocketDaemon ¶
Types ¶
type AuthRequestData ¶
type AuthRequestData struct { CreationDate time.Time `json:"creationDate"` ID string `json:"id"` Key string `json:"key"` MasterPasswordHash string `json:"masterPasswordHash"` Object string `json:"object"` Origin string `json:"origin"` PublicKey string `json:"publicKey"` RequestApproved bool `json:"requestApproved"` RequestDeviceType string `json:"requestDeviceType"` RequestIpAddress string `json:"requestIpAddress"` ResponseDate time.Time `json:"responseDate"` }
func CreateAuthRequest ¶ added in v0.1.4
func GetAuthRequest ¶
func GetAuthRequests ¶
func GetAuthResponse ¶ added in v0.1.6
type AuthRequestResponseData ¶
type AuthRequestResponseData struct { DeviceIdentifier string `json:"deviceIdentifier"` Key string `json:"key"` MasterPasswordHash string `json:"masterPasswordHash"` Requestapproved bool `json:"requestApproved"` }
func CreateAuthResponse ¶
func CreateAuthResponse(ctx context.Context, authRequest AuthRequestData, keyring *crypto.Keyring, config *config.Config) (AuthRequestResponseData, error)
type CreateAuthRequestData ¶ added in v0.1.4
type LoginResponseToken ¶
type LoginResponseToken struct { AccessToken string `json:"access_token"` ExpiresIn int `json:"expires_in"` TokenType string `json:"token_type"` RefreshToken string `json:"refresh_token"` Key string `json:"key"` Kdf int `json:"Kdf"` KdfIterations int `json:"KdfIterations"` KdfMemory int `json:"KdfMemory"` KdfParallelism int `json:"KdfParallelism"` }
func LoginWithApiKey ¶ added in v0.2.8
func LoginWithDevice ¶ added in v0.1.4
func LoginWithMasterpassword ¶
func Perform2FA ¶ added in v0.1.4
type NotificationMessageType ¶
type NotificationMessageType int64
const ( SyncCipherUpdate NotificationMessageType = 0 SyncCipherCreate NotificationMessageType = 1 SyncLoginDelete NotificationMessageType = 2 SyncFolderDelete NotificationMessageType = 3 SyncCiphers NotificationMessageType = 4 SyncVault NotificationMessageType = 5 SyncOrgKeys NotificationMessageType = 6 SyncFolderCreate NotificationMessageType = 7 SyncFolderUpdate NotificationMessageType = 8 SyncCipherDelete NotificationMessageType = 9 SyncSettings NotificationMessageType = 10 LogOut NotificationMessageType = 11 SyncSendCreate NotificationMessageType = 12 SyncSendUpdate NotificationMessageType = 13 SyncSendDelete NotificationMessageType = 14 AuthRequest NotificationMessageType = 15 AuthRequestResponse NotificationMessageType = 16 )
Source Files ¶
Click to show internal directories.
Click to hide internal directories.