Versions in this module Expand all Collapse all v0 v0.0.5 Aug 4, 2020 Changes in this version + func Backup(w http.ResponseWriter, r *http.Request) error + func BackupHTTP(w http.ResponseWriter, r *http.Request) + func BackupLocal() error + func ConnectDatabase() (*bbolt.DB, error) + func NewHTTPError(err error, status int, detail string) error + func Serve() + type Application struct + Application string + Password string + Username string + type ClientError interface + Body func() ([]byte, error) + Error func() string + Headers func() (int, map[string]string) + type DBError struct + Message string + Status string + func (dberror *DBError) Error() string + type HTTPError struct + Cause error + Details string + Status int + func (e *HTTPError) Body() ([]byte, error) + func (e *HTTPError) Error() string + func (e *HTTPError) Headers() (int, map[string]string) + type MasterPass struct + MasterPassword string + type Record struct + Bucket string + Key []byte + Value []byte + func (r *Record) AddRecord() error + func (r *Record) DeleteEncryptedRecord() error + func (r *Record) DeleteRecord() error + func (r *Record) FindCorrectRecord() error + func (r *Record) GetRecord() error + type Route struct + HandlerFunc http.HandlerFunc + Method string + Name string + Pattern string + type Routes []Route + type Status struct + State string + type User struct + Pass *Password + Username string v0.0.3 Mar 12, 2024 v0.0.2 Mar 5, 2024 Changes in this version + var ErrInitialized = errors.New("database already initialized") + func HashPassword(s string) string + type Backend interface + type DatabaseKey struct + DBKey string + type JetStreamRecord struct + func NewJSRecord() *JetStreamRecord + func (j *JetStreamRecord) Bucket() string + func (j *JetStreamRecord) Decrypt() error + func (j *JetStreamRecord) Encrypt() error + func (j *JetStreamRecord) Key() string + func (j *JetStreamRecord) SetBucket(b string) *JetStreamRecord + func (j *JetStreamRecord) SetEncryptionKey(k []byte) *JetStreamRecord + func (j *JetStreamRecord) SetKey(k string) *JetStreamRecord + func (j *JetStreamRecord) SetSanitizedKey(k string) *JetStreamRecord + func (j *JetStreamRecord) SetValue(v string) *JetStreamRecord + func (j *JetStreamRecord) Value() []byte + type KV interface + Bucket func() string + Encrypt func() error + Key func() string + Value func() []byte + type NatsBackend struct + Conn *nats.Conn + JS nats.JetStreamContext + Options []nats.Option + Servers string + func NewNatsBackend(s string, opts []nats.Option) *NatsBackend + func (n *NatsBackend) AddRecord(k KV) error + func (n *NatsBackend) Connect() error + func (n *NatsBackend) DeleteRecord(k KV) error + func (n *NatsBackend) GetRecord(k KV) ([]byte, error) + func (n *NatsBackend) HandleKeyAction(req micro.Request) *ResponseMessage + func (n *NatsBackend) HandleRequests(req micro.Request) + func (n *NatsBackend) Initialize() ([]byte, error) + func (n *NatsBackend) InitializeRequest(req micro.Request) + func (n *NatsBackend) Lock() + func (n *NatsBackend) LockRequest(req micro.Request) + func (n *NatsBackend) SetupMicro() error + func (n *NatsBackend) Unlock(k KV) error + func (n *NatsBackend) UnlockRequest(req micro.Request) + type Password struct + PlainText string + func NewPassword() *Password + type ResponseMessage struct + Code int + Details string + Error string + func (r *ResponseMessage) Marshal() *nats.Msg + type Server struct + Backend Backend + func NewServer() *Server + func (s *Server) Serve() + func (s *Server) SetBackend(b Backend) + type Watcher interface + Watch func()