Created
July 13, 2020 06:03
-
-
Save anatoliyfedorenko/b386a2e7939e6706f573679d46b46fa5 to your computer and use it in GitHub Desktop.
Changes to Interface
This file contains hidden or 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
| // IStorage represents database methods | |
| type IStorage interface { | |
| Feedback() Feedback | |
| // this is just a temporary change not to break all the functionality. Will reimplment this | |
| // for the version mentioned above as a next step with just a small chucks under improvements | |
| User | |
| Profile | |
| Agreement | |
| AgreementChange | |
| Milestone | |
| Contact | |
| Notification | |
| Payout | |
| WebhookEvent | |
| Referral | |
| VerificationCode | |
| PlatformTransfer | |
| } | |
| func (s *Storage) Feedback() Feedback { | |
| return &FeedbackClient{cfg: s.cfg, logger: s.logger, pool: s.pool} | |
| } | |
| // Feedback inferface contains methods for feedback manipulation | |
| type Feedback interface { | |
| Create(ctx context.Context, f *feedback.Feedback) (*feedback.Feedback, error) | |
| } | |
| type FeedbackClient struct { | |
| cfg config.Config | |
| logger *logrus.Entry | |
| pool *pgxpool.Pool | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment