control

package
v0.1.0-rc.45 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: BSD-3-Clause Imports: 27 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package controlclient calls the tnl control API.

responses normally cannot exceed 1 MiB. a successful response other than HTTP 204 must contain one non-null JSON value that matches the generated schema. most requests time out after 20 seconds; certificate requests time out after 150 seconds. requests do not follow redirects. network and read failures wrap ErrUnavailable, but caller cancellation, invalid responses, and oversized responses do not. known server problem codes take precedence over status.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnauthenticated      = failure.Wrap("authenticate control request", failure.Authentication, errors.New("controlclient: unauthenticated"))
	ErrNotFound             = failure.Wrap("read control resource", failure.ServerResourceNotFound, errors.New("controlclient: not found"))
	ErrNameUnavailable      = failure.Wrap("select service hostname", failure.ServerConflict, errors.New("controlclient: service hostname unavailable"))
	ErrStatusConflict       = failure.Wrap("update control state", failure.ServerConflict, errors.New("controlclient: status conflict"))
	ErrProjectManaged       = failure.Wrap("change project-managed resource", failure.ServerConflict, fmt.Errorf("resource is managed by project configuration: %w", ErrStatusConflict))
	ErrCertificateStatus    = failure.Wrap("issue service certificate", failure.CertificateUnavailable, errors.New("controlclient: certificate status conflict"))
	ErrDNSProofPending      = failure.Wrap("configure domain DNS", failure.DNSPending, errors.New("controlclient: DNS setup pending"))
	ErrRateLimited          = failure.Wrap("request control API", failure.ServerRateLimited, errors.New("controlclient: rate limited"))
	ErrUnavailable          = failure.Wrap("request control API", failure.ServerUnavailable, errors.New("controlclient: temporarily unavailable"))
	ErrUnsupported          = failure.Wrap("request control API", failure.ServerResponseInvalid, errors.New("controlclient: unsupported"))
	ErrGuestTrialExhausted  = failure.Wrap("publish guest demo", failure.GuestTrialExhausted, errors.New("controlclient: guest demo trial exhausted"))
	ErrGuestDemoOnly        = failure.Wrap("publish guest demo", failure.GuestDemoOnly, errors.New("controlclient: guest demo only"))
	ErrGuestIPChanged       = failure.Wrap("publish guest demo", failure.GuestIPChanged, errors.New("controlclient: guest demo source IP changed"))
	ErrGuestIssuanceLimited = failure.Wrap("create guest demo", failure.GuestIssuanceLimited, errors.New("controlclient: guest demo issuance limited"))
	ErrMemberHostnameDepth  = failure.Wrap("select service hostname", failure.MemberHostnameDepthExceeded, errors.New("managed-domain member hostname depth exceeded"))
)
View Source
var ErrDeploymentManagementRequest = failure.Wrap("select deployment management operation", failure.ServerRequestInvalid, errors.New("invalid deployment management request"))

Functions

func TrafficSelection

func TrafficSelection(selection *trafficlimits.Selection) (*controlv1.TrafficSelection, error)

TrafficSelection converts explicit choices without resolving defaults or retaining caller-owned pointers.

func VisitorSourceAuthenticates

func VisitorSourceAuthenticates(ctx context.Context) bool

VisitorSourceAuthenticates reports that this exact request carries its own browser, share, grant, or workload source instead of a management session.

Types

type Client

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

func New

func New(server string, httpClient *http.Client, access credentials.AccessToken) (*Client, error)

func NewExternallyAuthenticated

func NewExternallyAuthenticated(server string, httpClient *http.Client) (*Client, error)

NewExternallyAuthenticated creates a client whose HTTP transport adds authorization.

func (*Client) AcceptServiceInvitation

func (c *Client) AcceptServiceInvitation(ctx context.Context, secret string) (controlv1.ServiceGrant, error)

func (*Client) AcknowledgeDeploymentPublisherConfiguration

func (c *Client) AcknowledgeDeploymentPublisherConfiguration(ctx context.Context, token string, body controlv1.DeploymentPublisherAcknowledgement) error

func (*Client) AddPreviewService

func (c *Client) AddPreviewService(ctx context.Context, id, serviceID string) (controlv1.Preview, error)

func (*Client) AdminDrainRelay

