Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type Tweet struct {
- Content string
- Author User
- CreatedAt time.Time
- }
- type User struct {
- TwitterHandle string
- // the rest is obvious
- }
- // TwitterRepository interface that defines the methods
- type TwitterRepository interface {
- CreateTweet(tweet *Tweet)error
- DeleteTweet(id string)error
- // etc
- }
Add Comment
Please, Sign In to add comment