Documentation ¶
Index ¶
- Constants
- Variables
- func CheckToken(s storage.Store) http.HandlerFunc
- func CheckUpdate(w http.ResponseWriter, r *http.Request)
- func CreateBankAccount(s storage.Store) http.HandlerFunc
- func CreateCreditCard(s storage.Store) http.HandlerFunc
- func CreateEmail(s storage.Store) http.HandlerFunc
- func CreateLogin(s storage.Store) http.HandlerFunc
- func CreateNote(s storage.Store) http.HandlerFunc
- func CreateServer(s storage.Store) http.HandlerFunc
- func CreateUser(s storage.Store) http.HandlerFunc
- func DeleteBankAccount(s storage.Store) http.HandlerFunc
- func DeleteCreditCard(s storage.Store) http.HandlerFunc
- func DeleteEmail(s storage.Store) http.HandlerFunc
- func DeleteLogin(s storage.Store) http.HandlerFunc
- func DeleteNote(s storage.Store) http.HandlerFunc
- func DeleteServer(s storage.Store) http.HandlerFunc
- func DeleteUser(s storage.Store) http.HandlerFunc
- func FindAllBankAccounts(s storage.Store) http.HandlerFunc
- func FindAllCreditCards(s storage.Store) http.HandlerFunc
- func FindAllEmails(s storage.Store) http.HandlerFunc
- func FindAllLogins(s storage.Store) http.HandlerFunc
- func FindAllNotes(s storage.Store) http.HandlerFunc
- func FindAllServers(s storage.Store) http.HandlerFunc
- func FindAllUsers(s storage.Store) http.HandlerFunc
- func FindBankAccountByID(s storage.Store) http.HandlerFunc
- func FindCreditCardByID(s storage.Store) http.HandlerFunc
- func FindEmailByID(s storage.Store) http.HandlerFunc
- func FindLoginsByID(s storage.Store) http.HandlerFunc
- func FindNoteByID(s storage.Store) http.HandlerFunc
- func FindSamePassword(s storage.Store) http.HandlerFunc
- func FindServerByID(s storage.Store) http.HandlerFunc
- func FindUserByID(s storage.Store) http.HandlerFunc
- func GeneratePassword(w http.ResponseWriter, r *http.Request)
- func GetErrors(errs []validator.FieldError) []string
- func HealthCheck(s storage.Store) http.HandlerFunc
- func Language(s storage.Store) http.HandlerFunc
- func Languages(s storage.Store) http.HandlerFunc
- func RefreshToken(s storage.Store) http.HandlerFunc
- func RespondWithError(w http.ResponseWriter, code int, message string)
- func RespondWithErrors(w http.ResponseWriter, code int, message string, errors []string)
- func RespondWithJSON(w http.ResponseWriter, code int, payload interface{})
- func Restore(s storage.Store) http.HandlerFunc
- func SetArgs(r *http.Request, fields []string) (map[string]string, map[string]int)
- func Signin(s storage.Store) http.HandlerFunc
- func Signup(s storage.Store) http.HandlerFunc
- func ToSnakeCase(str string) string
- func UpdateBankAccount(s storage.Store) http.HandlerFunc
- func UpdateCreditCard(s storage.Store) http.HandlerFunc
- func UpdateEmail(s storage.Store) http.HandlerFunc
- func UpdateLogin(s storage.Store) http.HandlerFunc
- func UpdateNote(s storage.Store) http.HandlerFunc
- func UpdateServer(s storage.Store) http.HandlerFunc
- func UpdateUser(s storage.Store) http.HandlerFunc
- type ErrorResponseDTO
- type HealthProp
- type Services
Constants ¶
View Source
const ( InvalidRequestPayload = "Invalid request payload" CreditCardDeleted = "CreditCard deleted successfully!" Success = "Success" )
View Source
const ( InvalidJSON = "Invalid json provided" RestoreBackupSuccess = "Restore from backup completed successfully!" ImportSuccess = "Import finished successfully!" BackupSuccess = "Backup completed successfully!" )
View Source
const (
BankAccountDeleteSuccess = "BankAccount deleted successfully!"
)
View Source
const (
LoginDeleteSuccess = "Login deleted successfully!"
)
View Source
const (
NoteDeleteSuccess = "Note deleted successfully!"
)
View Source
const (
ServerDeleteSuccess = "Server deleted successfully!"
)
Variables ¶
View Source
var ( InvalidUser = "Invalid user" ValidToken = "Token is valid" InvalidToken = "Token is expired or not valid!" NoToken = "Token could not found! " TokenCreateErr = "Token could not be created" SignupSuccess = "User created successfully" )
View Source
var ( Port = "3625" ServerAddress = "0.0.0.0" + ":" + Port )
Functions ¶
func CheckUpdate ¶ added in v1.1.1
func CheckUpdate(w http.ResponseWriter, r *http.Request)
GeneratePassword generates new password
func CreateBankAccount ¶ added in v1.1.1
func CreateBankAccount(s storage.Store) http.HandlerFunc
Create ...
func CreateCreditCard ¶ added in v1.1.1
func CreateCreditCard(s storage.Store) http.HandlerFunc
Create ...
func CreateEmail ¶ added in v1.1.1
func CreateEmail(s storage.Store) http.HandlerFunc
CreateEmail ...
func CreateServer ¶ added in v1.1.1
func CreateServer(s storage.Store) http.HandlerFunc
CreateServer ...
func DeleteBankAccount ¶ added in v1.1.1
func DeleteBankAccount(s storage.Store) http.HandlerFunc
DeleteBankAccount ...
func DeleteCreditCard ¶ added in v1.1.1
func DeleteCreditCard(s storage.Store) http.HandlerFunc
Delete ...
func DeleteEmail ¶ added in v1.1.1
func DeleteEmail(s storage.Store) http.HandlerFunc
DeleteEmail ...
func DeleteServer ¶ added in v1.1.1
func DeleteServer(s storage.Store) http.HandlerFunc
DeleteServer ...
func FindAllBankAccounts ¶ added in v1.1.1
func FindAllBankAccounts(s storage.Store) http.HandlerFunc
FindAll ...
func FindAllCreditCards ¶ added in v1.1.1
func FindAllCreditCards(s storage.Store) http.HandlerFunc
FindAll ...
func FindAllEmails ¶ added in v1.1.1
func FindAllEmails(s storage.Store) http.HandlerFunc
FindAllEmails ...
func FindAllLogins ¶ added in v1.1.1
func FindAllLogins(s storage.Store) http.HandlerFunc
FindAll ...
func FindAllServers ¶ added in v1.1.1
func FindAllServers(s storage.Store) http.HandlerFunc
FindAllServers ...
func FindAllUsers ¶ added in v1.1.1
func FindAllUsers(s storage.Store) http.HandlerFunc
FindAllUsers ...
func FindBankAccountByID ¶ added in v1.1.1
func FindBankAccountByID(s storage.Store) http.HandlerFunc
FindByID ...
func FindCreditCardByID ¶ added in v1.1.1
func FindCreditCardByID(s storage.Store) http.HandlerFunc
FindByID ...
func FindEmailByID ¶ added in v1.1.1
func FindEmailByID(s storage.Store) http.HandlerFunc
FindEmailByID ...
func FindLoginsByID ¶ added in v1.1.1
func FindLoginsByID(s storage.Store) http.HandlerFunc
FindByID ...
func FindNoteByID ¶ added in v1.1.1
func FindNoteByID(s storage.Store) http.HandlerFunc
FindByID ...
func FindSamePassword ¶ added in v1.1.1
func FindSamePassword(s storage.Store) http.HandlerFunc
FindSamePassword ...
func FindServerByID ¶ added in v1.1.1
func FindServerByID(s storage.Store) http.HandlerFunc
FindServerByID ...
func FindUserByID ¶ added in v1.1.1
func FindUserByID(s storage.Store) http.HandlerFunc
FindUserByID ...
func GeneratePassword ¶ added in v1.1.1
func GeneratePassword(w http.ResponseWriter, r *http.Request)
Password generates new password
func HealthCheck ¶ added in v1.1.1
func HealthCheck(s storage.Store) http.HandlerFunc
HealthCheck ...
func RespondWithError ¶ added in v1.1.1
func RespondWithError(w http.ResponseWriter, code int, message string)
RespondWithError ...
func RespondWithErrors ¶ added in v1.1.1
func RespondWithErrors(w http.ResponseWriter, code int, message string, errors []string)
RespondWithErrors ...
func RespondWithJSON ¶ added in v1.1.1
func RespondWithJSON(w http.ResponseWriter, code int, payload interface{})
RespondWithJSON write json
func Restore ¶ added in v1.1.1
func Restore(s storage.Store) http.HandlerFunc
Restore restores logins from backup file ./store/passwall-{BACKUP_DATE}.bak
func UpdateBankAccount ¶ added in v1.1.1
func UpdateBankAccount(s storage.Store) http.HandlerFunc
Update ...
func UpdateCreditCard ¶ added in v1.1.1
func UpdateCreditCard(s storage.Store) http.HandlerFunc
Update ...
func UpdateEmail ¶ added in v1.1.1
func UpdateEmail(s storage.Store) http.HandlerFunc
UpdateEmail ...
func UpdateServer ¶ added in v1.1.1
func UpdateServer(s storage.Store) http.HandlerFunc
UpdateServer ...
Types ¶
type ErrorResponseDTO ¶ added in v1.1.1
type HealthProp ¶ added in v1.1.1
HealthProp ...
type Services ¶ added in v1.1.1
type Services struct { API *HealthProp `json:"api"` Database *HealthProp `json:"database"` }
Services ...
Click to show internal directories.
Click to hide internal directories.