ArgoUtil

package
v0.6.18-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationService

type ApplicationService interface {
	GetAll(ctx context.Context) (*v1alpha1.ApplicationList, error)
	CreateApplication(appRequest *v1alpha1.Application, ctx context.Context) (appResponse *v1alpha1.Application, err error)
	Delete(appName string, ctx context.Context) error
}

type ApplicationServiceImpl

type ApplicationServiceImpl struct {
	*ArgoSession
	// contains filtered or unexported fields
}

func NewApplicationServiceImpl

func NewApplicationServiceImpl(session *ArgoSession) *ApplicationServiceImpl

func (*ApplicationServiceImpl) CreateApplication

func (impl *ApplicationServiceImpl) CreateApplication(appRequest *v1alpha1.Application, ctx context.Context) (appResponse *v1alpha1.Application, err error)

func (*ApplicationServiceImpl) Delete

func (impl *ApplicationServiceImpl) Delete(appName string, ctx context.Context) error

func (*ApplicationServiceImpl) GetAll

type ArgoConfig

type ArgoConfig struct {
	Url                string `env:"ACD_URL" envDefault:""`
	UserName           string `env:"ACD_USER" `
	Password           string `env:"ACD_PASSWORD" `
	Timeout            int    `env:"ACD_TIMEOUT" envDefault:"0"`        // in seconds
	InsecureSkipVerify bool   `env:"ACD_SKIP_VERIFY" envDefault:"true"` //ignore ssl verification
}

func GetArgoConfig

func GetArgoConfig() (*ArgoConfig, error)

type ArgoSession

type ArgoSession struct {
	// contains filtered or unexported fields
}

func GetTestClient

func GetTestClient() (session *ArgoSession, err error)

func NewArgoSession

func NewArgoSession(config *ArgoConfig, logger *zap.SugaredLogger) (session *ArgoSession, err error)

func (*ArgoSession) DoRequest

func (session *ArgoSession) DoRequest(clientRequest *ClientRequest) (resBody []byte, resCode *StatusCode, err error)

type ClientRequest

type ClientRequest struct {
	Method       string
	Path         string
	RequestBody  interface{}
	ResponseBody interface{}
}

type ClusterService

type ClusterService interface {
	GetClusterByServer(server string) (*v1alpha1.Cluster, error)
	ClusterList() (*v1alpha1.ClusterList, error)
	CreateCluster(cluster v1alpha1.Cluster) (*v1alpha1.Cluster, error)
	UpdateCluster(cluster v1alpha1.Cluster) (*v1alpha1.Cluster, error)
	DeleteCluster(server string) (string, error)
}

type ClusterServiceImpl

type ClusterServiceImpl struct {
	*ArgoSession
	// contains filtered or unexported fields
}

func NewClusterServiceImpl

func NewClusterServiceImpl(session *ArgoSession) *ClusterServiceImpl

func (*ClusterServiceImpl) ClusterList

func (impl *ClusterServiceImpl) ClusterList() (*v1alpha1.ClusterList, error)

func (*ClusterServiceImpl) CreateCluster

func (impl *ClusterServiceImpl) CreateCluster(cluster v1alpha1.Cluster) (*v1alpha1.Cluster, error)

func (*ClusterServiceImpl) DeleteCluster

func (impl *ClusterServiceImpl) DeleteCluster(server string) (string, error)

func (*ClusterServiceImpl) GetClusterByServer

func (impl *ClusterServiceImpl) GetClusterByServer(server string) (*v1alpha1.Cluster, error)

func (*ClusterServiceImpl) UpdateCluster

func (impl *ClusterServiceImpl) UpdateCluster(cluster v1alpha1.Cluster) (*v1alpha1.Cluster, error)

type CubeConfigCreate

type CubeConfigCreate struct {
	Context    string `json:"context"`
	InCluster  bool   `json:"inCluster"`
	Kubeconfig string `json:"kubeconfig"`
	Upsert     bool   `json:"upsert"`
}

type Items

type Items struct {
	Items []Resource `json:"items"`
}

type PodContainerLogReq

type PodContainerLogReq struct {
	Namespace    string `json:"namespace,omitempty"`
	Container    string `json:"container,omitempty"`
	SinceSeconds string `json:"sinceSeconds,omitempty"`
	TailLines    string `json:"tailLines,omitempty"`
	Follow       bool   `json:"follow,omitempty"`
}

type RepositoryService

type RepositoryService interface {
	Create(repositoryRequest *v1alpha1.Repository) (repository *v1alpha1.Repository, err error)
}

type RepositoryServiceImpl

type RepositoryServiceImpl struct {
	*ArgoSession
	// contains filtered or unexported fields
}

func NewRepositoryService

func NewRepositoryService(session *ArgoSession) *RepositoryServiceImpl

func (RepositoryServiceImpl) Create

func (impl RepositoryServiceImpl) Create(repositoryRequest *v1alpha1.Repository) (repository *v1alpha1.Repository, err error)

type Resource

type Resource struct {
	v1alpha1.ResourceNode `json:",inline" protobuf:"bytes,1,opt,name=resourceNode"`
}

type ResourceService

type ResourceService interface {
	FetchResourceTree(appName string) (*Items, error)
	FetchPodContainerLogs(appName string, podName string, req PodContainerLogReq) (*Items, error)
}

type ResourceServiceImpl

type ResourceServiceImpl struct {
	*ArgoSession
	// contains filtered or unexported fields
}

func NewResourceServiceImpl

func NewResourceServiceImpl(session *ArgoSession) *ResourceServiceImpl

func (*ResourceServiceImpl) FetchPodContainerLogs

func (impl *ResourceServiceImpl) FetchPodContainerLogs(appName string, podName string, req PodContainerLogReq) (*Items, error)

func (*ResourceServiceImpl) FetchResourceTree

func (impl *ResourceServiceImpl) FetchResourceTree(appName string) (*Items, error)

type StatusCode

type StatusCode int

func (StatusCode) IsSuccess

func (code StatusCode) IsSuccess() bool

Jump to

Keyboard shortcuts

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