func (c *Client) AdminDrainRelay(ctx context.Context, relayID string, body controlv1.AdminDrainRelayRequest) (controlv1.AdminRelayLease, error)

func (*Client) AdminListMaintenanceControls

func (c *Client) AdminListMaintenanceControls(ctx context.Context) ([]controlv1.MaintenanceControl, error)

func (*Client) AdminListRelays

func (c *Client) AdminListRelays(ctx context.Context) (controlv1.AdminRelayPage, error)

func (*Client) AdminServerStatus

func (c *Client) AdminServerStatus(ctx context.Context) (controlv1.AdminServerStatus, error)

func (*Client) AdminSetMaintenanceControl

func (c *Client) AdminSetMaintenanceControl(ctx context.Context, name controlv1.MaintenanceControlName, allowed bool) (controlv1.MaintenanceControl, error)

func (*Client) AllocateDeploymentPublication

func (c *Client) AllocateDeploymentPublication(ctx context.Context, token, team, project, deployment string, body controlv1.AllocateServiceRequest) (controlv1.Service, error)

func (*Client) AllocateGuestDemoService

func (c *Client) AllocateGuestDemoService(ctx context.Context, key string, body controlv1.AllocateGuestDemoServiceRequest) (controlv1.Service, error)

func (*Client) AllocatePublisherService

func (c *Client) AllocatePublisherService(ctx context.Context, token string, b controlv1.AllocateServiceRequest) (controlv1.Service, error)

func (*Client) CheckServiceBrowserSession

func (c *Client) CheckServiceBrowserSession(ctx context.Context, service, run string, token credentials.ServiceRunToken, input controlv1.ServiceBrowserRequest) (controlv1.BrowserAccessResponse, error)

func (*Client) CheckWorkloadService

func (c *Client) CheckWorkloadService(ctx context.Context, credential, service string) (controlv1.WorkloadServiceAuthorization, error)

func (*Client) ClientIP

func (c *Client) ClientIP(ctx context.Context) (controlv1.ClientIPResponse, error)

func (*Client) CloseServiceRun

func (c *Client) CloseServiceRun(ctx context.Context, serviceID, runID string, token credentials.ServiceRunToken) error

func (*Client) ConfigureService

func (c *Client) ConfigureService(ctx context.Context, id string, body controlv1.UpdateServiceRequest) (controlv1.Service, error)

func (*Client) ConfirmConnectorPeerPairPrepared

func (c *Client) ConfirmConnectorPeerPairPrepared(ctx context.Context, serviceID, runID, pairID string, prepared controlv1.ConnectorPeerPairPrepared, token credentials.ServiceRunToken) error

func (*Client) ControlURL

func (c *Client) ControlURL() string

func (*Client) CreateDeployment

func (c *Client) CreateDeployment(ctx context.Context, team, project, key string, body controlv1.CreateDeploymentRequest) (controlv1.Deployment, error)

func (*Client) CreateDeploymentPublisherEnrollment

func (c *Client) CreateDeploymentPublisherEnrollment(ctx context.Context, team, project, deployment, key string, body controlv1.CreateDeploymentPublisherEnrollmentRequest) (controlv1.DeploymentPublisherEnrollment, error)

func (*Client) CreateGuestDemo

func (c *Client) CreateGuestDemo(ctx context.Context) (controlv1.GuestDemoSession, error)

func (*Client) CreatePreview

func (c *Client) CreatePreview(ctx context.Context, teamID, key string) (controlv1.Preview, error)

func (*Client) CreateService

func (c *Client) CreateService(ctx context.Context, team, name, key string, metadata controlv1.ServiceMetadata, configuration *controlv1.ProjectServiceConfiguration) (controlv1.Service, error)

a person's control session may create the saved service and issue an exact enrollment. the resulting publisher uses only its scoped grant for runs.

func (*Client) CreateServiceAt

func (c *Client) CreateServiceAt(ctx context.Context, team, name, key string, placement *controlv1.ServicePlacement, metadata controlv1.ServiceMetadata, configuration *controlv1.ProjectServiceConfiguration) (controlv1.Service, error)

func (*Client) CreateServiceCertificateIssuance

