Skip to content

Instantly share code, notes, and snippets.

@manakuro
Created December 10, 2021 04:59
Show Gist options
  • Save manakuro/e860e3b04c902055eb1594c3f106ae7c to your computer and use it in GitHub Desktop.
Save manakuro/e860e3b04c902055eb1594c3f106ae7c to your computer and use it in GitHub Desktop.
type User interface {
Get(ctx context.Context, id *model.ID) (*model.User, error)
List(ctx context.Context, after *model.Cursor, first *int, before *model.Cursor, last *int) (*model.UserConnection, error)
}
...
func (u *user) List(ctx context.Context, after *model.Cursor, first *int, before *model.Cursor, last *int) (*model.UserConnection, error) {
return u.userUsecase.List(ctx, after, first, before, last)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment