Documentation ¶
Index ¶
- Variables
- type BankAccount
- type BankAccountResponse
- type CreateUpdateBankAccountPayload
- type Handler
- func (h *Handler) CreateBankAccount(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DeleteBankAccount(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ListBankAccount(w http.ResponseWriter, r *http.Request)
- func (h *Handler) PartialUpdateBankAccount(w http.ResponseWriter, r *http.Request)
- type Repository
- type Service
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BankAccount ¶
type BankAccountResponse ¶
type CreateUpdateBankAccountPayload ¶
type CreateUpdateBankAccountPayload struct { BankName string `json:"bankName"` BankAccountName string `json:"bankAccountName"` BankAccountNumber string `json:"bankAccountNumber"` }
func (CreateUpdateBankAccountPayload) Validate ¶
func (p CreateUpdateBankAccountPayload) Validate() error
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) CreateBankAccount ¶
func (h *Handler) CreateBankAccount(w http.ResponseWriter, r *http.Request)
func (*Handler) DeleteBankAccount ¶
func (h *Handler) DeleteBankAccount(w http.ResponseWriter, r *http.Request)
func (*Handler) ListBankAccount ¶
func (h *Handler) ListBankAccount(w http.ResponseWriter, r *http.Request)
func (*Handler) PartialUpdateBankAccount ¶
func (h *Handler) PartialUpdateBankAccount(w http.ResponseWriter, r *http.Request)
type Repository ¶
type Repository interface { Create(ctx context.Context, bankAccount *BankAccount) error GetByUUID(ctx context.Context, uuid uuid.UUID) (*BankAccount, error) List(ctx context.Context, userID uint64) ([]*BankAccount, error) Update(ctx context.Context, bankAccount *BankAccount) error Delete(ctx context.Context, uuid uuid.UUID) error }
func NewRepository ¶
func NewRepository(db *db.DB) Repository
type Service ¶
type Service interface { Create(ctx context.Context, req CreateUpdateBankAccountPayload, userID uint64) (*BankAccountResponse, error) List(ctx context.Context, userID uint64) ([]*BankAccountResponse, error) PartialUpdate(ctx context.Context, req CreateUpdateBankAccountPayload, uuid uuid.UUID, userID uint64) (*BankAccountResponse, error) Delete(ctx context.Context, uuid uuid.UUID, userID uint64) error }
func NewService ¶
func NewService(repository Repository) Service
Click to show internal directories.
Click to hide internal directories.