Skip to content

Commit

Permalink
New server version operation
Browse files Browse the repository at this point in the history
  • Loading branch information
sgonzalezoyuela committed Dec 20, 2022
1 parent 8d2b9cf commit 620d800
Show file tree
Hide file tree
Showing 28 changed files with 69 additions and 29 deletions.
2 changes: 1 addition & 1 deletion cmd/activate.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 atricore <[email protected]>
*/
package cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/activate_exec_env.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 atricore <[email protected]>
*/
package cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/build.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 atricore <[email protected]>
*/
package cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/delete.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 atricore <[email protected]>
*/
package cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/export.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 atricore <[email protected]>
*/
package cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/export_appliance.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 atricore <[email protected]>
*/
package cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/export_exec_env_cfg.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 atricore <[email protected]>
*/
package cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/export_provider_metadata.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 atricore <[email protected]>
*/
package cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/import.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 atricore <[email protected]>
*/
package cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/import_appliance.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 atricore <[email protected]>
*/
package cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/layout.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 atricore <[email protected]>
*/
package cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/list.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 atricore <[email protected]>
*/
package cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/list_appliances.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 atricore <[email protected]>
*/
package cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/list_idsources.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 atricore <[email protected]>
*/
package cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/list_providers.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 atricore <[email protected]>
*/
package cmd
Expand Down
40 changes: 40 additions & 0 deletions cmd/server-version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package cmd

/*
Copyright © 2022 atricore <[email protected]>
*/

import (
"os"

"github.com/spf13/cobra"
)

// listCmd represents the list command
var serverVersionCmd = &cobra.Command{
Use: "server-version",
Short: "shows current server version",
Args: cobra.MaximumNArgs(0),
Long: `shows the version for the configured server`,
RunE: func(cmd *cobra.Command, args []string) error {
v, err := serverVersion()
if err != nil {
client.Error(err)
os.Exit(1)
}
printOut(v + "\n")

return nil

},
}

func serverVersion() (string, error) {

return client.Client().ServerVersion()
}

func init() {
rootCmd.AddCommand(serverVersionCmd)
}
2 changes: 1 addition & 1 deletion cmd/start.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 atricore <[email protected]>
*/
package cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/stop.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 atricore <[email protected]>
*/
package cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package cmd /*
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 atricore <[email protected]>
*/

Expand Down
2 changes: 1 addition & 1 deletion cmd/test_store.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 atricore <[email protected]>
*/
package cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/validate.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 atricore <[email protected]>
*/
package cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 atricore <[email protected]>
*/
package cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/view.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 atricore <[email protected]>
*/
package cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/view_appliance.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 atricore <[email protected]>
*/
package cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/view_idsource.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 atricore <[email protected]>
*/
package cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/view_provider.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 atricore <[email protected]>
*/
package cmd
Expand Down
4 changes: 4 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ require (
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5

)

replace github.com/atricore/josso-api-go => ../josso-api-go

replace github.com/atricore/josso-sdk-go => ../josso-sdk-go
4 changes: 0 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmV
github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc=
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/atricore/josso-api-go v0.4.1 h1:cFIdmVR2t0QSLItmwRyBgxenO1wS8Uq5SH91Jj1fJEk=
github.com/atricore/josso-api-go v0.4.1/go.mod h1:Oys9D0y1x+bvyIsnRFl6JOYiIV7KQkuToIQa+jxeuHs=
github.com/atricore/josso-sdk-go v0.4.1 h1:TXV6VHTj296CL8ZeRTwa0FYHBAPCRWRkuy/MJ2UlfoM=
github.com/atricore/josso-sdk-go v0.4.1/go.mod h1:wuJAao5Vsc7BHf6lnS7yopqaZJZP3ddTBbB8ni9OUoU=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
Expand Down

0 comments on commit 620d800

Please sign in to comment.