api

package
v0.4.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2023 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Overview

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const GetGitlabPipelinesStatusMaxLimit = 20
View Source
const (
	HostTypeInternal = "internal"
)

Variables

This section is empty.

Functions

func GetLeaseLock added in v0.3.1

func GetLeaseLock(podNamespace string, podName string) (*resourcelock.LeaseLock, error)

func GetNamespaceByServices added in v0.4.1

func GetNamespaceByServices(profile *config.ProjectProfile, services string) (string, error)

Return namespace by selected profile, if profile has required services, namespace will have ref of first required service in namespace name.

func SetRemoteServerAction added in v0.4.3

func SetRemoteServerAction(ctx context.Context, input SetRemoteServerActionInput) error

return all remote servers.

func SetRemoteServerDelay added in v0.4.3

func SetRemoteServerDelay(ctx context.Context, input SetRemoteServerDelayInput) error

set autopause date for remote server.

func SetRemoteServerLabels added in v0.4.5

func SetRemoteServerLabels(ctx context.Context, server *hcloud.Server, newLabels map[string]string) error

Types

type ClusterInfo added in v0.4.5

type ClusterInfo struct {
	NodesSize int
	AllocatableCPU,
	AllocatableMemory,
	AllocatablePods,
	AllocatableStorage,
	AllocatableStorageEphemeral float64
	PVSizeRWO    int
	PVSizeRWX    int
	PVStorageRWO float64
	PVStorageRWX float64
}

func GetClusterInfo added in v0.4.5

func GetClusterInfo(ctx context.Context, name string) (*ClusterInfo, error)

func (*ClusterInfo) ToHuman added in v0.4.5

func (c *ClusterInfo) ToHuman() *ClusterInfoHuman

type ClusterInfoHuman added in v0.4.5

type ClusterInfoHuman struct {
	TotalNodes,
	StorageDisks,
	NodesMaxPods int
	StorageSize,
	NodesCPU,
	NodesMemory string
}

type DeleteALLResult added in v0.2.7

type DeleteALLResult struct {
	HasErrors                     bool
	DeleteNamespaceResult         DeleteALLResultOperation
	DeleteClusterRolesAndBindings DeleteALLResultOperation
}

func (*DeleteALLResult) JSON added in v0.2.7

func (t *DeleteALLResult) JSON() string

type DeleteALLResultOperation added in v0.2.7

type DeleteALLResultOperation struct {
	Result string
}

type Environment added in v0.4.0

type Environment struct {
	ID                      string
	Cluster                 string
	Namespace               string
	NamespaceStatus         string
	NamespaceCreated        string
	NamespaceCreatedDays    int
	NamespaceCreatedBy      string
	NamespaceLastScaled     string
	NamespaceLastScaledDays int
	NamespaceAnnotations    map[string]string
	NamespaceLabels         map[string]string
	NamespaceDescription    string
	Links                   *config.Links
	Hosts                   []string
	HostsInternal           []string
	PodsInfo                *PodsInfo
	NamespaceBadges         []*EnvironmentBadge
	// contains filtered or unexported fields
}

func GetEnvironmentByID added in v0.4.0

func GetEnvironmentByID(ctx context.Context, id string) (*Environment, error)

func GetEnvironments added in v0.4.0

func GetEnvironments(ctx context.Context, filter string) ([]*Environment, error)

GetEnvironments list all kubernetes-manager environments.

func NewEnvironment added in v0.4.0

func NewEnvironment(ctx context.Context, input *StartNewEnvironmentInput) (*Environment, error)

func StartNewEnvironment added in v0.4.0

func StartNewEnvironment(ctx context.Context, input *StartNewEnvironmentInput) (*Environment, error)

func (*Environment) CreateGitlabPipeline added in v0.4.0

func (e *Environment) CreateGitlabPipeline(ctx context.Context, projectID, ref string, op GitlabPipelineOperation) (string, error)

func (*Environment) CreateGitlabPipelinesByServices added in v0.4.0

func (e *Environment) CreateGitlabPipelinesByServices(ctx context.Context, projectProfile, services string, op GitlabPipelineOperation) error

func (*Environment) DeleteALL added in v0.4.0

func (e *Environment) DeleteALL(ctx context.Context) *DeleteALLResult

func (*Environment) DeleteClusterRolesAndBindings added in v0.4.0

func (e *Environment) DeleteClusterRolesAndBindings(ctx context.Context) error

delete all cluster role and bindings linken to namespace.

func (*Environment) DeleteNamespace added in v0.4.0

func (e *Environment) DeleteNamespace(ctx context.Context) error

