Documentation
¶
Index ¶
- Variables
- func Decrypt(ciphertext []byte) ([]byte, error)
- func Encrypt(plain []byte) ([]byte, error)
- func InitCrypto() error
- type Entry
- type Store
- func (s *Store) Create(ctx context.Context, e *Entry) (sql.Result, error)
- func (s *Store) Delete(ctx context.Context, id uuid.UUID) (bool, error)
- func (s *Store) Get(ctx context.Context, id uuid.UUID) (*Entry, error)
- func (s *Store) List(ctx context.Context, domain string, folder string, tags []string) ([]Entry, error)
- type User
- type UserStore
Constants ¶
This section is empty.
Variables ¶
View Source
var NoUserId = errors.New("no user id provided")
View Source
var PermissionDenied = errors.New("you dont have permission to do this")
Functions ¶
func InitCrypto ¶
func InitCrypto() error
Types ¶
type Entry ¶
type Entry struct {
ID uuid.UUID `db:"id"`
UserId string `db:"user_id"`
Title string `db:"title"`
Username string `db:"username"`
Password []byte `db:"password"`
Notes sql.NullString `db:"notes"`
Tags pq.StringArray `db:"tags"`
Folder sql.NullString `db:"folder"`
Domain sql.NullString `db:"domain"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
}
type UserStore ¶
type UserStore struct {
// contains filtered or unexported fields
}
func NewUserStore ¶
func (*UserStore) CreateUser ¶
func (*UserStore) DeleteUser ¶
Click to show internal directories.
Click to hide internal directories.