-
Notifications
You must be signed in to change notification settings - Fork 0
/
service.go
26 lines (21 loc) · 1.02 KB
/
service.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package contract
import (
"context"
"github.com/diegoclair/go_boilerplate/application/dto"
"github.com/diegoclair/go_boilerplate/domain/entity"
)
type AccountService interface {
CreateAccount(ctx context.Context, input dto.AccountInput) (err error)
AddBalance(ctx context.Context, input dto.AddBalanceInput) (err error)
GetAccounts(ctx context.Context, take, skip int64) (accounts []entity.Account, totalRecords int64, err error)
GetAccountByUUID(ctx context.Context, accountUUID string) (account entity.Account, err error)
}
type AuthService interface {
Login(ctx context.Context, input dto.LoginInput) (account entity.Account, err error)
CreateSession(ctx context.Context, session dto.Session) (err error)
GetSessionByUUID(ctx context.Context, sessionUUID string) (session dto.Session, err error)
}
type TransferService interface {
CreateTransfer(ctx context.Context, transfer dto.TransferInput) (err error)
GetTransfers(ctx context.Context, take, skip int64) (transfers []entity.Transfer, totalRecords int64, err error)
}