-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: move service interfaces to contract folder
- Loading branch information
1 parent
9bd1ff8
commit 9ee378a
Showing
8 changed files
with
42 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package contract | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/diegoclair/go_boilerplate/domain/entity" | ||
) | ||
|
||
type AccountService interface { | ||
CreateAccount(ctx context.Context, account entity.Account) (err error) | ||
AddBalance(ctx context.Context, accountUUID string, amount float64) (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, cpf, secret string) (account entity.Account, err error) | ||
CreateSession(ctx context.Context, session entity.Session) (err error) | ||
GetSessionByUUID(ctx context.Context, sessionUUID string) (session entity.Session, err error) | ||
} | ||
|
||
type TransferService interface { | ||
CreateTransfer(ctx context.Context, transfer entity.Transfer) (err error) | ||
GetTransfers(ctx context.Context) (transfers []entity.Transfer, err error) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters