Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrRecordNotFound = errors.NotFound("record not found")
)
Functions ¶
func RegisterProviders ¶
Types ¶
type CreateRecordRequest ¶
type DeleteRecordRequest ¶
type GetRecordRequest ¶
type ListRecordsRequest ¶
type ListRecordsRequest struct { UserID uint `json:"userId"` search.Searchable pagination.Pageable }
type NewRecordInput ¶
type Record ¶
type Record struct { ID uint UserID uint Operation RecordOperation Amount float64 UserBalance float64 Result string CreatedAt time.Time }
func NewRecord ¶
func NewRecord(input NewRecordInput) *Record
type RecordOperation ¶
type RecordResponse ¶
type RecordResponse struct { ID uint `json:"id"` UserID uint `json:"userId"` OperationID uint `json:"operationId"` OperationType string `json:"operationType"` Amount float64 `json:"amount"` UserBalance float64 `json:"userBalance"` Result string `json:"result"` CreatedAt time.Time `json:"createdAt"` }
type RecordServiceParams ¶
type RecordServiceParams struct { dig.In Repository Repository }
type Repository ¶
type Service ¶
type Service interface { Get(GetRecordRequest) (RecordResponse, error) List(ListRecordsRequest) (pagination.Page[RecordResponse], error) Create(CreateRecordRequest) (RecordResponse, error) Delete(DeleteRecordRequest) error }
func NewService ¶
func NewService(params RecordServiceParams) Service
Click to show internal directories.
Click to hide internal directories.