func (c *Client) CreateServiceCertificateIssuance(ctx context.Context, service, run string, number int64, token credentials.ServiceRunToken, csr []byte, key string) (controlv1.ServiceCertificateIssuance, error)

func (*Client) CreateServiceGrant

func (c *Client) CreateServiceGrant(ctx context.Context, service, key string, body controlv1.CreateServiceGrantRequest) (controlv1.ServiceGrant, error)

func (*Client) CreateServiceHTTPGrant

func (c *Client) CreateServiceHTTPGrant(ctx context.Context, service string, input controlv1.CreateVisitorCredentialRequest) (controlv1.VisitorCredential, error)

func (*Client) CreateServiceRunPreview

func (c *Client) CreateServiceRunPreview(ctx context.Context, service, run string, number int64, token credentials.ServiceRunToken) (controlv1.Preview, error)

func (*Client) CreateServiceShare

func (c *Client) CreateServiceShare(ctx context.Context, key string, body controlv1.CreateShareRequest) (controlv1.ShareCreation, error)

func (*Client) CreateShare

func (c *Client) CreateShare(ctx context.Context, previewID, key string, body controlv1.CreateShareRequest) (controlv1.ShareCreation, error)

func (*Client) DeleteDeployment

func (c *Client) DeleteDeployment(ctx context.Context, team, project, selector string, revision int64) error

func (*Client) DeleteGuestService

func (c *Client) DeleteGuestService(ctx context.Context, id string) error

guest cleanup carries the trial credential and exact service, not management CAS. the server checks source, ownership, and fixed trial lifetime.

func (*Client) DeletePublisherService

func (c *Client) DeletePublisherService(ctx context.Context, token, id string) error

func (*Client) DeleteService

func (c *Client) DeleteService(ctx context.Context, id string, conditions controlv1.DeleteServiceParams) error

func (*Client) DeliverConnectorPeerPair

func (c *Client) DeliverConnectorPeerPair(ctx context.Context, serviceID, runID, pairID string, generation int64, token credentials.ServiceRunToken) (controlv1.ConnectorPeerPairDelivery, error)

func (*Client) DeploymentPublication

func (c *Client) DeploymentPublication(ctx context.Context, token, team, project, deployment, service string) (controlv1.Service, error)

func (*Client) Discovery

func (c *Client) Discovery(ctx context.Context) (controlv1.ControlDiscovery, error)

func (*Client) EnrollGuestPublisher

func (c *Client) EnrollGuestPublisher(ctx context.Context, service string, public ed25519.PublicKey) (authorityv1.PublisherEnrollmentResult, error)

the bootstrap response uses the defining ordinary enrollment shape. only the trial credential authorizes enrollment; service publication uses its own key.

func (*Client) EnrollVisitorDevice

func (c *Client) EnrollVisitorDevice(ctx context.Context, key ed25519.PublicKey) (controlv1.VisitorDevice, error)

func (*Client) GetDeployment

func (c *Client) GetDeployment(ctx context.Context, team, project, selector string) (controlv1.Deployment, error)

func (*Client) GetDeploymentPublisher

func (c *Client) GetDeploymentPublisher(ctx context.Context, team, project, deployment, publisher string) (controlv1.DeploymentPublisher, error)

func (*Client) GetDeploymentPublisherAppAssignments

func (c *Client) GetDeploymentPublisherAppAssignments(ctx context.Context, token string) (controlv1.DeploymentPublisherAssignments, error)

func (*Client) GetDeploymentPublisherAssignments

func (c *Client) GetDeploymentPublisherAssignments(ctx context.Context, token string) (controlv1.DeploymentPublisherAssignments, error)

func (*Client) GetLocalProjectService

func (c *Client) GetLocalProjectService(ctx context.Context, project, service string, params controlv1.GetLocalProjectServiceParams) (controlv1.LocalProjectService, error)

func (*Client) GetPreview

func (c *Client) GetPreview(ctx context.Context, id string) (controlv1.Preview, error)

func (*Client) GetProjectConfiguration

func (c *Client) GetProjectConfiguration(ctx context.Context, team, project, deployment string) (controlv1.AppliedProjectConfiguration, error)

func (*Client) GetProjectPublicMetadata

func (c *Client) GetProjectPublicMetadata(ctx context.Context, team, project string) (controlv1.ProjectPublicMetadata, error)

