opsclient

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: 23 Imported by: 8

Documentation

Index

Constants

View Source
const CurrentVersion = "portal/v1"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	roundtrip.Client
	// contains filtered or unexported fields
}

func NewAuthenticatedClient

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

NewAuthenticatedClient returns client authenticated as username with the given password

func NewBearerClient

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

NewBearerClient returns client authenticated with the given password

func NewClient

func NewClient(addr string, params ...ClientParam) (*Client, error)

NewClient returns a new Client for the specified target address addr

func (*Client) ActivateSite

func (c *Client) ActivateSite(req ops.ActivateSiteRequest) error

ActivateSite moves site to the active state and, if requested, starts an application.

func (*Client) CheckSiteStatus

func (c *Client) CheckSiteStatus(ctx context.Context, key ops.SiteKey) error

CheckSiteStatus runs app status hook and updates site status appropriately.

func (*Client) CompleteFinalInstallStep

func (c *Client) CompleteFinalInstallStep(req ops.CompleteFinalInstallStepRequest) error

CompleteFinalInstallStep marks the site as having completed the mandatory last installation step

func (*Client) ConfigureNode

func (c *Client) ConfigureNode(req ops.ConfigureNodeRequest) error

ConfigureNode prepares the node for the upgrade

func (*Client) ConfigurePackages

func (c *Client) ConfigurePackages(req ops.ConfigurePackagesRequest) error

ConfigurePackages packages configures packages for the specified install operation

func (*Client) CreateAPIKey

func (c *Client) CreateAPIKey(ctx context.Context, req ops.NewAPIKeyRequest) (*storage.APIKey, error)

func (*Client) CreateAccount

func (c *Client) CreateAccount(req ops.NewAccountRequest) (*ops.Account, error)

func (*Client) CreateClusterGarbageCollectOperation

func (c *Client) CreateClusterGarbageCollectOperation(ctx context.Context, req ops.CreateClusterGarbageCollectOperationRequest) (*ops.SiteOperationKey, error)

CreateClusterGarbageCollectOperation creates a new garbage collection operation in the cluster

func (*Client) CreateClusterReconfigureOperation

func (c *Client) CreateClusterReconfigureOperation(ctx context.Context, req ops.CreateClusterReconfigureOperationRequest) (*ops.SiteOperationKey, error)

CreateClusterReconfigureOperation creates a new cluster reconfiguration operation.

func (*Client) CreateInstallToken

func (c *Client) CreateInstallToken(req ops.NewInstallTokenRequest) (*storage.InstallToken, error)

func (*Client) CreateLogEntry

func (c *Client) CreateLogEntry(key ops.SiteOperationKey, entry ops.LogEntry) error

func (*Client) CreateLogForwarder

func (c *Client) CreateLogForwarder(ctx context.Context, key ops.SiteKey, forwarder storage.LogForwarder) error

CreateLogForwarder creates a new log forwarder

func (*Client) CreateOperationPlan

func (c *Client) CreateOperationPlan(key ops.SiteOperationKey, plan storage.OperationPlan) error

CreateOperationPlan saves the provided operation plan

func (*Client) CreateOperationPlanChange

func (c *Client) CreateOperationPlanChange(key ops.SiteOperationKey, change storage.PlanChange) error

CreateOperationPlanChange creates a new changelog entry for a plan

func (*Client) CreatePackage

func (c *Client) CreatePackage(loc loc.Locator, data io.Reader) (*pack.PackageEnvelope, error)

func (*Client) CreateProgressEntry

func (c *Client) CreateProgressEntry(key ops.SiteOperationKey, entry ops.ProgressEntry) error

func (*Client) CreateProvisioningToken

func (c *Client) CreateProvisioningToken(token storage.ProvisioningToken) error

func (*Client) CreateSite

func (c *Client) CreateSite(req ops.NewSiteRequest) (*ops.Site, error)

func (*Client) CreateSiteAppUpdateOperation

func (c *Client) CreateSiteAppUpdateOperation(ctx context.Context, req ops.CreateSiteAppUpdateOperationRequest) (*ops.SiteOperationKey, error)

func (*Client) CreateSiteExpandOperation

func (c *Client) CreateSiteExpandOperation(ctx context.Context, req ops.CreateSiteExpandOperationRequest) (*ops.SiteOperationKey, error)

func (*Client) CreateSiteInstallOperation

