Documentation ¶
Index ¶
- Variables
- func GetClient(config *Config) (*http.Client, error)
- func GetDefaultConfigFile() string
- func Logout() error
- func SaveConfig(config *Config) error
- func SetConfigFile(configFile string)
- type Cluster
- type ClusterPage
- type ClusterStatus
- type Config
- type Credentials
- type Project
- type ProjectPage
Constants ¶
This section is empty.
Variables ¶
View Source
var ClientID = "5fa304bcb1e86a777578db37"
View Source
var ClientSecret = "ec5d83fe4253dc26da36aafe1dd84b3e1c246d4d47074e6f4d32bff64b66dbee"
View Source
var ConfigFile = ""
View Source
var OpsgyAccountUrl = "https://account.opsgy.com"
View Source
var OpsgyApiUrl = "https://api.opsgy.com"
Functions ¶
func GetDefaultConfigFile ¶
func GetDefaultConfigFile() string
func SaveConfig ¶
func SetConfigFile ¶
func SetConfigFile(configFile string)
Types ¶
type Cluster ¶
type Cluster struct { ClusterID string `json:"clusterId,omitempty"` ProjectID string `json:"projectId,omitempty"` Name string `json:"name,omitempty"` Region string `json:"region,omitempty"` Status *ClusterStatus `json:"status,omitempty"` }
func GetClusterByName ¶
type ClusterPage ¶
type ClusterStatus ¶
type ClusterStatus struct {
KubeApiURL string `json:"kubeApiUrl,omitempty"`
}
type Config ¶
type Config struct { AccessToken string `yaml:"accessToken,omitempty"` RefreshToken string `yaml:"refreshToken,omitempty"` TokenExpiry time.Time `yaml:"tokenExpiry,omitempty"` TokenType string `yaml:"tokenType,omitempty"` ProjectName string `yaml:"projectName,omitempty"` }
func LoadConfig ¶
func LoadConfig() *Config
type Credentials ¶
type Project ¶
type Project struct { ProjectID string `json:"projectId,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` IsDefault bool `json:"isDefault,omitempty"` }
func GetProjectByName ¶
type ProjectPage ¶
Click to show internal directories.
Click to hide internal directories.