generated from xmidt-org/.go-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #266 from xmidt-org/acquire
Remove Acquire
- Loading branch information
Showing
9 changed files
with
133 additions
and
298 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// SPDX-FileCopyrightText: 2024 Comcast Cable Communications Management, LLC | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package chrysom | ||
|
||
import ( | ||
"net/http" | ||
) | ||
|
||
// Acquirer adds an authorization header and value to a given http request. | ||
type Acquirer interface { | ||
AddAuth(*http.Request) error | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// SPDX-FileCopyrightText: 2024 Comcast Cable Communications Management, LLC | ||
// SPDX-License-Identifier: Apache-2.0 | ||
package chrysom | ||
|
||
import ( | ||
"net/http" | ||
|
||
"github.com/stretchr/testify/mock" | ||
) | ||
|
||
type MockAquirer struct { | ||
mock.Mock | ||
} | ||
|
||
func (m *MockAquirer) AddAuth(req *http.Request) error { | ||
args := m.Called(req) | ||
|
||
return args.Error(0) | ||
} |
This file contains 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
Oops, something went wrong.