mirror of
https://github.com/openfaas/faas.git
synced 2025-06-22 23:03:24 +00:00
Update version info endpoint
This commits updates version endpoint to use ProviderInfo and VersionInfo structs from faas-provider.GatewayInfo now uses ProviderInfo and VersionInfo structs. GatewayInfo is left within gateway. Consumer of this endpoint should use typed struct GatewayInfo to parse response. Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
This commit is contained in:
@ -1,25 +1,13 @@
|
||||
package types
|
||||
|
||||
import providerTypes "github.com/openfaas/faas-provider/types"
|
||||
|
||||
// Platform architecture the gateway is running on
|
||||
var Arch string
|
||||
|
||||
// GatewayInfo provides information about the gateway and it's connected components
|
||||
type GatewayInfo struct {
|
||||
Provider *ProviderInfo `json:"provider"`
|
||||
Version *VersionInfo `json:"version"`
|
||||
Arch string `json:"arch"`
|
||||
}
|
||||
|
||||
// ProviderInfo provides information about the configured provider
|
||||
type ProviderInfo struct {
|
||||
Name string `json:"provider"`
|
||||
Version *VersionInfo `json:"version"`
|
||||
Orchestration string `json:"orchestration"`
|
||||
}
|
||||
|
||||
// VersionInfo provides the commit message, sha and release version number
|
||||
type VersionInfo struct {
|
||||
CommitMessage string `json:"commit_message,omitempty"`
|
||||
SHA string `json:"sha"`
|
||||
Release string `json:"release"`
|
||||
Provider *providerTypes.ProviderInfo `json:"provider"`
|
||||
Version *providerTypes.VersionInfo `json:"version"`
|
||||
Arch string `json:"arch"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user