Versions in this module Expand all Collapse all v1 v1.1.1 Jun 24, 2020 Changes in this version + const BackupSuccess + const BankAccountDeleteSuccess + const CreditCardDeleted + const ImportSuccess + const InvalidJSON + const InvalidRequestPayload + const LoginDeleteSuccess + const NoteDeleteSuccess + const RestoreBackupSuccess + const ServerDeleteSuccess + const Success + var InvalidToken = "Token is expired or not valid!" + var InvalidUser = "Invalid user" + var NoToken = "Token could not found! " + var Port = "3625" + var ServerAddress = "0.0.0.0" + ":" + Port + var SignupSuccess = "User created successfully" + var TokenCreateErr = "Token could not be created" + var ValidToken = "Token is valid" + 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 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 Signup(s storage.Store) http.HandlerFunc + 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 struct + Code int + Errors []string + Message string + Status string + type HealthProp struct + Err error + StatusCode int + type Services struct + API *HealthProp + Database *HealthProp v1.1.0 May 2, 2020 Changes in this version + func CheckToken(w http.ResponseWriter, r *http.Request) + func RefreshToken(w http.ResponseWriter, r *http.Request) + func Router() *mux.Router + func SetArgs(r *http.Request, fields []string) (map[string]string, map[string]int) + func Signin(w http.ResponseWriter, r *http.Request) + func ToSnakeCase(str string) string + type BankAccountAPI struct + BankAccountService app.BankAccountService + func InitBankAccountAPI(db *gorm.DB) BankAccountAPI + func NewBankAccountAPI(p app.BankAccountService) BankAccountAPI + func (p *BankAccountAPI) Create(w http.ResponseWriter, r *http.Request) + func (p *BankAccountAPI) Delete(w http.ResponseWriter, r *http.Request) + func (p *BankAccountAPI) FindAll(w http.ResponseWriter, r *http.Request) + func (p *BankAccountAPI) FindByID(w http.ResponseWriter, r *http.Request) + func (p *BankAccountAPI) GetHandler(w http.ResponseWriter, r *http.Request) + func (p *BankAccountAPI) Migrate() + func (p *BankAccountAPI) Update(w http.ResponseWriter, r *http.Request) + type CreditCardAPI struct + CreditCardService app.CreditCardService + func InitCreditCardAPI(db *gorm.DB) CreditCardAPI + func NewCreditCardAPI(p app.CreditCardService) CreditCardAPI + func (p *CreditCardAPI) Create(w http.ResponseWriter, r *http.Request) + func (p *CreditCardAPI) Delete(w http.ResponseWriter, r *http.Request) + func (p *CreditCardAPI) FindAll(w http.ResponseWriter, r *http.Request) + func (p *CreditCardAPI) FindByID(w http.ResponseWriter, r *http.Request) + func (p *CreditCardAPI) GetHandler(w http.ResponseWriter, r *http.Request) + func (p *CreditCardAPI) Migrate() + func (p *CreditCardAPI) Update(w http.ResponseWriter, r *http.Request) + type LoginAPI struct + LoginService app.LoginService + func InitLoginAPI(db *gorm.DB) LoginAPI + func NewLoginAPI(p app.LoginService) LoginAPI + func (p *LoginAPI) Create(w http.ResponseWriter, r *http.Request) + func (p *LoginAPI) Delete(w http.ResponseWriter, r *http.Request) + func (p *LoginAPI) FindAll(w http.ResponseWriter, r *http.Request) + func (p *LoginAPI) FindByID(w http.ResponseWriter, r *http.Request) + func (p *LoginAPI) FindSamePassword(w http.ResponseWriter, r *http.Request) + func (p *LoginAPI) GetHandler(w http.ResponseWriter, r *http.Request) + func (p *LoginAPI) Migrate() + func (p *LoginAPI) PostHandler(w http.ResponseWriter, r *http.Request) + func (p *LoginAPI) Update(w http.ResponseWriter, r *http.Request)