func (c *Client) CreateSiteInstallOperation(ctx context.Context, req ops.CreateSiteInstallOperationRequest) (*ops.SiteOperationKey, error)

func (*Client) CreateSiteShrinkOperation

func (c *Client) CreateSiteShrinkOperation(ctx context.Context, req ops.CreateSiteShrinkOperationRequest) (*ops.SiteOperationKey, error)

func (*Client) CreateSiteUninstallOperation

func (c *Client) CreateSiteUninstallOperation(ctx context.Context, req ops.CreateSiteUninstallOperationRequest) (*ops.SiteOperationKey, error)

func (*Client) CreateUpdateConfigOperation

func (c *Client) CreateUpdateConfigOperation(ctx context.Context, req ops.CreateUpdateConfigOperationRequest) (*ops.SiteOperationKey, error)

CreateUpdateConfigOperation creates a new operation to update cluster configuration

func (*Client) CreateUpdateEnvarsOperation

func (c *Client) CreateUpdateEnvarsOperation(ctx context.Context, req ops.CreateUpdateEnvarsOperationRequest) (*ops.SiteOperationKey, error)

CreateUpdateEnvarsOperation creates a new operation to update cluster runtime environment variables

func (*Client) CreateUser

func (c *Client) CreateUser(req ops.NewUserRequest) error

func (*Client) CreateUserInvite

func (c *Client) CreateUserInvite(ctx context.Context, req ops.CreateUserInviteRequest) (*storage.UserToken, error)

CreateUserInvite creates a new invite token for a user.

func (*Client) CreateUserReset

func (c *Client) CreateUserReset(ctx context.Context, req ops.CreateUserResetRequest) (*storage.UserToken, error)

CreateUserReset creates a new reset token for a user.

func (*Client) DeactivateSite

func (c *Client) DeactivateSite(req ops.DeactivateSiteRequest) error

DeactivateSite puts the site in the degraded state and, if requested, stops an application.

func (*Client) Delete

func (c *Client) Delete(endpoint string) (*roundtrip.Response, error)

Delete issues HTTP DELETE request to the server

func (*Client) DeleteAPIKey

func (c *Client) DeleteAPIKey(ctx context.Context, userEmail, token string) error

func (*Client) DeleteAlert

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

DeleteAlert deletes a cluster monitoring alert specified with name

func (*Client) DeleteAlertTarget

func (c *Client) DeleteAlertTarget(ctx context.Context, key ops.SiteKey) error

DeleteAlertTarget deletes the cluster monitoring alert target

func (*Client) DeleteClusterCertificate

func (c *Client) DeleteClusterCertificate(ctx context.Context, key ops.SiteKey) error

DeleteClusterCertificate deletes the cluster certificate

func (*Client) DeleteGithubConnector

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

DeleteGithubConnector deletes a Github connector by name

func (*Client) DeleteLocalUser

func (c *Client) DeleteLocalUser(name string) error

func (*Client) DeleteLogForwarder

func (c *Client) DeleteLogForwarder(ctx context.Context, key ops.SiteKey, forwarderName string) error

DeleteLogForwarder deletes a log forwarder

func (*Client) DeletePackage

func (c *Client) DeletePackage(locator loc.Locator) error

func (*Client) DeleteRepository

func (c *Client) DeleteRepository(repository string) error

func (*Client) DeleteSMTPConfig

func (c *Client) DeleteSMTPConfig(ctx context.Context, key ops.SiteKey) error

DeleteSMTPConfig deletes the cluster SMTP configuration

func (*Client) DeleteSite

func (c *Client) DeleteSite(siteKey ops.SiteKey) error

func (*Client) DeleteSiteOperation

func (c *Client) DeleteSiteOperation(key ops.SiteOperationKey) error

func (*Client) DeleteUser

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

DeleteUser deletes user by name

func (*Client) DeleteUserInvite

func (c *Client) DeleteUserInvite(ctx context.Context, req ops.DeleteUserInviteRequest) error

DeleteUserInvite deletes the specified user invite.

func (*Client) DeleteWithParams

func (c *Client) DeleteWithParams(endpoint string, params url.Values) (*roundtrip.Response, error)

DeleteWithParams issues HTTP DELETE request to the server

func (*Client) EmitAuditEvent

func (c *Client) EmitAuditEvent(ctx context.Context, req ops.AuditEventRequest) error

EmitAuditEvent saves the provided event in the audit log.

func (*Client) Get

func (c *Client) Get(ctx context.Context, endpoint string, params url.Values) (*roundtrip.Response, error)

