generated from mrz1836/go-template
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(SPV-1478): migrate existing admin v2 endpoints to openapi3 (#899)
Co-authored-by: Damian Orzepowski <[email protected]>
- Loading branch information
1 parent
c72a4cf
commit 7d14887
Showing
29 changed files
with
1,172 additions
and
276 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
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,9 +1,19 @@ | ||
package admin | ||
|
||
// APIAdmin represents server with admin API endpoints | ||
type APIAdmin struct{} | ||
import ( | ||
"github.com/bitcoin-sv/spv-wallet/actions/v2/admin/users" | ||
"github.com/bitcoin-sv/spv-wallet/engine" | ||
"github.com/rs/zerolog" | ||
) | ||
|
||
// APIAdmin represents server with API endpoints | ||
type APIAdmin struct { | ||
users.APIAdminUsers | ||
} | ||
|
||
// NewAPIAdmin creates a new APIAdmin | ||
func NewAPIAdmin() *APIAdmin { | ||
return &APIAdmin{} | ||
func NewAPIAdmin(spvWalletEngine engine.ClientInterface, logger *zerolog.Logger) APIAdmin { | ||
return APIAdmin{ | ||
users.NewAPIAdminUsers(spvWalletEngine, logger), | ||
} | ||
} |
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
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
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
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
This file was deleted.
Oops, something went wrong.
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,20 @@ | ||
package users | ||
|
||
import ( | ||
"github.com/bitcoin-sv/spv-wallet/engine" | ||
"github.com/rs/zerolog" | ||
) | ||
|
||
// APIAdminUsers represents server with admin API endpoints | ||
type APIAdminUsers struct { | ||
engine engine.ClientInterface | ||
logger *zerolog.Logger | ||
} | ||
|
||
// NewAPIAdminUsers creates a new APIAdminUsers | ||
func NewAPIAdminUsers(engine engine.ClientInterface, logger *zerolog.Logger) APIAdminUsers { | ||
return APIAdminUsers{ | ||
engine: engine, | ||
logger: logger, | ||
} | ||
} |
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
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
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.