mirror of
https://github.com/argoproj/argo-cd
synced 2026-05-24 09:50:08 +00:00
* Refactor local ~/.argocd/config to be similar to kube configs * `argo login` will detect TLS issues and prompt user before writing config * version server is unauthenticated and `argo version` will report server version
29 lines
800 B
Go
29 lines
800 B
Go
package version
|
|
|
|
import (
|
|
argocd "github.com/argoproj/argo-cd"
|
|
"github.com/golang/protobuf/ptypes/empty"
|
|
"golang.org/x/net/context"
|
|
)
|
|
|
|
type Server struct{}
|
|
|
|
// Version returns the version of the API server
|
|
func (s *Server) Version(context.Context, *empty.Empty) (*VersionMessage, error) {
|
|
vers := argocd.GetVersion()
|
|
return &VersionMessage{
|
|
Version: vers.Version,
|
|
BuildDate: vers.BuildDate,
|
|
GitCommit: vers.GitCommit,
|
|
GitTag: vers.GitTag,
|
|
GitTreeState: vers.GitTreeState,
|
|
GoVersion: vers.GoVersion,
|
|
Compiler: vers.Compiler,
|
|
Platform: vers.Platform,
|
|
}, nil
|
|
}
|
|
|
|
// AuthFuncOverride allows the version to be returned without auth
|
|
func (s *Server) AuthFuncOverride(ctx context.Context, fullMethodName string) (context.Context, error) {
|
|
return ctx, nil
|
|
}
|