func (*Client) GetProjectService

func (c *Client) GetProjectService(ctx context.Context, project, service string, params controlv1.GetProjectServiceParams) (controlv1.Service, error)

func (*Client) GetProjectStatus

func (c *Client) GetProjectStatus(ctx context.Context, project string, params controlv1.GetProjectStatusParams) (controlv1.ProjectStatus, error)

func (*Client) GetPublisherService

func (c *Client) GetPublisherService(ctx context.Context, serviceID, publisherAccess string) (controlv1.Service, error)

func (*Client) GetService

func (c *Client) GetService(ctx context.Context, id string) (controlv1.Service, error)

func (*Client) GetServiceCertificateIssuance

func (c *Client) GetServiceCertificateIssuance(ctx context.Context, service, run, issuance string, token credentials.ServiceRunToken) (controlv1.ServiceCertificateIssuance, error)

func (*Client) GetServiceConfiguration

func (c *Client) GetServiceConfiguration(ctx context.Context, id string) (*controlv1.ProjectServiceConfiguration, string, error)

func (*Client) GetShare

func (c *Client) GetShare(ctx context.Context, id string) (controlv1.Share, error)

func (*Client) HeartbeatServiceRun

func (c *Client) HeartbeatServiceRun(ctx context.Context, serviceID, runID string, token credentials.ServiceRunToken, health controlv1.ServiceRunHeartbeat) (controlv1.ServiceRunState, error)

func (*Client) InviteServiceVisitor

func (*Client) IssueServiceClientCertificate

func (c *Client) IssueServiceClientCertificate(ctx context.Context, service, device string, csr []byte) (controlv1.ServiceClientCertificate, error)

func (*Client) IssueVisitorToken

IssueVisitorToken exchanges an explicit authentication source for permission. source credentials stay in the request body; they never become control bearer credentials or application headers.

func (*Client) IssueWorkloadServiceClientCertificate

func (c *Client) IssueWorkloadServiceClientCertificate(ctx context.Context, credential, service string, csr []byte) (controlv1.ServiceClientCertificate, error)

func (*Client) ListAvailableServices

func (c *Client) ListAvailableServices(ctx context.Context, path controlv1.ServiceAccessPath) ([]controlv1.ServiceSummary, error)

ListAvailableServices requests one explicit visitor access path. a public HTTP preview grant does not authorize connector discovery or traffic.

func (*Client) ListConnectorPeerPairs

func (c *Client) ListConnectorPeerPairs(ctx context.Context, serviceID, runID, after string, token credentials.ServiceRunToken) (controlv1.ConnectorPeerPairCandidates, error)

func (*Client) ListDeploymentPublishers

func (c *Client) ListDeploymentPublishers(ctx context.Context, team, project, deployment, after string, limit int) (controlv1.DeploymentPublisherPage, error)

func (*Client) ListDeployments

func (c *Client) ListDeployments(ctx context.Context, team, project, after string, limit int) (controlv1.DeploymentPage, error)

func (*Client) ListPreviews

func (c *Client) ListPreviews(ctx context.Context, params controlv1.ListPreviewsParams) (controlv1.PreviewPage, error)

func (*Client) ListProjects

func (c *Client) ListProjects(ctx context.Context, params controlv1.ListProjectsParams) (controlv1.ProjectPage, error)

func (*Client) ListPublisherIdentities

func (c *Client) ListPublisherIdentities(ctx context.Context, team, after string) (controlv1.PublisherIdentityPage, error)

func (*Client) ListServiceAudit

func (c *Client) ListServiceAudit(ctx context.Context, team string, params controlv1.ListServiceAuditParams) (controlv1.ServiceAuditPage, error)

ListServiceAudit reads one manager-authorized page using the person's session. callers retain filters and advance the returned cursor when reading more pages.

func (*Client) ListServiceGrants

func (c *Client) ListServiceGrants(ctx context.Context, service string) ([]controlv1.ServiceGrant, error)

func (*Client) ListServiceHTTPGrants

func (c *Client) ListServiceHTTPGrants(ctx context.Context, service string) ([]controlv1.ServiceHTTPGrantSummary, error)

func (*Client) ListServiceInvitations

func (c *Client) ListServiceInvitations(ctx context.Context, service string) ([]controlv1.ServiceInvitation, error)

