Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Commit

Permalink
Merge pull request #213 from secrethub/revert-205-feature/export-get-…
Browse files Browse the repository at this point in the history
…my-account

Revert "Add AccountService.Me() method"
  • Loading branch information
SimonBarendse authored Jul 29, 2020
2 parents 7e33819 + 88274d2 commit 9cc9510
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
7 changes: 0 additions & 7 deletions pkg/secrethub/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ var (

// AccountService handles operations on SecretHub accounts.
type AccountService interface {
// Me retrieves the authenticated account of the client.
Me() (*api.Account, error)
// Get retrieves an account by name.
Get(name string) (*api.Account, error)
// Keys returns an account key service.
Expand All @@ -32,11 +30,6 @@ type accountService struct {
client *Client
}

// Me retrieves the authenticated account of the client.
func (s accountService) Me() (*api.Account, error) {
return s.client.getMyAccount()
}

// Get retrieves an account by name.
func (s accountService) Get(name string) (*api.Account, error) {
accountName, err := api.NewAccountName(name)
Expand Down
6 changes: 0 additions & 6 deletions pkg/secrethub/fakeclient/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (

// AccountService is a mock of the AccountService interface.
type AccountService struct {
MeFunc func() (*api.Account, error)
GetFunc func(name string) (*api.Account, error)
AccountKeyService secrethub.AccountKeyService
}
Expand All @@ -22,8 +21,3 @@ func (s *AccountService) Keys() secrethub.AccountKeyService {
func (s *AccountService) Get(name string) (*api.Account, error) {
return s.GetFunc(name)
}

// Me implements the AccountService interface Me function.
func (s *AccountService) Me() (*api.Account, error) {
return s.MeFunc()
}

0 comments on commit 9cc9510

Please sign in to comment.