Get issues HTTP GET request to the server

func (*Client) GetAPIKeys

func (c *Client) GetAPIKeys(userEmail string) ([]storage.APIKey, error)

func (*Client) GetAccount

func (c *Client) GetAccount(accountID string) (*ops.Account, error)

func (*Client) GetAccounts

func (c *Client) GetAccounts() ([]ops.Account, error)

func (*Client) GetAlertTargets

func (c *Client) GetAlertTargets(key ops.SiteKey) ([]storage.AlertTarget, error)

GetAlertTargets returns a list of monitoring alert targets for the cluster

func (*Client) GetAlerts

func (c *Client) GetAlerts(key ops.SiteKey) ([]storage.Alert, error)

GetAlerts returns a list of monitoring alerts for the cluster

func (*Client) GetAppInstaller

func (c *Client) GetAppInstaller(req ops.AppInstallerRequest) (io.ReadCloser, error)

func (*Client) GetApplicationEndpoints

func (c *Client) GetApplicationEndpoints(key ops.SiteKey) ([]ops.Endpoint, error)

func (*Client) GetAuthGateway

func (c *Client) GetAuthGateway(key ops.SiteKey) (storage.AuthGateway, error)

GetAuthGateway returns auth gateway configuration.

func (*Client) GetClusterAgent

func (c *Client) GetClusterAgent(req ops.ClusterAgentRequest) (*storage.LoginEntry, error)

func (*Client) GetClusterAuthPreference

func (c *Client) GetClusterAuthPreference(key ops.SiteKey) (teleservices.AuthPreference, error)

GetClusterAuthPreference returns cluster auth preference

func (*Client) GetClusterCertificate

func (c *Client) GetClusterCertificate(key ops.SiteKey, withSecrets bool) (*ops.ClusterCertificate, error)

GetClusterCertificate returns the cluster certificate

func (*Client) GetClusterConfiguration

func (c *Client) GetClusterConfiguration(key ops.SiteKey) (clusterconfig.Interface, error)

GetClusterConfiguration retrieves the cluster configuration

func (*Client) GetClusterEnvironmentVariables

func (c *Client) GetClusterEnvironmentVariables(key ops.SiteKey) (storage.EnvironmentVariables, error)

GetClusterEnvironmentVariables retrieves the cluster runtime environment variables

func (*Client) GetClusterMetrics

func (c *Client) GetClusterMetrics(ctx context.Context, req ops.ClusterMetricsRequest) (*ops.ClusterMetricsResponse, error)

GetClusterMetrics returns basic CPU/RAM metrics for the specified cluster.

func (*Client) GetClusterNodes

func (c *Client) GetClusterNodes(key ops.SiteKey) ([]ops.Node, error)

GetClusterNodes returns a real-time information about cluster nodes

func (*Client) GetCurrentUser

func (c *Client) GetCurrentUser() (storage.User, error)

GetCurrentUser returns user that is currently logged in

func (*Client) GetCurrentUserInfo

func (c *Client) GetCurrentUserInfo() (*ops.UserInfo, error)

GetCurrentUserInfo returns user that is currently logged in

func (*Client) GetExpandToken

func (c *Client) GetExpandToken(key ops.SiteKey) (*storage.ProvisioningToken, error)

func (*Client) GetFile

func (c *Client) GetFile(ctx context.Context, endpoint string, params url.Values) (*roundtrip.FileResponse, error)

GetFile issues HTTP GET request to the server to download a file

func (*Client) GetGithubConnector

func (c *Client) GetGithubConnector(key ops.SiteKey, name string, withSecrets bool) (teleservices.GithubConnector, error)

GetGithubConnector returns a Github connector by name

Returned connector exclude client secret unless withSecrets is true.

func (*Client) GetGithubConnectors

func (c *Client) GetGithubConnectors(key ops.SiteKey, withSecrets bool) ([]teleservices.GithubConnector, error)

GetGithubConnectors returns all Github connectors

Returned connectors exclude client secret unless withSecrets is true.

func (*Client) GetLocalSite

func (c *Client) GetLocalSite(ctx context.Context) (*ops.Site, error)

func (*Client) GetLocalUser

func (c *Client) GetLocalUser(key ops.SiteKey) (storage.User, error)

func (*Client) GetLogForwarders

func (c *Client) GetLogForwarders(key ops.SiteKey) ([]storage.LogForwarder, error)

