Documentation ¶
Index ¶
- Constants
- Variables
- func GetFromResp[T any](respData []byte) (*T, error)
- func GetFromRespForEdge[T any](respData []byte) ([]T, error)
- type ApiClient
- type App
- type AppPort
- type AppSpec
- type CSResp
- type CheckName
- type Cluster
- type Config
- type ConfigEnv
- type ConfigORSecret
- type Device
- type DeviceList
- type Edge
- type Edges
- type Env
- type EnvList
- type EnvRsp
- type GeneratedEnvs
- type InstallCommand
- type ItemList
- type Kv
- type Metadata
- type MountMap
- type Mres
- type MresEnv
- type MresResp
- type Response
- type Secret
- type SecretEnv
- type Status
- type Team
- type User
Constants ¶
View Source
const ( VPNDeviceType = "global_vpn_device" ClusterType = "byok_cluster" )
View Source
const ( PublicEnvRoutingMode = "public" EnvironmentType = "environment" )
View Source
const (
Default_GVPN = "default"
)
Variables ¶
View Source
var PaginationDefault = map[string]any{
"orderBy": "updateTime",
"sortDirection": "ASC",
"first": 99999999,
}
Functions ¶
func GetFromResp ¶
func GetFromRespForEdge ¶
Types ¶
type ApiClient ¶
type ApiClient interface { ListTeams() ([]Team, error) GetHostDNSSuffix() (string, error) ListApps(teamName string, envName string) ([]App, error) InterceptApp(app *App, status bool, ports []AppPort, envName string, options ...fn.Option) (err error) CreateRemoteLogin() (loginId string, err error) GetCurrentUser() (*User, error) Login(loginId string) error ListConfigs(teamName string, envName string) ([]Config, error) GetConfig(teamName string, envName string, configName string) (*Config, error) GetVPNDevice(teamName string, devName string) (*Device, error) CheckDeviceStatus() bool GetAccVPNConfig(team string) (*fileclient.TeamVpnConfig, error) CreateVpnForTeam(team string) (*Device, error) CreateDevice(devName, displayName, team string) (*Device, error) GetClusterConfig(team string) (*fileclient.TeamClusterConfig, error) ListEnvs(teamName string) ([]Env, error) GetEnvironment(teamName, envName string) (*Env, error) EnsureEnv() (*fileclient.Env, error) CloneEnv(teamName, envName, newEnvName, clusterName string) (*Env, error) UpdateEnvironment(teamName string, env *Env, isSuspend bool) error CheckEnvName(teamName, envName string) (bool, error) GetLoadMaps() (map[string]string, MountMap, error) //ListBYOKClusters(teamName string) ([]BYOKCluster, error) GetClustersOfTeam(team string) ([]Cluster, error) DeleteCluster(team, clusterName string) error GetCluster(team, clusterName string) (*Cluster, error) ListMreses(teamName string, envName string) ([]Mres, error) ListMresKeys(teamName, envName, importedManagedResource string) ([]string, error) GetMresConfigValues(teamName string) (map[string]string, error) ListSecrets(teamName string, envName string) ([]Secret, error) GetSecret(teamName string, secretName string) (*Secret, error) RemoveAllIntercepts(options ...fn.Option) error }
type Cluster ¶
type Cluster struct { DisplayName string `json:"displayName"` ClusterToken string `json:"clusterToken"` Name string `json:"name"` LastOnlineAt time.Time `json:"lastOnlineAt"` InstallCommand *InstallCommand `json:"installCommand"` Metadata struct { Name string `json:"name"` Labels map[string]string `json:"labels"` } `json:"metadata"` }
type ConfigORSecret ¶
type Device ¶
type Device struct { TeamName string `json:"accountName"` CreationTime string `json:"creationTime"` CreatedBy User `json:"createdBy"` DisplayName string `json:"displayName"` GlobalVPNName string `json:"globalVPNName"` ID string `json:"id"` IPAddress string `json:"ipAddr"` LastUpdatedBy User `json:"lastUpdatedBy"` MarkedForDeletion bool `json:"markedForDeletion"` Metadata struct { Annotations map[string]string `json:"annotations"` CreationTimestamp string `json:"creationTimestamp"` DeletionTimestamp string `json:"deletionTimestamp"` Labels map[string]string `json:"labels"` Name string `json:"name"` } `json:"metadata"` PrivateKey string `json:"privateKey"` PublicEndpoint string `json:"publicEndpoint"` PublicKey string `json:"publicKey"` UpdateTime string `json:"updateTime"` WireguardConfig struct { Value string `json:"value"` Encoding string `json:"encoding"` } `json:"wireguardConfig,omitempty"` }
type DeviceList ¶
type Env ¶
type Env struct { DisplayName string `json:"displayName"` Metadata Metadata `json:"metadata"` Status Status `json:"status"` ClusterName string `json:"clusterName"` IsArchived bool `json:"isArchived"` Spec struct { Suspend bool `json:"suspend"` TargetNamespace string `json:"targetNamespace"` } `json:"spec"` }
type GeneratedEnvs ¶
type InstallCommand ¶
type InstallCommand struct { ChartRepo string `json:"chart-repo"` ChartVersion string `json:"chart-version"` CRDsURL string `json:"crds-url"` HelmValues struct { TeamName string `json:"accountName"` ClusterName string `json:"clusterName"` ClusterToken string `json:"clusterToken"` KloudliteDNSSuffix string `json:"kloudliteDNSSuffix"` MessageOfficeGRPCAddr string `json:"messageOfficeGRPCAddr"` } `json:"helm-values"` Gateway struct { IP string `json:"IP"` ClusterCIDR string `json:"clusterCIDR"` } }
type Secret ¶
type Secret struct { DisplayName string `yaml:"displayName" json:"displayName"` Metadata Metadata `yaml:"metadata" json:"metadata"` Status Status `yaml:"status" json:"status"` StringData map[string]string `yaml:"stringData" json:"stringData"` IsReadyOnly bool `yaml:"isReadyOnly" json:"isReadyOnly"` }
type Status ¶
type Status struct { IsReady bool `json:"isReady"` Message struct { RawMessage json.RawMessage `json:",inline"` } `json:"message"` }
Click to show internal directories.
Click to hide internal directories.