client

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteTestProjects

func DeleteTestProjects(projects []*v1alpha1.AppProject, envFilePath string)

func GenerateTestProjects

func GenerateTestProjects(envFilePath string) []*v1alpha1.AppProject

Types

type ArgoCDClient

type ArgoCDClient struct {
	ProjectClient project.ProjectServiceClient
}

func (*ArgoCDClient) CreateProject

func (c *ArgoCDClient) CreateProject(ctx context.Context, name string) (*v1alpha1.AppProject, error)

func (*ArgoCDClient) DeleteProject

func (c *ArgoCDClient) DeleteProject(ctx context.Context, name string) (*project.EmptyResponse, error)

func (*ArgoCDClient) GetProject

func (c *ArgoCDClient) GetProject(ctx context.Context, name string) (*v1alpha1.AppProject, error)

func (*ArgoCDClient) ListProjects

func (c *ArgoCDClient) ListProjects(ctx context.Context) (*v1alpha1.AppProjectList, error)

func (*ArgoCDClient) UpdateProject

func (c *ArgoCDClient) UpdateProject(ctx context.Context, updatedProject v1alpha1.AppProject) (*v1alpha1.AppProject, error)

type ArgoCDClientOptions

type ArgoCDClientOptions struct {
	ServerAddr string
	Insecure   bool
	AuthToken  string
}

type IArgoCDClient

type IArgoCDClient interface {
	CreateProject(context.Context, string) (*v1alpha1.AppProject, error)
	ListProjects(context.Context) (*v1alpha1.AppProjectList, error)
	GetProject(context.Context, string) (*v1alpha1.AppProject, error)
	UpdateProject(ctx context.Context, updatedProject v1alpha1.AppProject) (*v1alpha1.AppProject, error)
	DeleteProject(ctx context.Context, name string) (*project.EmptyResponse, error)
}

func CreateTestClient

func CreateTestClient(envFilePath string) IArgoCDClient

func New

Jump to

Keyboard shortcuts

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