-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package devices | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/open-amt-cloud-toolkit/console/internal/usecase/utils" | ||
) | ||
|
||
func (uc *UseCase) GetCertificates(c context.Context, guid string) (interface{}, error) { | ||
item, err := uc.repo.GetByID(c, guid, "") | ||
if err != nil || item.GUID == "" { | ||
return nil, utils.ErrNotFound | ||
} | ||
|
||
uc.device.SetupWsmanClient(item, false, true) | ||
Check failure on line 15 in internal/usecase/devices/certificates.go GitHub Actions / runner / golangci-lint
Check failure on line 15 in internal/usecase/devices/certificates.go GitHub Actions / runner / golangci-lint
Check failure on line 15 in internal/usecase/devices/certificates.go GitHub Actions / runner / golangci-lint
Check failure on line 15 in internal/usecase/devices/certificates.go GitHub Actions / runner / golangci-lint
Check failure on line 15 in internal/usecase/devices/certificates.go GitHub Actions / runner / golangci-lint
Check failure on line 15 in internal/usecase/devices/certificates.go GitHub Actions / runner / build and tests (1.21.x, windows-2019)
Check failure on line 15 in internal/usecase/devices/certificates.go GitHub Actions / runner / build and tests (1.21.x, ubuntu-22.04)
Check failure on line 15 in internal/usecase/devices/certificates.go GitHub Actions / runner / build and tests (1.21.x, ubuntu-20.04)
Check failure on line 15 in internal/usecase/devices/certificates.go GitHub Actions / runner / build and tests (1.22.x, windows-2019)
Check failure on line 15 in internal/usecase/devices/certificates.go GitHub Actions / runner / build and tests (1.22.x, windows-2022)
Check failure on line 15 in internal/usecase/devices/certificates.go GitHub Actions / runner / build and tests (1.22.x, ubuntu-22.04)
|
||
|
||
response, err := uc.device.GetCertificates() | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
return response, nil | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.