func (*Client) ListServices

func (c *Client) ListServices(ctx context.Context, team string) ([]controlv1.ServiceSummary, error)

func (*Client) ListShares

func (c *Client) ListShares(ctx context.Context, previewID string) ([]controlv1.Share, error)

func (*Client) ListTeamShares

func (c *Client) ListTeamShares(ctx context.Context, teamID string) ([]controlv1.Share, error)

func (*Client) ListWorkloadServices

func (c *Client) ListWorkloadServices(ctx context.Context, credential string) (controlv1.WorkloadServices, error)

func (*Client) ManageDeployment

func (c *Client) ManageDeployment(ctx context.Context, team, project string, r DeploymentManagementRequest) (DeploymentManagementResult, error)

func (*Client) MarkServiceCertificateInstalled

func (c *Client) MarkServiceCertificateInstalled(ctx context.Context, service, run string, number int64, issuance string, expires time.Time, token credentials.ServiceRunToken) error

func (*Client) MarkSuppliedServiceCertificateInstalled

func (c *Client) MarkSuppliedServiceCertificateInstalled(ctx context.Context, service, run string, number int64, chain, previous string, token credentials.ServiceRunToken) (controlv1.SuppliedServiceCertificateInstallation, error)

func (*Client) PrepareDeviceConnectorPeerPair

func (c *Client) PrepareDeviceConnectorPeerPair(ctx context.Context, service, device string, body controlv1.ConnectorPeerPairRequest) (controlv1.ConnectorPeerPair, error)

Connector pair requests carry an already signed Go v1 proof. the source is selected here so a workload request cannot accidentally send a control bearer. callers retain the signed IdempotencyKey as the owner key through replacement; uncertain replies repeat the exact proof, never a fresh owner key.

func (*Client) PrepareServiceRun

func (c *Client) PrepareServiceRun(ctx context.Context, serviceID, key, publisherAccess string, declared controlv1.ServiceRunDeclaration) (controlv1.ServiceRunPreparation, error)

func (*Client) PrepareSourceConnectorPeerPair

func (c *Client) PrepareSourceConnectorPeerPair(ctx context.Context, service string, body controlv1.ConnectorPeerPairRequest) (controlv1.ConnectorPeerPair, error)

func (*Client) PrepareWorkloadConnectorPeerPair

func (c *Client) PrepareWorkloadConnectorPeerPair(ctx context.Context, service, credential string, body controlv1.ConnectorPeerPairRequest) (controlv1.ConnectorPeerPair, error)

func (*Client) ReadPublisherVisitorPolicy

func (c *Client) ReadPublisherVisitorPolicy(ctx context.Context, body controlv1.PublisherVisitorPolicyRequest, token string) (controlv1.VisitorPolicyUpdate, error)

func (*Client) RealizeLocalProjectService

func (c *Client) RealizeLocalProjectService(ctx context.Context, project, service string, body controlv1.RealizeLocalProjectServiceRequest) (controlv1.LocalProjectService, error)

func (*Client) RebindDeviceConnectorPeerPair

func (c *Client) RebindDeviceConnectorPeerPair(ctx context.Context, service, pair, device string, body controlv1.ConnectorPeerPairRebindRequest) (controlv1.ConnectorPeerPairRebindState, error)

func (*Client) RebindSourceConnectorPeerPair

func (c *Client) RebindSourceConnectorPeerPair(ctx context.Context, service, pair string, body controlv1.ConnectorPeerPairRebindRequest) (controlv1.ConnectorPeerPairRebindState, error)

func (*Client) RebindWorkloadConnectorPeerPair

func (c *Client) RebindWorkloadConnectorPeerPair(ctx context.Context, service, pair, credential string, body controlv1.ConnectorPeerPairRebindRequest) (controlv1.ConnectorPeerPairRebindState, error)

func (*Client) RedeemDeploymentPublisherEnrollment

func (c *Client) RedeemDeploymentPublisherEnrollment(ctx context.Context, key string, public ed25519.PublicKey) (controlv1.DeploymentPublisherIdentity, error)

func (*Client) RedeemScopedDeploymentPublisherEnrollment