DeleteNamespace delete kubernetes namespace.

func (*Environment) DeletePod added in v0.4.1

func (e *Environment) DeletePod(ctx context.Context, podName string) error

func (*Environment) DeleteTemporaryTokens added in v0.4.0

func (e *Environment) DeleteTemporaryTokens(ctx context.Context) error

func (*Environment) DisableHPA added in v0.4.0

func (e *Environment) DisableHPA(ctx context.Context) error

func (*Environment) DisableMTLS added in v0.4.0

func (e *Environment) DisableMTLS(ctx context.Context) error

func (*Environment) ExecContainer added in v0.4.0

func (e *Environment) ExecContainer(ctx context.Context, container string, command string) (*ExecContainerResults, error)

exec command in container @container must contains <pod>:<container>.

func (*Environment) GetContainerInfo added in v0.4.1

func (e *Environment) GetContainerInfo(ctx context.Context, container string) (*GetContainerInfoResult, error)

func (*Environment) GetContainers added in v0.4.0

func (e *Environment) GetContainers(ctx context.Context, filter string, containerInLabels string) (*GetContainersItem, error)

returns list of containers containerInLabels is pod label to store returned containers.

func (*Environment) GetEnvironmentName added in v0.4.5

func (e *Environment) GetEnvironmentName() string

func (*Environment) GetEvents added in v0.4.5

func (e *Environment) GetEvents(ctx context.Context) ([]*GetEventsResult, error)

func (*Environment) GetGitlabPipelinesStatus added in v0.4.0

func (e *Environment) GetGitlabPipelinesStatus(ctx context.Context, projectID string) (*GetGitlabPipelinesStatusResults, error)

func (*Environment) GetGitlabProjectsInfo added in v0.4.0

func (e *Environment) GetGitlabProjectsInfo(ctx context.Context, projectID, branch string) (*GetGitlabProjectsInfoItem, error)

func (*Environment) GetHosts added in v0.4.0

func (e *Environment) GetHosts(ctx context.Context) ([]string, []string, error)

func (*Environment) GetKubeconfig added in v0.4.0

func (e *Environment) GetKubeconfig(ctx context.Context) (*GetClusterKubeconfigResult, error)

func (*Environment) GetPodByImage added in v0.4.0

func (e *Environment) GetPodByImage(ctx context.Context, imagePrefix string) (*GetPodByImageResult, error)

func (*Environment) GetPodContainerLog added in v0.4.5

func (e *Environment) GetPodContainerLog(ctx context.Context, input *GetPodContainerLogRequest) (string, error)

func (*Environment) GetPodContainers added in v0.4.5

func (e *Environment) GetPodContainers(ctx context.Context, name string) ([]*PodContainer, error)

func (*Environment) GetPodsInfo added in v0.4.1

func (e *Environment) GetPodsInfo(ctx context.Context) (*PodsInfo, error)

func (*Environment) GetServices added in v0.4.0

func (e *Environment) GetServices(ctx context.Context) ([]*GetServicesItem, error)

Return services and pods with port.

func (*Environment) IsStaled added in v0.4.0

func (e *Environment) IsStaled(diffDays int) (StaledReason, string)

simulate IsStaled if diff > 0.

func (*Environment) IsSystemNamespace added in v0.4.0

func (e *Environment) IsSystemNamespace() bool

func (*Environment) NeedToScaleDown added in v0.4.5

func (e *Environment) NeedToScaleDown(nowDate time.Time, diffHours int) bool

check if namespace will be scale down soon. if diff > 0 - simulate IsScaleDownSoon. return true if need to scale down.

func (*Environment) NewWebhookMessage added in v0.4.5

func (e *Environment) NewWebhookMessage(event types.Event) types.WebhookMessage

func (*Environment) ReloadFromNamespace added in v0.4.5

func (e *Environment) ReloadFromNamespace(ctx context.Context) error

func (*Environment) SaveNamespaceMeta added in v0.4.0

func (e *Environment) SaveNamespaceMeta(ctx context.Context, annotation map[string]string, labels map[string]string) error

func (*Environment) ScaleALL added in v0.4.0

func (e *Environment) ScaleALL(ctx context.Context, replicas int32) error

ScaleALL scale namespace and process webhooks.

func (*Environment) ScaleDownDelay added in v0.4.0

func (e *Environment) ScaleDownDelay(ctx context.Context, durationTime time.Duration) error

func (*Environment) ScaleNamespace added in v0.4.0

func (e *Environment) ScaleNamespace(ctx context.Context, replicas int32) error

ScaleNamespace scale deployments and statefullsets.

