Documentation ¶
Index ¶
- Constants
- Variables
- type AuthClient
- type BinaryClient
- type CardClient
- type HTTPKeeperClient
- func (c HTTPKeeperClient) DeleteBinary(ctx context.Context, id string) error
- func (c HTTPKeeperClient) DeleteCard(ctx context.Context, id string) error
- func (c HTTPKeeperClient) DeletePassword(ctx context.Context, id string) error
- func (c HTTPKeeperClient) DeleteText(ctx context.Context, id string) error
- func (c HTTPKeeperClient) GetAllBinaries(ctx context.Context) ([]models.BinaryResponse, error)
- func (c HTTPKeeperClient) GetAllCards(ctx context.Context) ([]models.CardResponse, error)
- func (c HTTPKeeperClient) GetAllPasswords(ctx context.Context) ([]models.PasswordResponse, error)
- func (c HTTPKeeperClient) GetAllTexts(ctx context.Context) ([]models.TextResponse, error)
- func (c HTTPKeeperClient) GetBinaryByID(ctx context.Context, id string) (models.BinaryResponse, error)
- func (c HTTPKeeperClient) GetCardByID(ctx context.Context, id string) (models.CardResponse, error)
- func (c HTTPKeeperClient) GetPasswordByID(ctx context.Context, id string) (models.PasswordResponse, error)
- func (c HTTPKeeperClient) GetTextByID(ctx context.Context, id string) (models.TextResponse, error)
- func (c HTTPKeeperClient) Login(ctx context.Context, user, password string) error
- func (c HTTPKeeperClient) Logout(ctx context.Context) error
- func (c HTTPKeeperClient) Register(ctx context.Context, user, password string) error
- func (c HTTPKeeperClient) StoreBinary(ctx context.Context, name string, data []byte, note string) (string, error)
- func (c HTTPKeeperClient) StoreCard(ctx context.Context, name, number, holder, expDate, cvv, note string) (string, error)
- func (c HTTPKeeperClient) StorePassword(ctx context.Context, name, user, password, note string) (string, error)
- func (c HTTPKeeperClient) StoreText(ctx context.Context, name, data, note string) (string, error)
- type KeeperClient
- type KeeperClientConfig
- type PasswordClient
- type TextClient
Constants ¶
View Source
const ( SBinary string = "/storage/binary/" SCard string = "/storage/card/" SPassword string = "/storage/password/" SText string = "/storage/text/" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AuthClient ¶
type BinaryClient ¶
type BinaryClient interface { DeleteBinary(ctx context.Context, id string) error GetAllBinaries(ctx context.Context) ([]models.BinaryResponse, error) GetBinaryByID(ctx context.Context, id string) (models.BinaryResponse, error) StoreBinary(ctx context.Context, name string, data []byte, note string) (string, error) }
type CardClient ¶
type CardClient interface { DeleteCard(ctx context.Context, id string) error GetAllCards(ctx context.Context) ([]models.CardResponse, error) GetCardByID(ctx context.Context, id string) (models.CardResponse, error) StoreCard(ctx context.Context, name, number, holder, expDate, cvv, note string) (string, error) }
type HTTPKeeperClient ¶
type HTTPKeeperClient struct {
// contains filtered or unexported fields
}
func NewHTTPClient ¶
func NewHTTPClient(cfg *config.ClientConfig) (HTTPKeeperClient, error)
func (HTTPKeeperClient) DeleteBinary ¶
func (c HTTPKeeperClient) DeleteBinary(ctx context.Context, id string) error
func (HTTPKeeperClient) DeleteCard ¶
func (c HTTPKeeperClient) DeleteCard(ctx context.Context, id string) error
func (HTTPKeeperClient) DeletePassword ¶
func (c HTTPKeeperClient) DeletePassword(ctx context.Context, id string) error
func (HTTPKeeperClient) DeleteText ¶
func (c HTTPKeeperClient) DeleteText(ctx context.Context, id string) error
func (HTTPKeeperClient) GetAllBinaries ¶
func (c HTTPKeeperClient) GetAllBinaries(ctx context.Context) ([]models.BinaryResponse, error)
func (HTTPKeeperClient) GetAllCards ¶
func (c HTTPKeeperClient) GetAllCards(ctx context.Context) ([]models.CardResponse, error)
func (HTTPKeeperClient) GetAllPasswords ¶
func (c HTTPKeeperClient) GetAllPasswords(ctx context.Context) ([]models.PasswordResponse, error)
func (HTTPKeeperClient) GetAllTexts ¶
func (c HTTPKeeperClient) GetAllTexts(ctx context.Context) ([]models.TextResponse, error)
func (HTTPKeeperClient) GetBinaryByID ¶
func (c HTTPKeeperClient) GetBinaryByID(ctx context.Context, id string) (models.BinaryResponse, error)
func (HTTPKeeperClient) GetCardByID ¶
func (c HTTPKeeperClient) GetCardByID(ctx context.Context, id string) (models.CardResponse, error)
func (HTTPKeeperClient) GetPasswordByID ¶
func (c HTTPKeeperClient) GetPasswordByID(ctx context.Context, id string) (models.PasswordResponse, error)
func (HTTPKeeperClient) GetTextByID ¶
func (c HTTPKeeperClient) GetTextByID(ctx context.Context, id string) (models.TextResponse, error)
func (HTTPKeeperClient) Login ¶
func (c HTTPKeeperClient) Login(ctx context.Context, user, password string) error
func (HTTPKeeperClient) Register ¶
func (c HTTPKeeperClient) Register(ctx context.Context, user, password string) error
func (HTTPKeeperClient) StoreBinary ¶
func (HTTPKeeperClient) StorePassword ¶
type KeeperClient ¶
type KeeperClient interface { AuthClient BinaryClient CardClient PasswordClient TextClient }
func NewClient ¶
func NewClient(cfg *config.ClientConfig) (KeeperClient, error)
type KeeperClientConfig ¶
type PasswordClient ¶
type PasswordClient interface { DeletePassword(ctx context.Context, id string) error GetAllPasswords(ctx context.Context) ([]models.PasswordResponse, error) GetPasswordByID(ctx context.Context, id string) (models.PasswordResponse, error) StorePassword(ctx context.Context, name, user, password, note string) (string, error) }
type TextClient ¶
Click to show internal directories.
Click to hide internal directories.