func (c *Client) RedeemScopedDeploymentPublisherEnrollment(ctx context.Context, key string, public ed25519.PublicKey, deploymentID, projectKey string) (controlv1.DeploymentPublisherIdentity, error)

func (*Client) RedeemServiceBrowserHandoff

func (c *Client) RedeemServiceBrowserHandoff(ctx context.Context, service, run string, token credentials.ServiceRunToken, input controlv1.ServiceBrowserRequest) (controlv1.BrowserHandoffResponse, error)

func (*Client) RedeemServiceShare

func (c *Client) RedeemServiceShare(ctx context.Context, serviceID, runID string, body controlv1.RedeemServiceShareRequest, token credentials.ServiceRunToken) (controlv1.ShareRedemption, error)

func (*Client) RegisterDeploymentCredential

func (c *Client) RegisterDeploymentCredential(ctx context.Context, team, project, key string, body controlv1.RegisterDeploymentCredentialRequest) (controlv1.DeploymentCredential, error)

func (*Client) ReleaseServiceEndpoint

func (c *Client) ReleaseServiceEndpoint(ctx context.Context, id string, body controlv1.ReleaseServiceEndpointRequest) (controlv1.Service, error)

func (*Client) RenameDeployment

func (c *Client) RenameDeployment(ctx context.Context, project, deployment string, body controlv1.RenameDeploymentRequest) (controlv1.AppliedProjectConfiguration, error)

func (*Client) RenameDeploymentNamespace

func (c *Client) RenameDeploymentNamespace(ctx context.Context, project, deployment string, body controlv1.RenameDeploymentNamespaceRequest) (controlv1.AppliedProjectConfiguration, error)

func (*Client) RenewDeviceConnectorPeerPair

func (c *Client) RenewDeviceConnectorPeerPair(ctx context.Context, service, pair, device string, body controlv1.ConnectorPeerPairRequest) (controlv1.ConnectorPeerPairRenewal, error)

func (*Client) RenewSourceConnectorPeerPair

func (c *Client) RenewSourceConnectorPeerPair(ctx context.Context, service, pair string, body controlv1.ConnectorPeerPairRequest) (controlv1.ConnectorPeerPairRenewal, error)

func (*Client) RenewWorkloadConnectorPeerPair

func (c *Client) RenewWorkloadConnectorPeerPair(ctx context.Context, service, pair, credential string, body controlv1.ConnectorPeerPairRequest) (controlv1.ConnectorPeerPairRenewal, error)

func (*Client) ReportServiceRunObservations

func (c *Client) ReportServiceRunObservations(ctx context.Context, serviceID, runID string, number int64, token credentials.ServiceRunToken, batch serviceaudit.Batch) error

func (*Client) ReserveServiceAt

func (c *Client) ReserveServiceAt(ctx context.Context, team, name, key string, placement *controlv1.ServicePlacement, metadata controlv1.ServiceMetadata, configuration *controlv1.ProjectServiceConfiguration) (controlv1.Service, bool, error)

reserve uses the canonical creation operation's exact recovery decision. it never needs team inventory or a separate hostname lookup API.

func (*Client) ResolveProjectSource

func (c *Client) ResolveProjectSource(ctx context.Context, source controlv1.GitProjectSource) (controlv1.ProjectSourceIdentity, error)

func (*Client) RetireConnectorPeerPair

func (c *Client) RetireConnectorPeerPair(ctx context.Context, service, pair string, body controlv1.ConnectorPeerPairRetireRequest) (controlv1.ConnectorPeerPairRetirement, error)

RetireConnectorPeerPair sends the already-captured exact proof once. it neither reads nor refreshes a parent credential; callers own identical-body retries.

func (*Client) RevokeDeploymentPublisher

func (c *Client) RevokeDeploymentPublisher(ctx context.Context, team, project, deployment, publisher string) error

func (*Client) RevokePublisherGrant

func (c *Client) RevokePublisherGrant(ctx context.Context, team, id, grant string) error

func (*Client) RevokePublisherIdentity

func (c *Client) RevokePublisherIdentity(ctx context.Context, team, id string) error

func (*Client) RevokeServiceBrowserSession

func (c *Client) RevokeServiceBrowserSession(ctx context.Context, service, run string, token credentials.ServiceRunToken, input controlv1.ServiceBrowserRequest) error

func (*Client) RevokeServiceGrant