GetLogForwarders returns a list of configured log forwarders

func (*Client) GetOperationPlan

func (c *Client) GetOperationPlan(key ops.SiteOperationKey) (*storage.OperationPlan, error)

GetOperationPlan returns plan for the specified operation

func (*Client) GetPackages

func (c *Client) GetPackages(repository string, prev *pack.PackageEnvelope, limit int) ([]pack.PackageEnvelope, error)

func (*Client) GetPersistentStorage

func (c *Client) GetPersistentStorage(ctx context.Context, key ops.SiteKey) (storage.PersistentStorage, error)

GetPersistentStorage retrieves cluster persistent storage configuration.

func (*Client) GetRepositories

func (c *Client) GetRepositories(prev string, limit int) ([]string, error)

func (*Client) GetSMTPConfig

func (c *Client) GetSMTPConfig(key ops.SiteKey) (storage.SMTPConfig, error)

GetSMTPConfig returns the cluster SMTP configuration

func (*Client) GetSite

func (c *Client) GetSite(siteKey ops.SiteKey) (*ops.Site, error)

func (*Client) GetSiteByDomain

func (c *Client) GetSiteByDomain(domainName string) (*ops.Site, error)

func (*Client) GetSiteExpandOperationAgentReport

func (c *Client) GetSiteExpandOperationAgentReport(ctx context.Context, key ops.SiteOperationKey) (*ops.AgentReport, error)

func (*Client) GetSiteInstallOperationAgentReport

func (c *Client) GetSiteInstallOperationAgentReport(ctx context.Context, key ops.SiteOperationKey) (*ops.AgentReport, error)

func (*Client) GetSiteInstructions

func (c *Client) GetSiteInstructions(tokenID string, serverProfile string, params url.Values) (string, error)

GetSiteInstructions returns shell script with instructions to execute for particular install agent params are url query parameters that are optional and can optionally specify selected interface

func (*Client) GetSiteOperation

func (c *Client) GetSiteOperation(key ops.SiteOperationKey) (*ops.SiteOperation, error)

func (*Client) GetSiteOperationCrashReport

func (c *Client) GetSiteOperationCrashReport(key ops.SiteOperationKey) (io.ReadCloser, error)

func (*Client) GetSiteOperationLogs

func (c *Client) GetSiteOperationLogs(key ops.SiteOperationKey) (io.ReadCloser, error)

func (*Client) GetSiteOperationProgress

func (c *Client) GetSiteOperationProgress(key ops.SiteOperationKey) (*ops.ProgressEntry, error)

func (*Client) GetSiteOperations

func (c *Client) GetSiteOperations(siteKey ops.SiteKey, f ops.OperationsFilter) (ops.SiteOperations, error)

GetSiteOperations returns site operations filtered by the provided filter.

func (*Client) GetSiteReport

func (c *Client) GetSiteReport(ctx context.Context, req ops.GetClusterReportRequest) (io.ReadCloser, error)

func (*Client) GetSites

func (c *Client) GetSites(accountID string) ([]ops.Site, error)

func (*Client) GetTrustedClusterToken

func (c *Client) GetTrustedClusterToken(key ops.SiteKey) (storage.Token, error)

GetTrustedClusterToken returns the token for the specified trusted cluster TODO(r0mant) Move to enterprise.

func (*Client) GetUser

func (c *Client) GetUser(key ops.SiteKey, name string) (teleservices.User, error)

GetUser returns user by name

func (*Client) GetUserInvites

func (c *Client) GetUserInvites(ctx context.Context, key ops.SiteKey) ([]storage.UserInvite, error)

GetUserInvites returns all active user invites.

func (*Client) GetUsers

func (c *Client) GetUsers(key ops.SiteKey) ([]teleservices.User, error)

GetUsers returns all cluster users

func (*Client) GetVersion

func (c *Client) GetVersion(ctx context.Context) (*proto.Version, error)

GetVersion returns the server version information.

func (*Client) GetWithContext

func (c *Client) GetWithContext(ctx context.Context, endpoint string, params url.Values) (*roundtrip.Response, error)

GetWithContext issues HTTP GET request to the server bound to the specified context

func (*Client) ListReleases

func (c *Client) ListReleases(req ops.ListReleasesRequest) ([]storage.Release, error)

ListReleases returns all currently installed application releases in a cluster.

func (*Client) LocalClusterKey

func (c *Client) LocalClusterKey(ctx context.Context) (ops.SiteKey, error)

