client

package
v0.0.0-...-3bfe646 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 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 Client

type Client struct {
	// Client is the wrapped open-source operator HTTP client
	*opsclient.Client
}

Client extends the open-source operator HTTP client

func New

func New(ossClient *opsclient.Client) *Client

New creates a new enterprise ops client wrapping provided open-source client

func NewAuthenticatedClient

func NewAuthenticatedClient(addr, username, password string, params ...opsclient.ClientParam) (*Client, error)

NewAuthenticatedClient returns enterprise ops client using provided username and password for authentication

func NewBearerClient

func NewBearerClient(addr, password string, params ...opsclient.ClientParam) (*Client, error)

NewBearerClient returns enterprise ops client using provided bearer token for authentication

func (*Client) AcceptRemoteCluster

AcceptRemoteCluster defines the handshake between a remote cluster and this Ops Center

func (*Client) CheckForUpdate

func (c *Client) CheckForUpdate(key ossops.SiteKey) (*loc.Locator, error)

CheckForUpdate checks with remote OpsCenter if there is a newer version of the installed application

func (*Client) CheckSiteLicense

func (c *Client) CheckSiteLicense(ctx context.Context, key ossops.SiteKey) error

CheckSiteLicense checks the license installed on site

func (*Client) DeleteOIDCConnector

func (c *Client) DeleteOIDCConnector(ctx context.Context, key ossops.SiteKey, name string) error

DeleteOIDCConnector deletes an OIDC connector by name

func (*Client) DeleteRole

func (c *Client) DeleteRole(ctx context.Context, key ossops.SiteKey, name string) error

DeleteRole deletes a role by name

func (*Client) DeleteSAMLConnector

func (c *Client) DeleteSAMLConnector(ctx context.Context, key ossops.SiteKey, name string) error

DeleteSAMLConnector deletes a SAML connector by name

func (*Client) DeleteTrustedCluster

func (c *Client) DeleteTrustedCluster(ctx context.Context, req ops.DeleteTrustedClusterRequest) error

DeleteTrustedCluster deletes a trusted cluster by name

func (*Client) DisablePeriodicUpdates

func (c *Client) DisablePeriodicUpdates(ctx context.Context, key ossops.SiteKey) error

DisablePeriodicUpdates turns periodic updates for the cluster off and stops the update fetch loop if it's running

func (*Client) DownloadUpdate

func (c *Client) DownloadUpdate(ctx context.Context, req ops.DownloadUpdateRequest) error

DownloadUpdate downloads the provided application version from remote Ops Center

func (*Client) EnablePeriodicUpdates

func (c *Client) EnablePeriodicUpdates(ctx context.Context, req ops.EnablePeriodicUpdatesRequest) error

EnablePeriodicUpdates turns periodic updates for the cluster on or updates the interval

func (*Client) GetClusterEndpoints

func (c *Client) GetClusterEndpoints(key ossops.SiteKey) (storage.Endpoints, error)

GetClusterEndpoints returns the cluster management endpoints such as control panel advertise address and agents advertise address

func (*Client) GetLicenseCA

func (c *Client) GetLicenseCA() ([]byte, error)

GetLicenseCA returns CA certificate Ops Center uses to sign licenses

func (*Client) GetOIDCConnector

func (c *Client) GetOIDCConnector(key ossops.SiteKey, name string, withSecrets bool) (teleservices.OIDCConnector, error)

GetOIDCConnector returns an OIDC connector by name

Returned connector exclude client secret unless withSecrets is true.

func (*Client) GetOIDCConnectors

func (c *Client) GetOIDCConnectors(key ossops.SiteKey, withSecrets bool) ([]teleservices.OIDCConnector, error)

GetOIDCConnectors returns all OIDC connectors

Returned connectors exclude client secret unless withSecrets is true.

func (*Client) GetRole

func (c *Client) GetRole(key ossops.SiteKey, name string) (teleservices.Role, error)

GetRole returns a role by name

func (*Client) GetRoles