func (c *Client) RevokeServiceGrant(ctx context.Context, service, id string) error

func (*Client) RevokeServiceHTTPGrant

func (c *Client) RevokeServiceHTTPGrant(ctx context.Context, service, id string) error

func (*Client) RevokeServiceInvitation

func (c *Client) RevokeServiceInvitation(ctx context.Context, service, id string) error

func (*Client) RevokeShare

func (c *Client) RevokeShare(ctx context.Context, id string) (controlv1.Share, error)

func (*Client) RevokeVisitorDevice

func (c *Client) RevokeVisitorDevice(ctx context.Context, id string) error

func (*Client) SelectDeploymentServiceRun

func (c *Client) SelectDeploymentServiceRun(ctx context.Context, team, project, deployment, service string, source controlv1.VisitorTokenSource) (controlv1.ServiceSelection, error)

func (*Client) SelectServiceRun

func (c *Client) SelectServiceRun(ctx context.Context, serviceID, deviceID string) (controlv1.ServiceSelection, error)

func (*Client) SelectWorkloadServiceRun

func (c *Client) SelectWorkloadServiceRun(ctx context.Context, credential, service string) (controlv1.ServiceSelection, error)

func (*Client) SetPreviewTeamAccess

func (c *Client) SetPreviewTeamAccess(ctx context.Context, id string, enabled bool) (controlv1.Preview, error)

func (*Client) SetServiceEnabled

func (c *Client) SetServiceEnabled(ctx context.Context, id string, enabled bool) (controlv1.Service, error)

func (*Client) StartServiceRun

func (c *Client) StartServiceRun(ctx context.Context, service, run, access string, number int64) (controlv1.ServiceRunSetup, error)

func (*Client) UpdateDeployment

func (c *Client) UpdateDeployment(ctx context.Context, team, project, selector string, revision int64, body controlv1.UpdateDeploymentRequest) (controlv1.Deployment, error)

type DeploymentManagementRequest

type DeploymentManagementRequest struct {
	Operation      string          `json:"operation"`
	Deployment     string          `json:"deployment,omitempty"`
	Publisher      string          `json:"publisher,omitempty"`
	IdempotencyKey string          `json:"idempotency_key,omitempty"`
	IfMatch        string          `json:"if_match,omitempty"`
	After          string          `json:"after,omitempty"`
	Limit          int             `json:"limit,omitempty"`
	Body           json.RawMessage `json:"body,omitempty"`
}

the language adapter carries operation inputs, not another HTTP contract. requests use the existing generated Go API operations and error boundary.

func (DeploymentManagementRequest) GoString

func (DeploymentManagementRequest) String

type DeploymentManagementResult

type DeploymentManagementResult struct {
	Schema  int                `json:"schema"`
	Data    any                `json:"data,omitempty"`
	ETag    string             `json:"etag,omitempty"`
	Status  int                `json:"status,omitempty"`
	Problem *controlv1.Problem `json:"problem,omitempty"`
}

func (DeploymentManagementResult) GoString

func (DeploymentManagementResult) String

type ProblemError

type ProblemError struct {
	Status  int
	Problem controlv1.Problem
}

func (*ProblemError) CredentialDeliveryResourceID

func (e *ProblemError) CredentialDeliveryResourceID() (string, bool)

func (*ProblemError) Error

func (e *ProblemError) Error() string

type RateLimitError

type RateLimitError struct{ RetryAfter time.Duration }

func (*RateLimitError) Error

func (e *RateLimitError) Error() string

func (*RateLimitError) Unwrap

func (e *RateLimitError) Unwrap() error

type ServiceNamespaceError

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

ServiceNamespaceError retains a validated current-actor namespace diagnostic. it grants no authority and keeps the ordinary not-found and problem causes.

func (*ServiceNamespaceError) AllowedNamespace

func (e *ServiceNamespaceError) AllowedNamespace() (string, bool)

AllowedNamespace returns only the bounded field approved during problem decode. callers must also exclude independent joined failures before presenting a hint.

func (*ServiceNamespaceError) Error

func (e *ServiceNamespaceError) Error() string

func (*ServiceNamespaceError) Unwrap

func (e *ServiceNamespaceError) Unwrap() []error

Jump to

Keyboard shortcuts

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