LocalClusterKey retrieves the SiteKey for the local cluster

func (*Client) Ping

func (c *Client) Ping(ctx context.Context) error

Ping calls the operator service status endpoint.

func (*Client) PostJSON

func (c *Client) PostJSON(endpoint string, data interface{}) (*roundtrip.Response, error)

PostJSON issues HTTP POST request to the server with the provided JSON data

func (*Client) PostJSONWithContext

func (c *Client) PostJSONWithContext(ctx context.Context, endpoint string, data interface{}) (*roundtrip.Response, error)

PostJSONWithContext issues HTTP POST request to the server with the provided JSON data bounded by the specified context

func (*Client) PostStream

func (c *Client) PostStream(endpoint string, reader io.Reader) (*roundtrip.Response, error)

PostStream makes a POST request to the server using data from the provided reader as request body

func (*Client) PutJSON

func (c *Client) PutJSON(endpoint string, data interface{}) (*roundtrip.Response, error)

PutJSON issues HTTP PUT request to the server with the provided JSON data

func (*Client) PutJSONWithContext

func (c *Client) PutJSONWithContext(ctx context.Context, endpoint string, data interface{}) (*roundtrip.Response, error)

PutJSONWithContext issues HTTP PUT request bound to the given context to the server with the provided JSON data

func (*Client) ReadPackage

func (c *Client) ReadPackage(loc loc.Locator) (*pack.PackageEnvelope, io.ReadCloser, error)

func (*Client) ReadPackageEnvelope

func (c *Client) ReadPackageEnvelope(loc loc.Locator) (*pack.PackageEnvelope, error)

func (*Client) ResetUserPassword

func (c *Client) ResetUserPassword(req ops.ResetUserPasswordRequest) (string, error)

func (*Client) ResumeShrink

func (c *Client) ResumeShrink(key ops.SiteKey) (*ops.SiteOperationKey, error)

func (*Client) RotatePlanetConfig

func (c *Client) RotatePlanetConfig(req ops.RotatePlanetConfigRequest) (*ops.RotatePackageResponse, error)

RotatePlanetConfig rotates planet configuration package for the server specified in the request

func (*Client) RotateSecrets

func (c *Client) RotateSecrets(req ops.RotateSecretsRequest) (*ops.RotatePackageResponse, error)

RotateSecrets rotates secrets package for the server specified in the request

func (*Client) RotateTeleportConfig

RotateTeleportConfig rotates teleport configuration package for the server specified in the request

func (*Client) SetOperationState

func (c *Client) SetOperationState(ctx context.Context, key ops.SiteOperationKey, req ops.SetOperationStateRequest) error

SetOperationState moves operation into specified state

func (*Client) SignSSHKey

func (c *Client) SignSSHKey(req ops.SSHSignRequest) (*ops.SSHSignResponse, error)

SignSSHKey signs SSH Public Key with SSH user certificate authority of this site

func (*Client) SignTLSKey

func (c *Client) SignTLSKey(req ops.TLSSignRequest) (*ops.TLSSignResponse, error)

SignTLSKey signs X509 Public Key with X509 certificate authority of this site

func (*Client) SiteExpandOperationStart

func (c *Client) SiteExpandOperationStart(key ops.SiteOperationKey) error

func (*Client) SiteInstallOperationStart

func (c *Client) SiteInstallOperationStart(req ops.SiteOperationKey) error

func (*Client) SiteUninstallOperationStart

func (c *Client) SiteUninstallOperationStart(req ops.SiteOperationKey) error

func (*Client) StepDown

func (c *Client) StepDown(key ops.SiteKey) error

StepDown asks the process to pause its leader election heartbeat so it can give up its leadership

func (*Client) StreamOperationLogs

func (c *Client) StreamOperationLogs(key ops.SiteOperationKey, reader io.Reader) error

StreamOperationLogs appends the logs from the provided reader to the specified operation (user-facing) log file

func (*Client) UpdateAlert

func (c *Client) UpdateAlert(ctx context.Context, key ops.SiteKey, alert storage.Alert) error

UpdateAlert updates the specified monitoring alert

func (*Client) UpdateAlertTarget

func (c *Client) UpdateAlertTarget(ctx context.Context, key ops.SiteKey, target storage.AlertTarget) error

UpdateAlertTarget updates the monitoring alert target

func (*Client) UpdateClusterCertificate