func (c *Client) GetRoles(key ossops.SiteKey) ([]teleservices.Role, error)

GetRoles returns all cluster roles

func (*Client) GetSAMLConnector

func (c *Client) GetSAMLConnector(key ossops.SiteKey, name string, withSecrets bool) (teleservices.SAMLConnector, error)

GetSAMLConnector returns a SAML connector by name

Returned connector excludes private signing key unless withSecrets is true.

func (*Client) GetSAMLConnectors

func (c *Client) GetSAMLConnectors(key ossops.SiteKey, withSecrets bool) ([]teleservices.SAMLConnector, error)

GetSAMLConnectors returns all SAML connectors

Returned connectors exclude private signing keys unless withSecrets is true.

func (*Client) GetTrustedCluster

func (c *Client) GetTrustedCluster(key ossops.SiteKey, name string) (storage.TrustedCluster, error)

GetTrustedCluster returns trusted cluster with specified name

func (*Client) GetTrustedClusters

func (c *Client) GetTrustedClusters(key ossops.SiteKey) ([]storage.TrustedCluster, error)

GetTrustedClusters returns a list of configured trusted clusters

func (*Client) NewLicense

func (c *Client) NewLicense(ctx context.Context, req ops.NewLicenseRequest) (string, error)

NewLicense generates a new license signed with this Ops Center CA

func (*Client) PeriodicUpdatesStatus

func (c *Client) PeriodicUpdatesStatus(key ossops.SiteKey) (*ops.PeriodicUpdatesStatusResponse, error)

PeriodicUpdatesStatus returns the status of periodic updates for the cluster

func (*Client) RegisterAgent

func (c *Client) RegisterAgent(req ops.RegisterAgentRequest) (*ops.RegisterAgentResponse, error)

RegisterAgent registers an install agent

func (*Client) RemoveRemoteCluster

func (c *Client) RemoveRemoteCluster(req ops.RemoveRemoteClusterRequest) error

RemoveRemoteCluster removes the cluster entry specified in the request

func (*Client) RequestClusterCopy

func (c *Client) RequestClusterCopy(req ops.ClusterCopyRequest) error

RequestClusterCopy replicates the cluster specified in the provided request and its data from the remote Ops Center

func (*Client) StartPeriodicUpdates

func (c *Client) StartPeriodicUpdates(key ossops.SiteKey) error

StartPeriodicUpdates starts periodic updates check

func (*Client) StopPeriodicUpdates

func (c *Client) StopPeriodicUpdates(key ossops.SiteKey) error

StopPeriodicUpdates stops periodic updates check without disabling it

func (*Client) UpdateClusterEndpoints

func (c *Client) UpdateClusterEndpoints(ctx context.Context, key ossops.SiteKey, endpoints storage.Endpoints) error

UpdateClusterEndpoints updates the cluster management endpoints

func (*Client) UpdateLicense

func (c *Client) UpdateLicense(ctx context.Context, req ops.UpdateLicenseRequest) error

UpdateLicense updates license installed on site and runs a respective app hook

func (*Client) UpsertOIDCConnector

func (c *Client) UpsertOIDCConnector(ctx context.Context, key ossops.SiteKey, connector teleservices.OIDCConnector) error

UpsertOIDCConnector creates or updates an OIDC connector

func (*Client) UpsertRole

func (c *Client) UpsertRole(ctx context.Context, key ossops.SiteKey, role teleservices.Role) error

UpsertRole creates a new role or updates an existing one

func (*Client) UpsertSAMLConnector

func (c *Client) UpsertSAMLConnector(ctx context.Context, key ossops.SiteKey, connector teleservices.SAMLConnector) error

UpsertSAMLConnector creates or updates a SAML connector

func (*Client) UpsertTrustedCluster

func (c *Client) UpsertTrustedCluster(ctx context.Context, key ossops.SiteKey, cluster storage.TrustedCluster) error

UpsertTrustedCluster creates or updates a trusted cluster

Jump to

Keyboard shortcuts

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