Skip to content

Commit

Permalink
Added mockery directive and generated mocks
Browse files Browse the repository at this point in the history
Signed-off-by: nyagamunene <[email protected]>
  • Loading branch information
nyagamunene committed Apr 9, 2024
1 parent ddb90a0 commit b11e3d7
Show file tree
Hide file tree
Showing 3 changed files with 224 additions and 74 deletions.
3 changes: 3 additions & 0 deletions invitations/invitations.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ func (page InvitationPage) MarshalJSON() ([]byte, error) {
}

// Service is an interface that defines methods for managing invitations.
//
//go:generate mockery --name Service --output=./mocks --filename service.go --quiet --note "Copyright (c) Abstract Machines"
type Service interface {
// SendInvitation sends an invitation to the given user.
// Only domain administrators and platform administrators can send invitations.
Expand Down Expand Up @@ -93,6 +95,7 @@ type Service interface {
DeleteInvitation(ctx context.Context, token, userID, domainID string) (err error)
}

//go:generate mockery --name Repository --output=./mocks --filename invitations.go --quiet --note "Copyright (c) Abstract Machines"
type Repository interface {
// Create creates an invitation.
Create(ctx context.Context, invitation Invitation) (err error)
Expand Down
157 changes: 118 additions & 39 deletions invitations/mocks/invitations.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

138 changes: 103 additions & 35 deletions invitations/mocks/service.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b11e3d7

Please sign in to comment.