Documentation
¶
Index ¶
- Constants
- Variables
- func CheckToken(s storage.Store) http.HandlerFunc
- func CheckUpdate(w http.ResponseWriter, r *http.Request)
- func Confirm(s storage.Store) http.HandlerFunc
- 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 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 Import(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 TestLogin(s storage.Store) http.HandlerFunc
- func ToPayload(r *http.Request) (model.Payload, error)
- 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" VerifySuccess = "Email verified succesfully" )
View Source
var ( Port = "3625" ServerAddress = "0.0.0.0" + ":" + Port )
Functions ¶
func CheckUpdate ¶
func CheckUpdate(w http.ResponseWriter, r *http.Request)
GeneratePassword generates new password
func DeleteBankAccount ¶
func DeleteBankAccount(s storage.Store) http.HandlerFunc
DeleteBankAccount ...
func GeneratePassword ¶
func GeneratePassword(w http.ResponseWriter, r *http.Request)
Password generates new password
func RespondWithError ¶
func RespondWithError(w http.ResponseWriter, code int, message string)
RespondWithError ...
func RespondWithErrors ¶
func RespondWithErrors(w http.ResponseWriter, code int, message string, errors []string)
RespondWithErrors ...
func RespondWithJSON ¶
func RespondWithJSON(w http.ResponseWriter, code int, payload interface{})
RespondWithJSON write json
func Restore ¶
func Restore(s storage.Store) http.HandlerFunc
Restore restores logins from backup file ./store/passwall-{BACKUP_DATE}.bak
Types ¶
type ErrorResponseDTO ¶
type HealthProp ¶
HealthProp ...
type Services ¶
type Services struct {
API *HealthProp `json:"api"`
Database *HealthProp `json:"database"`
}
Services ...
Click to show internal directories.
Click to hide internal directories.