func (c *Client) UpdateClusterCertificate(ctx context.Context, req ops.UpdateCertificateRequest) (*ops.ClusterCertificate, error)

UpdateClusterCertificate updates the cluster certificate

func (*Client) UpdateClusterConfiguration

func (c *Client) UpdateClusterConfiguration(req ops.UpdateClusterConfigRequest) error

UpdateClusterConfiguration updates the cluster configuration from the specified request

func (*Client) UpdateClusterEnvironmentVariables

func (c *Client) UpdateClusterEnvironmentVariables(req ops.UpdateClusterEnvironRequest) error

UpdateClusterEnvironmentVariables updates the cluster runtime environment variables from the specified request

func (*Client) UpdateExpandOperationState

func (c *Client) UpdateExpandOperationState(key ops.SiteOperationKey, req ops.OperationUpdateRequest) error

UpdateExpandOperationState updates the state of an expand operation

func (*Client) UpdateInstallOperationState

func (c *Client) UpdateInstallOperationState(key ops.SiteOperationKey, req ops.OperationUpdateRequest) error

UpdateInstallOperationState updates the state of an install operation

func (*Client) UpdateLogForwarder

func (c *Client) UpdateLogForwarder(ctx context.Context, key ops.SiteKey, forwarder storage.LogForwarder) error

UpdateLogForwarder updates an existing log forwarder

func (*Client) UpdateLogForwarders

func (c *Client) UpdateLogForwarders(key ops.SiteKey, forwarders []storage.LogForwarderV1) error

UpdateLogForwarders replaces the list of active log forwarders TODO(r0mant,alexeyk) this is a legacy method used only by UI, alexeyk to remove it when refactoring resources and use upsert/delete instead

func (*Client) UpdatePersistentStorage

func (c *Client) UpdatePersistentStorage(ctx context.Context, req ops.UpdatePersistentStorageRequest) error

UpdatePersistentStorage updates persistent storage configuration.

func (*Client) UpdateSMTPConfig

func (c *Client) UpdateSMTPConfig(ctx context.Context, key ops.SiteKey, config storage.SMTPConfig) error

UpdateSMTPConfig updates the cluster SMTP configuration

func (*Client) UpdateUser

func (c *Client) UpdateUser(ctx context.Context, req ops.UpdateUserRequest) error

UpdateUser updates the specified user information.

func (*Client) UpsertAuthGateway

func (c *Client) UpsertAuthGateway(ctx context.Context, key ops.SiteKey, gw storage.AuthGateway) error

UpsertAuthGateway updates auth gateway configuration.

func (*Client) UpsertClusterAuthPreference

func (c *Client) UpsertClusterAuthPreference(ctx context.Context, key ops.SiteKey, authPreference teleservices.AuthPreference) error

UpsertClusterAuthPreference updates cluster auth preference

func (*Client) UpsertGithubConnector

func (c *Client) UpsertGithubConnector(ctx context.Context, key ops.SiteKey, connector teleservices.GithubConnector) error

UpsertGithubConnector creates or updates a Github connector

func (*Client) UpsertRepository

func (c *Client) UpsertRepository(repository string) error

func (*Client) UpsertUser

func (c *Client) UpsertUser(ctx context.Context, key ops.SiteKey, user teleservices.User) error

UpsertUser creates or updates the user

func (*Client) ValidateDomainName

func (c *Client) ValidateDomainName(domainName string) error

func (*Client) ValidateRemoteAccess

func (*Client) ValidateServers

ValidateServers runs pre-installation checks

type ClientParam

type ClientParam func(c *Client) error

ClientParam defines the API to override configuration on client c

func BasicAuth

func BasicAuth(username, password string) ClientParam

BasicAuth sets username and password for HTTP client

func BearerAuth

func BearerAuth(password string) ClientParam

BearerAuth sets token for HTTP client

func HTTPClient

func HTTPClient(h *http.Client) ClientParam

HTTPClient is a functional parameter that sets the internal HTTP client

func WithLocalDialer

func WithLocalDialer(dialer httplib.Dialer) ClientParam

WithLocalDialer specifies the dialer to use for connecting to an endpoint if standard dialing fails

type UpsertResourceRawReq

type UpsertResourceRawReq struct {
	// Resource is a raw JSON data of a resource
	Resource json.RawMessage `json:"resource"`
	// TTL is the resource TTL
	TTL time.Duration `json:"ttl"`
}

UpsertResourceRawReq is a request to upsert a resource

Jump to

Keyboard shortcuts

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