Documentation ¶
Index ¶
- func Argoclifunc[T any](c *Client, fn func(c *clientCache) (T, error)) (T, error)
- func GetTokenFromUserPassword(addr string, username, password string) (string, error)
- func NewArgoCDCli(options *Options) (argocdcli.Client, error)
- type Client
- func (c *Client) CreateArgoApp(ctx context.Context, app *v1alpha1.Application) (*v1alpha1.Application, error)
- func (c *Client) DiffResources(ctx context.Context, q *application.ResourcesQuery) ([]*v1alpha1.ResourceDiff, error)
- func (c *Client) EnsureArgoApp(ctx context.Context, app *v1alpha1.Application) (*v1alpha1.Application, error)
- func (c *Client) EnsureArgoProject(ctx context.Context, in *v1alpha1.AppProject) (*v1alpha1.AppProject, error)
- func (c *Client) EnsureCluster(ctx context.Context, in *v1alpha1.Cluster) (*v1alpha1.Cluster, error)
- func (c *Client) EnsureRepository(ctx context.Context, repo *v1alpha1.Repository) (*v1alpha1.Repository, error)
- func (c *Client) GetArgoApp(ctx context.Context, name string) (*v1alpha1.Application, error)
- func (c *Client) GetResource(ctx context.Context, q ResourceRequest) (string, error)
- func (c *Client) ListArgoApp(ctx context.Context, selector labels.Selector) (*v1alpha1.ApplicationList, error)
- func (c *Client) RemoveArgoApp(ctx context.Context, name string) error
- func (c *Client) RemoveResource(ctx context.Context, q ResourceRequest) error
- func (c *Client) ResourceTree(ctx context.Context, name string) (*v1alpha1.ApplicationTree, error)
- func (c *Client) Sync(ctx context.Context, name string, resources []v1alpha1.SyncOperationResource) error
- func (c *Client) UpdateApp(ctx context.Context, app *v1alpha1.Application) (*v1alpha1.Application, error)
- func (c *Client) WatchArgoApp(ctx context.Context, name string) (application.ApplicationService_WatchClient, error)
- func (c *Client) WatchResourceTree(ctx context.Context, name string) (application.ApplicationService_WatchResourceTreeClient, error)
- type Options
- type ResourceRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Argoclifunc ¶ added in v1.24.0
Types ¶
type Client ¶
type Client struct { Ctx context.Context Options *Options // contains filtered or unexported fields }
func NewLazyClient ¶ added in v1.24.0
func (*Client) CreateArgoApp ¶
func (c *Client) CreateArgoApp(ctx context.Context, app *v1alpha1.Application) (*v1alpha1.Application, error)
func (*Client) DiffResources ¶
func (c *Client) DiffResources(ctx context.Context, q *application.ResourcesQuery) ([]*v1alpha1.ResourceDiff, error)
func (*Client) EnsureArgoApp ¶
func (c *Client) EnsureArgoApp(ctx context.Context, app *v1alpha1.Application) (*v1alpha1.Application, error)
func (*Client) EnsureArgoProject ¶
func (c *Client) EnsureArgoProject(ctx context.Context, in *v1alpha1.AppProject) (*v1alpha1.AppProject, error)
func (*Client) EnsureCluster ¶
func (*Client) EnsureRepository ¶
func (c *Client) EnsureRepository(ctx context.Context, repo *v1alpha1.Repository) (*v1alpha1.Repository, error)
func (*Client) GetArgoApp ¶
func (*Client) GetResource ¶
func (*Client) ListArgoApp ¶
func (*Client) RemoveArgoApp ¶
func (*Client) RemoveResource ¶
func (c *Client) RemoveResource(ctx context.Context, q ResourceRequest) error
func (*Client) ResourceTree ¶
func (*Client) UpdateApp ¶
func (c *Client) UpdateApp(ctx context.Context, app *v1alpha1.Application) (*v1alpha1.Application, error)
func (*Client) WatchArgoApp ¶
func (c *Client) WatchArgoApp(ctx context.Context, name string) (application.ApplicationService_WatchClient, error)
func (*Client) WatchResourceTree ¶
func (c *Client) WatchResourceTree(ctx context.Context, name string) (application.ApplicationService_WatchResourceTreeClient, error)
type Options ¶
type Options struct { Addr string `json:"addr" description:"argocd host"` Token string `json:"token" description:"argocd token,if empty generate from username password"` Username string `json:"username" description:"argocd username"` Password string `json:"password" description:"argocd password"` }
func NewDefaultArgoOptions ¶
func NewDefaultArgoOptions() *Options
type ResourceRequest ¶
type ResourceRequest struct { Name *string `json:"name,omitempty"` // application name Namespace string `json:"namespace,omitempty"` // resource namespace ResourceName string `json:"resourceName,omitempty"` // resource name Version string `json:"version,omitempty"` Group string `json:"group,omitempty"` Kind string `json:"kind,omitempty"` }
Click to show internal directories.
Click to hide internal directories.