type EnvironmentBadge added in v0.4.5

type EnvironmentBadge struct {
	Key         string
	Value       string
	Description string
}

type EnvironmentServices added in v0.4.1

type EnvironmentServices struct {
	ProjectID int
	Ref       string
}

func ParseEnvironmentServices added in v0.4.1

func ParseEnvironmentServices(services string) ([]*EnvironmentServices, error)

func (*EnvironmentServices) GeProjectID added in v0.4.1

func (services *EnvironmentServices) GeProjectID() string

type ExecContainerResults added in v0.2.7

type ExecContainerResults struct {
	Stdout   string
	Stderr   string
	ExecCode string
}

type GetClusterKubeconfigResult added in v0.2.7

type GetClusterKubeconfigResult struct {
	Endpoint    string
	CACrt       string
	CACrtBase64 string
	Token       string
}

func (*GetClusterKubeconfigResult) GetRawFileContent added in v0.4.0

func (r *GetClusterKubeconfigResult) GetRawFileContent(ctx context.Context) ([]byte, error)

type GetCommitsBehindResult added in v0.4.5

type GetCommitsBehindResult struct {
	DefaultBranch  *string
	WebURL         *string
	BranchNotFound bool
	CommitsBehind  *int
}

func GetCommitsBehind added in v0.4.5

func GetCommitsBehind(ctx context.Context, p *gitlab.Project, projectID, branch string) (*GetCommitsBehindResult, error)

type GetContainerInfoResult added in v0.4.1

type GetContainerInfoResult struct {
	PodAnnotations map[string]string
	PodLabels      map[string]string
	ContainerImage string
}

type GetContainersItem added in v0.4.0

type GetContainersItem struct {
	Contaners []string
}

type GetEventsResult added in v0.4.5

type GetEventsResult struct {
	Created,
	CreatedShort,
	Type,
	Reason,
	Object,
	Message string
	// contains filtered or unexported fields
}

type GetFrontConfigItem added in v0.3.1

type GetFrontConfigItem struct {
	ClusterName string
	Links       *config.Links
}

type GetFrontConfigResult added in v0.3.1

type GetFrontConfigResult struct {
	Version        string
	Links          *config.Links
	Clusters       []*GetFrontConfigItem
	DebugTemplates []*config.Template
}

func GetFrontConfig added in v0.3.1

func GetFrontConfig() *GetFrontConfigResult

Get config for front pages.

type GetGitlabPipelinesStatusResults added in v0.3.1

type GetGitlabPipelinesStatusResults struct {
	LastErrorPipeline   string
	LastRunningPipeline string
	LastSuccessPipeline string
}

type GetGitlabProjectBranchItem added in v0.3.1

type GetGitlabProjectBranchItem struct {
	Name string
	Slug string
	// contains filtered or unexported fields
}

func GetGitlabProjectRefs added in v0.4.0

func GetGitlabProjectRefs(ctx context.Context, projectID string) ([]*GetGitlabProjectBranchItem, error)

type GetGitlabProjectsInfoItem added in v0.3.1

type GetGitlabProjectsInfoItem struct {
	PodRunning     *GetPodByImageResult
	Pipelines      *GetGitlabPipelinesStatusResults
	CommitsBehind  *int
	DefaultBranch  *string
	BranchNotFound bool
}

type GetGitlabProjectsItem added in v0.2.7

type GetGitlabProjectsItem struct {
	ProjectID      int
	Name           string
	Description    string
	DefaultBranch  string
	WebURL         string
	TagsList       []string
	AdditionalInfo *GetGitlabProjectsInfoItem // custom field for front end
	Deploy         string                     // custom field for front end
	Required       bool
	SelectedBranch string
}

func GetGitlabProjects added in v0.2.7

func GetGitlabProjects(ctx context.Context, profile string, namespace string) ([]*GetGitlabProjectsItem, error)

get gitlab project by profile or namespace.

type GetPodByImageResult added in v0.3.1

type GetPodByImageResult struct {
	Tag     string
	GitHash string
	Found   bool
}

type GetPodContainerLogRequest added in v0.4.5

type GetPodContainerLogRequest struct {
	Pod        string
	Container  string
	TailLines  *int64
	Timestamps bool
}

func (*GetPodContainerLogRequest) GetTailLines added in v0.4.5

func (l *GetPodContainerLogRequest) GetTailLines() *int64

func (*GetPodContainerLogRequest) SetTimestamps added in v0.4.5

func (l *GetPodContainerLogRequest) SetTimestamps(value string)

type GetRemoteServerItem added in v0.4.3

