Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
GOPATH: ${{ github.workspace }}
strategy:
matrix:
go-version: [1.15.x, 1.16.x]
go-version: [1.25.0]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
Expand All @@ -26,7 +26,9 @@ jobs:
path: ./src/github.com/puppetlabs/pe-sdk-go/
- name: Install pre-requisites
if: matrix.platform == 'ubuntu-latest'
run: go get -u golang.org/x/tools/cmd/goimports golang.org/x/lint/golint
run: |
go install golang.org/x/tools/cmd/goimports@latest
go install golang.org/x/lint/golint@latest
- name: Format
if: matrix.platform == 'ubuntu-latest'
run: cd ./src/github.com/puppetlabs/pe-sdk-go && make format
Expand Down
2 changes: 1 addition & 1 deletion app/puppet-access/api/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package api

import "github.com/puppetlabs/pe-sdk-go/app/puppet-access/api/client"

//Client is interface to the api client
// Client is interface to the api client
type Client interface {
GetClient() (*client.PuppetAccess, error)
}
9 changes: 4 additions & 5 deletions app/puppet-access/api/client/operations/login_parameters.go

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

33 changes: 14 additions & 19 deletions app/puppet-access/api/client/operations/login_responses.go

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

8 changes: 2 additions & 6 deletions app/puppet-access/api/client/operations/operations_client.go

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

8 changes: 4 additions & 4 deletions app/puppet-access/api/swaggerclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@ import (
"github.com/puppetlabs/pe-sdk-go/log/loglevel"
)

//SwaggerClientCfg represent a pe-sdk-go swagger client config
// SwaggerClientCfg represent a pe-sdk-go swagger client config
type SwaggerClientCfg struct {
Login, Password, Lifetime, URL, Label, Cacert, Username string
UseCNVerification bool
}

//SwaggerClient represents a pe-sdk-go swagger client
// SwaggerClient represents a pe-sdk-go swagger client
type SwaggerClient struct {
SwaggerClientCfg
}

//NewClient creates a new NewClient
// NewClient creates a new NewClient
func NewClient(cfg SwaggerClientCfg) Client {
return &SwaggerClient{
cfg,
}
}

//GetClient configures and creates a swagger generated client
// GetClient configures and creates a swagger generated client
func (sc *SwaggerClient) GetClient() (*client.PuppetAccess, error) {
if sc.URL == "" {
err := fmt.Errorf("Please provide the service URL. For example, `puppet-access login [username] --service-url https://<HOSTNAME OF PUPPET ENTERPRISE CONSOLE>:4433/rbac-ap`")
Expand Down
2 changes: 1 addition & 1 deletion app/puppet-access/puppet-access.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/puppetlabs/pe-sdk-go/app/puppet-access/api"
)

//PuppetAccessCfg config
// PuppetAccessCfg config
type PuppetAccessCfg struct {
Username string
Password string
Expand Down
2 changes: 1 addition & 1 deletion app/puppet-code/api/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package api

import "github.com/puppetlabs/pe-sdk-go/app/puppet-code/api/client"

//Client is interface to the api client
// Client is interface to the api client
type Client interface {
GetClient() (*client.PuppetCode, error)
}
9 changes: 4 additions & 5 deletions app/puppet-code/api/client/operations/deploy_parameters.go

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

24 changes: 10 additions & 14 deletions app/puppet-code/api/client/operations/deploy_responses.go

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

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

14 changes: 6 additions & 8 deletions app/puppet-code/api/client/operations/get_status_responses.go

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

12 changes: 3 additions & 9 deletions app/puppet-code/api/client/operations/operations_client.go

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

8 changes: 4 additions & 4 deletions app/puppet-code/api/swaggerclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@ import (
"github.com/puppetlabs/pe-sdk-go/log/loglevel"
)

//SwaggerClientCfg represent a pe-sdk-go swagger client config
// SwaggerClientCfg represent a pe-sdk-go swagger client config
type SwaggerClientCfg struct {
Cacert, ServiceURL, Token string
UseCNVerification bool
}

//SwaggerClient represents a puppec-code swagger client
// SwaggerClient represents a puppec-code swagger client
type SwaggerClient struct {
SwaggerClientCfg
}

//NewClient creates a new SwaggerClient
// NewClient creates a new SwaggerClient
func NewClient(cfg SwaggerClientCfg) Client {
return &SwaggerClient{
cfg,
}
}

//GetClient configures and creates a swagger generated client
// GetClient configures and creates a swagger generated client
func (sc *SwaggerClient) GetClient() (*client.PuppetCode, error) {
url, err := url.Parse(sc.ServiceURL)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion app/puppet-code/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (puppetCode *PuppetCode) deploy(args *DeployArgs) (*operations.DeployOK, er
return client.Operations.Deploy(deployConfig, aPIKeyHeaderAuth)
}

//getDeployConfig creates a DeployParams based on command line arguments
// getDeployConfig creates a DeployParams based on command line arguments
func (puppetCode *PuppetCode) getDeployConfig(args *DeployArgs) *operations.DeployParams {
deployParamenters := operations.NewDeployParamsWithContext(context.Background())
body := operations.DeployBody{
Expand Down
2 changes: 1 addition & 1 deletion app/puppet-code/puppet-code.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/puppetlabs/pe-sdk-go/app/puppet-code/api"
)

//PuppetCodeCfg config
// PuppetCodeCfg config
type PuppetCodeCfg struct {
ServiceURL string
Cacert string
Expand Down
2 changes: 1 addition & 1 deletion app/puppet-code/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
httptransport "github.com/go-openapi/runtime/client"
)

//GetStatusWithErrorDetails will check code manager api status and add error details to the error text
// GetStatusWithErrorDetails will check code manager api status and add error details to the error text
func (puppetCode *PuppetCode) GetStatusWithErrorDetails() ([]byte, error) {
resp, err := puppetCode.getStatus()
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion app/puppet-code/testing/xauthenticationwriter.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type authToken struct {
t *testing.T
}

//XAuthenticationWriter matcher
// XAuthenticationWriter matcher
func XAuthenticationWriter(t *testing.T, s string) gomock.Matcher {
return &authToken{
t: t,
Expand Down
Loading
Loading