type GetRemoteServerItem struct {
	Cloud           string
	ID              string
	Name            string
	Status          GetRemoteServerItemStatus
	IPv4            string
	Created         time.Time
	Labels          map[string]string
	FormattedLabels []*GetRemoteServerLabel
	Links           []*config.OtherLink
}

func GetRemoteServers added in v0.4.3

func GetRemoteServers(ctx context.Context) ([]*GetRemoteServerItem, error)

return all remote servers.

func (*GetRemoteServerItem) GetLastPowerOnTime added in v0.4.5

func (i *GetRemoteServerItem) GetLastPowerOnTime() (time.Time, error)

func (*GetRemoteServerItem) IsStaled added in v0.4.5

func (i *GetRemoteServerItem) IsStaled() bool

type GetRemoteServerItemStatus added in v0.4.3

type GetRemoteServerItemStatus string
const (
	GetRemoteServerItemStatusRunning GetRemoteServerItemStatus = "Running"
	GetRemoteServerItemStatusStoped  GetRemoteServerItemStatus = "Stoped"
)

type GetRemoteServerLabel added in v0.4.5

type GetRemoteServerLabel struct {
	Key         string
	Value       string
	Description string
}

func (*GetRemoteServerLabel) ValidKey added in v0.4.5

func (l *GetRemoteServerLabel) ValidKey() bool

type GetServicesItem added in v0.2.7

type GetServicesItem struct {
	Type         GetServicesItemType
	Name         string
	ServiceHost  string
	ExternalName string
	Ports        string
	Labels       string
}

type GetServicesItemType added in v0.4.0

type GetServicesItemType string
const (
	GetServicesItemTypePod     GetServicesItemType = "pod"
	GetServicesItemTypeService GetServicesItemType = "service"
)

type GitlabPipelineOperation added in v0.4.1

type GitlabPipelineOperation string
const (
	GitlabPipelineOperationBuild    GitlabPipelineOperation = "BUILD"
	GitlabPipelineOperationDelete   GitlabPipelineOperation = "DELETE"
	GitlabPipelineOperationDeploy   GitlabPipelineOperation = "DEPLOY"
	GitlabPipelineOperationSnapshot GitlabPipelineOperation = "SNAPSHOT"
)

func (GitlabPipelineOperation) Check added in v0.4.1

func (op GitlabPipelineOperation) Check() error

type PodContainer added in v0.4.5

type PodContainer struct {
	Name string
}

type PodsInfo added in v0.4.1

type PodsInfo struct {
	PodsTotal      int64
	PodsReady      int64
	PodsFailed     int64
	PodsFailedName []string

	CPURequests     string
	MemoryRequests  string
	StorageRequests string
	// contains filtered or unexported fields
}

type SetRemoteServerActionInput added in v0.4.3

type SetRemoteServerActionInput struct {
	Cloud  string
	ID     string
	Action SetRemoteServerStatusAction
}

type SetRemoteServerDelayInput added in v0.4.3

type SetRemoteServerDelayInput struct {
	Cloud    string
	ID       string
	Duration string
}

type SetRemoteServerStatusAction added in v0.4.3

type SetRemoteServerStatusAction string
const (
	SetRemoteServerStatusPowerOn  SetRemoteServerStatusAction = "PowerOn"
	SetRemoteServerStatusPowerOff SetRemoteServerStatusAction = "PowerOff"
)

func (SetRemoteServerStatusAction) Validate added in v0.4.3

func (a SetRemoteServerStatusAction) Validate() error

type StaledReason added in v0.4.0

type StaledReason string
const (
	StaledReasonLastScaleDays StaledReason = "staledByLastScaleDays"
	StaledReasonNone          StaledReason = ""
)

type StartNewEnvironmentInput added in v0.4.0

type StartNewEnvironmentInput struct {
	Profile  string
	Services string
	Cluster  string
	Name     string
}

func (*StartNewEnvironmentInput) GetID added in v0.4.5

func (input *StartNewEnvironmentInput) GetID() (string, error)

func (*StartNewEnvironmentInput) GetNamespace added in v0.4.5

func (input *StartNewEnvironmentInput) GetNamespace() (string, error)

func (*StartNewEnvironmentInput) GetProfile added in v0.4.1

func (input *StartNewEnvironmentInput) GetProfile() *config.ProjectProfile

func (*StartNewEnvironmentInput) GetUser added in v0.4.5

func (input *StartNewEnvironmentInput) GetUser(ctx context.Context) string

func (*StartNewEnvironmentInput) Validation added in v0.4.1

func (input *StartNewEnvironmentInput) Validation(ctx context.Context) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL