Help us shape the future of Go! Take the 2026 Go Developer Survey

client

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcquireDisplayPath

func AcquireDisplayPath(name string) string

AcquireDisplayPath returns the URL path to the display service acquire HTTP endpoint.

func BuildAcquirePayload

func BuildAcquirePayload(displayAcquireBody string, displayAcquireName string, displayAcquireNamespace string) (*display.DisplayControlPayload, error)

BuildAcquirePayload builds the payload for the display acquire endpoint from CLI flags.

func BuildCapabilityPayload

func BuildCapabilityPayload(displayCapabilityName string, displayCapabilityNamespace string) (*display.CapabilityPayload, error)

BuildCapabilityPayload builds the payload for the display capability endpoint from CLI flags.

func BuildJoinPayload

func BuildJoinPayload(displayJoinBody string, displayJoinName string, displayJoinNamespace string) (*display.JoinDisplayPayload, error)

BuildJoinPayload builds the payload for the display join endpoint from CLI flags.

func BuildLeavePayload

func BuildLeavePayload(displayLeaveName string, displayLeaveParticipantID string, displayLeaveNamespace string) (*display.LeaveDisplayPayload, error)

BuildLeavePayload builds the payload for the display leave endpoint from CLI flags.

func BuildReleasePayload

func BuildReleasePayload(displayReleaseBody string, displayReleaseName string, displayReleaseNamespace string) (*display.DisplayControlPayload, error)

BuildReleasePayload builds the payload for the display release endpoint from CLI flags.

func BuildStatusPayload

func BuildStatusPayload(displayStatusName string, displayStatusNamespace string) (*display.StatusPayload, error)

BuildStatusPayload builds the payload for the display status endpoint from CLI flags.

func BuildTransferPayload

func BuildTransferPayload(displayTransferBody string, displayTransferName string, displayTransferNamespace string) (*display.DisplayControlPayload, error)

BuildTransferPayload builds the payload for the display transfer endpoint from CLI flags.

func CapabilityDisplayPath

func CapabilityDisplayPath(name string) string

CapabilityDisplayPath returns the URL path to the display service capability HTTP endpoint.

func DecodeAcquireResponse

func DecodeAcquireResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)

DecodeAcquireResponse returns a decoder for responses returned by the display acquire endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeAcquireResponse may return the following errors:

  • "conflict" (type display.Conflict): http.StatusConflict
  • "forbidden" (type display.Forbidden): http.StatusForbidden
  • "invalid" (type display.Invalid): http.StatusBadRequest
  • "not_found" (type display.NotFound): http.StatusNotFound
  • "unauthorized" (type display.Unauthorized): http.StatusUnauthorized
  • error: internal error

func DecodeCapabilityResponse

func DecodeCapabilityResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)

DecodeCapabilityResponse returns a decoder for responses returned by the display capability endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeCapabilityResponse may return the following errors:

  • "forbidden" (type display.Forbidden): http.StatusForbidden
  • "not_found" (type display.NotFound): http.StatusNotFound
  • "unauthorized" (type display.Unauthorized): http.StatusUnauthorized
  • error: internal error

func DecodeJoinResponse

func DecodeJoinResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)

DecodeJoinResponse returns a decoder for responses returned by the display join endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeJoinResponse may return the following errors:

  • "capacity" (type display.Capacity): http.StatusTooManyRequests
  • "conflict" (type display.Conflict): http.StatusConflict
  • "forbidden" (type display.Forbidden): http.StatusForbidden
  • "invalid" (type display.Invalid): http.StatusBadRequest
  • "not_found" (type display.NotFound): http.StatusNotFound
  • "unauthorized" (type display.Unauthorized): http.StatusUnauthorized
  • error: internal error

func DecodeLeaveResponse

func DecodeLeaveResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)

DecodeLeaveResponse returns a decoder for responses returned by the display leave endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeLeaveResponse may return the following errors:

  • "forbidden" (type display.Forbidden): http.StatusForbidden
  • "not_found" (type display.NotFound): http.StatusNotFound
  • "unauthorized" (type display.Unauthorized): http.StatusUnauthorized
  • error: internal error

func DecodeReleaseResponse

func DecodeReleaseResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)

DecodeReleaseResponse returns a decoder for responses returned by the display release endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeReleaseResponse may return the following errors:

  • "conflict" (type display.Conflict): http.StatusConflict
  • "forbidden" (type display.Forbidden): http.StatusForbidden
  • "not_found" (type display.NotFound): http.StatusNotFound
  • "unauthorized" (type display.Unauthorized): http.StatusUnauthorized
  • error: internal error

func DecodeStatusResponse

func DecodeStatusResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)

DecodeStatusResponse returns a decoder for responses returned by the display status endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeStatusResponse may return the following errors:

  • "forbidden" (type display.Forbidden): http.StatusForbidden
  • "not_found" (type display.NotFound): http.StatusNotFound
  • "unauthorized" (type display.Unauthorized): http.StatusUnauthorized
  • error: internal error

func DecodeTransferResponse

func DecodeTransferResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)

DecodeTransferResponse returns a decoder for responses returned by the display transfer endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeTransferResponse may return the following errors:

  • "conflict" (type display.Conflict): http.StatusConflict
  • "forbidden" (type display.Forbidden): http.StatusForbidden
  • "invalid" (type display.Invalid): http.StatusBadRequest
  • "not_found" (type display.NotFound): http.StatusNotFound
  • "unauthorized" (type display.Unauthorized): http.StatusUnauthorized
  • error: internal error

func EncodeAcquireRequest

func EncodeAcquireRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error

EncodeAcquireRequest returns an encoder for requests sent to the display acquire server.

func EncodeCapabilityRequest

func EncodeCapabilityRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error

EncodeCapabilityRequest returns an encoder for requests sent to the display capability server.

func EncodeJoinRequest

func EncodeJoinRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error

EncodeJoinRequest returns an encoder for requests sent to the display join server.

func EncodeLeaveRequest

func EncodeLeaveRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error

EncodeLeaveRequest returns an encoder for requests sent to the display leave server.

func EncodeReleaseRequest

func EncodeReleaseRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error

EncodeReleaseRequest returns an encoder for requests sent to the display release server.

func EncodeStatusRequest

func EncodeStatusRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error

EncodeStatusRequest returns an encoder for requests sent to the display status server.

func EncodeTransferRequest

func EncodeTransferRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error

EncodeTransferRequest returns an encoder for requests sent to the display transfer server.

func JoinDisplayPath

func JoinDisplayPath(name string) string

JoinDisplayPath returns the URL path to the display service join HTTP endpoint.

func LeaveDisplayPath

func LeaveDisplayPath(name string, participantID string) string

LeaveDisplayPath returns the URL path to the display service leave HTTP endpoint.

func NewAcquireConflict

func NewAcquireConflict(body string) display.Conflict

NewAcquireConflict builds a display service acquire endpoint conflict error.

func NewAcquireDisplayControlOK

func NewAcquireDisplayControlOK(body *AcquireResponseBody) *displayviews.DisplayControlView

NewAcquireDisplayControlOK builds a "display" service "acquire" endpoint result from a HTTP "OK" response.

func NewAcquireForbidden

func NewAcquireForbidden(body string) display.Forbidden

NewAcquireForbidden builds a display service acquire endpoint forbidden error.

func NewAcquireInvalid

func NewAcquireInvalid(body string) display.Invalid

NewAcquireInvalid builds a display service acquire endpoint invalid error.

func NewAcquireNotFound

func NewAcquireNotFound(body string) display.NotFound

NewAcquireNotFound builds a display service acquire endpoint not_found error.

func NewAcquireUnauthorized

func NewAcquireUnauthorized(body string) display.Unauthorized

NewAcquireUnauthorized builds a display service acquire endpoint unauthorized error.

func NewCapabilityDisplayCapabilityOK

func NewCapabilityDisplayCapabilityOK(body *CapabilityResponseBody) *displayviews.DisplayCapabilityView

NewCapabilityDisplayCapabilityOK builds a "display" service "capability" endpoint result from a HTTP "OK" response.

func NewCapabilityForbidden

func NewCapabilityForbidden(body string) display.Forbidden

NewCapabilityForbidden builds a display service capability endpoint forbidden error.

func NewCapabilityNotFound

func NewCapabilityNotFound(body string) display.NotFound

NewCapabilityNotFound builds a display service capability endpoint not_found error.

func NewCapabilityUnauthorized

func NewCapabilityUnauthorized(body string) display.Unauthorized

NewCapabilityUnauthorized builds a display service capability endpoint unauthorized error.

func NewJoinCapacity

func NewJoinCapacity(body string) display.Capacity

NewJoinCapacity builds a display service join endpoint capacity error.

func NewJoinConflict

func NewJoinConflict(body string) display.Conflict

NewJoinConflict builds a display service join endpoint conflict error.

func NewJoinDisplayJoinOK

func NewJoinDisplayJoinOK(body *JoinResponseBody) *displayviews.DisplayJoinView

NewJoinDisplayJoinOK builds a "display" service "join" endpoint result from a HTTP "OK" response.

func NewJoinForbidden

func NewJoinForbidden(body string) display.Forbidden

NewJoinForbidden builds a display service join endpoint forbidden error.

func NewJoinInvalid

func NewJoinInvalid(body string) display.Invalid

NewJoinInvalid builds a display service join endpoint invalid error.

func NewJoinNotFound

func NewJoinNotFound(body string) display.NotFound

NewJoinNotFound builds a display service join endpoint not_found error.

func NewJoinUnauthorized

func NewJoinUnauthorized(body string) display.Unauthorized

NewJoinUnauthorized builds a display service join endpoint unauthorized error.

func NewLeaveForbidden

func NewLeaveForbidden(body string) display.Forbidden

NewLeaveForbidden builds a display service leave endpoint forbidden error.

func NewLeaveNotFound

func NewLeaveNotFound(body string) display.NotFound

NewLeaveNotFound builds a display service leave endpoint not_found error.

func NewLeaveResultOK

func NewLeaveResultOK(body *LeaveResponseBody) *display.LeaveResult

NewLeaveResultOK builds a "display" service "leave" endpoint result from a HTTP "OK" response.

func NewLeaveUnauthorized

func NewLeaveUnauthorized(body string) display.Unauthorized

NewLeaveUnauthorized builds a display service leave endpoint unauthorized error.

func NewReleaseConflict

func NewReleaseConflict(body string) display.Conflict

NewReleaseConflict builds a display service release endpoint conflict error.

func NewReleaseDisplayControlOK

func NewReleaseDisplayControlOK(body *ReleaseResponseBody) *displayviews.DisplayControlView

NewReleaseDisplayControlOK builds a "display" service "release" endpoint result from a HTTP "OK" response.

func NewReleaseForbidden

func NewReleaseForbidden(body string) display.Forbidden

NewReleaseForbidden builds a display service release endpoint forbidden error.

func NewReleaseNotFound

func NewReleaseNotFound(body string) display.NotFound

NewReleaseNotFound builds a display service release endpoint not_found error.

func NewReleaseUnauthorized

func NewReleaseUnauthorized(body string) display.Unauthorized

NewReleaseUnauthorized builds a display service release endpoint unauthorized error.

func NewStatusDisplayStatusOK

func NewStatusDisplayStatusOK(body *StatusResponseBody) *displayviews.DisplayStatusView

NewStatusDisplayStatusOK builds a "display" service "status" endpoint result from a HTTP "OK" response.

func NewStatusForbidden

func NewStatusForbidden(body string) display.Forbidden

NewStatusForbidden builds a display service status endpoint forbidden error.

func NewStatusNotFound

func NewStatusNotFound(body string) display.NotFound

NewStatusNotFound builds a display service status endpoint not_found error.

func NewStatusUnauthorized

func NewStatusUnauthorized(body string) display.Unauthorized

NewStatusUnauthorized builds a display service status endpoint unauthorized error.

func NewTransferConflict

func NewTransferConflict(body string) display.Conflict

NewTransferConflict builds a display service transfer endpoint conflict error.

func NewTransferDisplayControlOK

func NewTransferDisplayControlOK(body *TransferResponseBody) *displayviews.DisplayControlView

NewTransferDisplayControlOK builds a "display" service "transfer" endpoint result from a HTTP "OK" response.

func NewTransferForbidden

func NewTransferForbidden(body string) display.Forbidden

NewTransferForbidden builds a display service transfer endpoint forbidden error.

func NewTransferInvalid

func NewTransferInvalid(body string) display.Invalid

NewTransferInvalid builds a display service transfer endpoint invalid error.

func NewTransferNotFound

func NewTransferNotFound(body string) display.NotFound

NewTransferNotFound builds a display service transfer endpoint not_found error.

func NewTransferUnauthorized

func NewTransferUnauthorized(body string) display.Unauthorized

NewTransferUnauthorized builds a display service transfer endpoint unauthorized error.

func ReleaseDisplayPath

func ReleaseDisplayPath(name string) string

ReleaseDisplayPath returns the URL path to the display service release HTTP endpoint.

func StatusDisplayPath

func StatusDisplayPath(name string) string

StatusDisplayPath returns the URL path to the display service status HTTP endpoint.

func TransferDisplayPath

func TransferDisplayPath(name string) string

TransferDisplayPath returns the URL path to the display service transfer HTTP endpoint.

func ValidateDisplayCapabilityResponseBody

func ValidateDisplayCapabilityResponseBody(body *DisplayCapabilityResponseBody) (err error)

ValidateDisplayCapabilityResponseBody runs the validations defined on Display-CapabilityResponseBody

func ValidateLeaveResponseBody

func ValidateLeaveResponseBody(body *LeaveResponseBody) (err error)

ValidateLeaveResponseBody runs the validations defined on LeaveResponseBody

func ValidateParticipantResponseBody

func ValidateParticipantResponseBody(body *ParticipantResponseBody) (err error)

ValidateParticipantResponseBody runs the validations defined on ParticipantResponseBody

Types

type AcquireRequestBody

type AcquireRequestBody struct {
	// Participant performing the transition. Release requires the current
	// controller; acquire may be any participant; transfer requires the current
	// controller
	ParticipantID string `form:"participant_id" json:"participant_id" xml:"participant_id"`
	// Explicit human consent to take or transfer control, demoting the current
	// controller to observer. There is no silent takeover without this
	Force bool `form:"force" json:"force" xml:"force"`
	// Target observer participant identifier for a transfer
	To *string `form:"to,omitempty" json:"to,omitempty" xml:"to,omitempty"`
}

AcquireRequestBody is the type of the "display" service "acquire" endpoint HTTP request body.

func NewAcquireRequestBody

func NewAcquireRequestBody(p *display.DisplayControlPayload) *AcquireRequestBody

NewAcquireRequestBody builds the HTTP request body from the payload of the "acquire" endpoint of the "display" service.

type AcquireResponseBody

type AcquireResponseBody struct {
	// Controller after the transition, if any
	Controller *ParticipantResponseBody `form:"controller,omitempty" json:"controller,omitempty" xml:"controller,omitempty"`
	// Whether a controller was present before the transition
	WasHeld *bool `form:"was_held,omitempty" json:"was_held,omitempty" xml:"was_held,omitempty"`
	// True when release cleared the controller
	Released *bool `form:"released,omitempty" json:"released,omitempty" xml:"released,omitempty"`
}

AcquireResponseBody is the type of the "display" service "acquire" endpoint HTTP response body.

type CapabilityResponseBody

type CapabilityResponseBody struct {
	// Whether shared display sessions are available for this workspace
	Enabled *bool `form:"enabled,omitempty" json:"enabled,omitempty" xml:"enabled,omitempty"`
	// Display protocol/API revision
	Protocol *int `form:"protocol,omitempty" json:"protocol,omitempty" xml:"protocol,omitempty"`
	// Supported display transports
	Transports []string `form:"transports,omitempty" json:"transports,omitempty" xml:"transports,omitempty"`
	// Maximum simultaneous participants (controller + observers)
	MaxParticipants *int `form:"max_participants,omitempty" json:"max_participants,omitempty" xml:"max_participants,omitempty"`
	// Maximum advertised guest framebuffer width
	MaxWidth *int `form:"max_width,omitempty" json:"max_width,omitempty" xml:"max_width,omitempty"`
	// Maximum advertised guest framebuffer height
	MaxHeight *int `form:"max_height,omitempty" json:"max_height,omitempty" xml:"max_height,omitempty"`
	// Display stream handshake timeout in milliseconds
	HandshakeTimeoutMs *int `form:"handshake_timeout_ms,omitempty" json:"handshake_timeout_ms,omitempty" xml:"handshake_timeout_ms,omitempty"`
	// Idle membership lifetime in milliseconds
	ParticipantTTLMs *int `form:"participant_ttl_ms,omitempty" json:"participant_ttl_ms,omitempty" xml:"participant_ttl_ms,omitempty"`
	// Current participant count
	Participants *int `form:"participants,omitempty" json:"participants,omitempty" xml:"participants,omitempty"`
	// Whether a controller is currently attached
	ControllerPresent *bool `form:"controller_present,omitempty" json:"controller_present,omitempty" xml:"controller_present,omitempty"`
}

CapabilityResponseBody is the type of the "display" service "capability" endpoint HTTP response body.

type Client

type Client struct {
	// Capability Doer is the HTTP client used to make requests to the capability
	// endpoint.
	CapabilityDoer goahttp.Doer

	// Status Doer is the HTTP client used to make requests to the status endpoint.
	StatusDoer goahttp.Doer

	// Join Doer is the HTTP client used to make requests to the join endpoint.
	JoinDoer goahttp.Doer

	// Leave Doer is the HTTP client used to make requests to the leave endpoint.
	LeaveDoer goahttp.Doer

	// Acquire Doer is the HTTP client used to make requests to the acquire
	// endpoint.
	AcquireDoer goahttp.Doer

	// Release Doer is the HTTP client used to make requests to the release
	// endpoint.
	ReleaseDoer goahttp.Doer

	// Transfer Doer is the HTTP client used to make requests to the transfer
	// endpoint.
	TransferDoer goahttp.Doer

	// RestoreResponseBody controls whether the response bodies are reset after
	// decoding so they can be read again.
	RestoreResponseBody bool
	// contains filtered or unexported fields
}

Client lists the display service endpoint HTTP clients.

func NewClient

func NewClient(
	scheme string,
	host string,
	doer goahttp.Doer,
	enc func(*http.Request) goahttp.Encoder,
	dec func(*http.Response) goahttp.Decoder,
	restoreBody bool,
) *Client

NewClient instantiates HTTP clients for all the display service servers.

func (*Client) Acquire

func (c *Client) Acquire() goa.Endpoint

Acquire returns an endpoint that makes HTTP requests to the display service acquire server.

func (*Client) BuildAcquireRequest

func (c *Client) BuildAcquireRequest(ctx context.Context, v any) (*http.Request, error)

BuildAcquireRequest instantiates a HTTP request object with method and path set to call the "display" service "acquire" endpoint

func (*Client) BuildCapabilityRequest

func (c *Client) BuildCapabilityRequest(ctx context.Context, v any) (*http.Request, error)

BuildCapabilityRequest instantiates a HTTP request object with method and path set to call the "display" service "capability" endpoint

func (*Client) BuildJoinRequest

func (c *Client) BuildJoinRequest(ctx context.Context, v any) (*http.Request, error)

BuildJoinRequest instantiates a HTTP request object with method and path set to call the "display" service "join" endpoint

func (*Client) BuildLeaveRequest

func (c *Client) BuildLeaveRequest(ctx context.Context, v any) (*http.Request, error)

BuildLeaveRequest instantiates a HTTP request object with method and path set to call the "display" service "leave" endpoint

func (*Client) BuildReleaseRequest

func (c *Client) BuildReleaseRequest(ctx context.Context, v any) (*http.Request, error)

BuildReleaseRequest instantiates a HTTP request object with method and path set to call the "display" service "release" endpoint

func (*Client) BuildStatusRequest

func (c *Client) BuildStatusRequest(ctx context.Context, v any) (*http.Request, error)

BuildStatusRequest instantiates a HTTP request object with method and path set to call the "display" service "status" endpoint

func (*Client) BuildTransferRequest

func (c *Client) BuildTransferRequest(ctx context.Context, v any) (*http.Request, error)

BuildTransferRequest instantiates a HTTP request object with method and path set to call the "display" service "transfer" endpoint

func (*Client) Capability

func (c *Client) Capability() goa.Endpoint

Capability returns an endpoint that makes HTTP requests to the display service capability server.

func (*Client) Join

func (c *Client) Join() goa.Endpoint

Join returns an endpoint that makes HTTP requests to the display service join server.

func (*Client) Leave

func (c *Client) Leave() goa.Endpoint

Leave returns an endpoint that makes HTTP requests to the display service leave server.

func (*Client) Release

func (c *Client) Release() goa.Endpoint

Release returns an endpoint that makes HTTP requests to the display service release server.

func (*Client) Status

func (c *Client) Status() goa.Endpoint

Status returns an endpoint that makes HTTP requests to the display service status server.

func (*Client) Transfer

func (c *Client) Transfer() goa.Endpoint

Transfer returns an endpoint that makes HTTP requests to the display service transfer server.

type DisplayCapabilityResponseBody

type DisplayCapabilityResponseBody struct {
	// Whether shared display sessions are available for this workspace
	Enabled *bool `form:"enabled,omitempty" json:"enabled,omitempty" xml:"enabled,omitempty"`
	// Display protocol/API revision
	Protocol *int `form:"protocol,omitempty" json:"protocol,omitempty" xml:"protocol,omitempty"`
	// Supported display transports
	Transports []string `form:"transports,omitempty" json:"transports,omitempty" xml:"transports,omitempty"`
	// Maximum simultaneous participants (controller + observers)
	MaxParticipants *int `form:"max_participants,omitempty" json:"max_participants,omitempty" xml:"max_participants,omitempty"`
	// Maximum advertised guest framebuffer width
	MaxWidth *int `form:"max_width,omitempty" json:"max_width,omitempty" xml:"max_width,omitempty"`
	// Maximum advertised guest framebuffer height
	MaxHeight *int `form:"max_height,omitempty" json:"max_height,omitempty" xml:"max_height,omitempty"`
	// Display stream handshake timeout in milliseconds
	HandshakeTimeoutMs *int `form:"handshake_timeout_ms,omitempty" json:"handshake_timeout_ms,omitempty" xml:"handshake_timeout_ms,omitempty"`
	// Idle membership lifetime in milliseconds
	ParticipantTTLMs *int `form:"participant_ttl_ms,omitempty" json:"participant_ttl_ms,omitempty" xml:"participant_ttl_ms,omitempty"`
	// Current participant count
	Participants *int `form:"participants,omitempty" json:"participants,omitempty" xml:"participants,omitempty"`
	// Whether a controller is currently attached
	ControllerPresent *bool `form:"controller_present,omitempty" json:"controller_present,omitempty" xml:"controller_present,omitempty"`
}

DisplayCapabilityResponseBody is used to define fields on response body types.

type JoinRequestBody

type JoinRequestBody struct {
	// Initial role. Defaults to observer
	Role string `form:"role" json:"role" xml:"role"`
}

JoinRequestBody is the type of the "display" service "join" endpoint HTTP request body.

func NewJoinRequestBody

func NewJoinRequestBody(p *display.JoinDisplayPayload) *JoinRequestBody

NewJoinRequestBody builds the HTTP request body from the payload of the "join" endpoint of the "display" service.

type JoinResponseBody

type JoinResponseBody struct {
	// The joined participant record
	Participant *ParticipantResponseBody `form:"participant,omitempty" json:"participant,omitempty" xml:"participant,omitempty"`
	// Current capability state, including the live participant count
	Capability *DisplayCapabilityResponseBody `form:"capability,omitempty" json:"capability,omitempty" xml:"capability,omitempty"`
}

JoinResponseBody is the type of the "display" service "join" endpoint HTTP response body.

type LeaveResponseBody

type LeaveResponseBody struct {
	// Whether the participant was removed
	OK *bool `form:"ok,omitempty" json:"ok,omitempty" xml:"ok,omitempty"`
}

LeaveResponseBody is the type of the "display" service "leave" endpoint HTTP response body.

type ParticipantResponseBody

type ParticipantResponseBody struct {
	// Opaque server-side participant identifier. A capability, not a credential;
	// never sent to the guest or logged
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Current role: observer (view-only) or controller. Server-enforced; a
	// client-side viewOnly flag is not an authorization boundary
	Role *string `form:"role,omitempty" json:"role,omitempty" xml:"role,omitempty"`
	// Whether the participant is attached to a display stream
	Connected *bool `form:"connected,omitempty" json:"connected,omitempty" xml:"connected,omitempty"`
	// RFC 3339 timestamp when the participant joined
	JoinedAt *string `form:"joined_at,omitempty" json:"joined_at,omitempty" xml:"joined_at,omitempty"`
}

ParticipantResponseBody is used to define fields on response body types.

type ReleaseRequestBody

type ReleaseRequestBody struct {
	// Participant performing the transition. Release requires the current
	// controller; acquire may be any participant; transfer requires the current
	// controller
	ParticipantID string `form:"participant_id" json:"participant_id" xml:"participant_id"`
	// Explicit human consent to take or transfer control, demoting the current
	// controller to observer. There is no silent takeover without this
	Force bool `form:"force" json:"force" xml:"force"`
	// Target observer participant identifier for a transfer
	To *string `form:"to,omitempty" json:"to,omitempty" xml:"to,omitempty"`
}

ReleaseRequestBody is the type of the "display" service "release" endpoint HTTP request body.

func NewReleaseRequestBody

func NewReleaseRequestBody(p *display.DisplayControlPayload) *ReleaseRequestBody

NewReleaseRequestBody builds the HTTP request body from the payload of the "release" endpoint of the "display" service.

type ReleaseResponseBody

type ReleaseResponseBody struct {
	// Controller after the transition, if any
	Controller *ParticipantResponseBody `form:"controller,omitempty" json:"controller,omitempty" xml:"controller,omitempty"`
	// Whether a controller was present before the transition
	WasHeld *bool `form:"was_held,omitempty" json:"was_held,omitempty" xml:"was_held,omitempty"`
	// True when release cleared the controller
	Released *bool `form:"released,omitempty" json:"released,omitempty" xml:"released,omitempty"`
}

ReleaseResponseBody is the type of the "display" service "release" endpoint HTTP response body.

type StatusResponseBody

type StatusResponseBody struct {
	// Whether shared display sessions are available for this workspace
	Enabled *bool `form:"enabled,omitempty" json:"enabled,omitempty" xml:"enabled,omitempty"`
	// Display protocol/API revision
	Protocol *int `form:"protocol,omitempty" json:"protocol,omitempty" xml:"protocol,omitempty"`
	// Capture/broker generation. Changes when a new capture owner is elected
	Epoch *string `form:"epoch,omitempty" json:"epoch,omitempty" xml:"epoch,omitempty"`
	// Current controller, if any
	Controller *ParticipantResponseBody `form:"controller,omitempty" json:"controller,omitempty" xml:"controller,omitempty"`
	// Current observers
	Observers []*ParticipantResponseBody `form:"observers,omitempty" json:"observers,omitempty" xml:"observers,omitempty"`
	// Total participant count (controller + observers)
	Participants *int `form:"participants,omitempty" json:"participants,omitempty" xml:"participants,omitempty"`
}

StatusResponseBody is the type of the "display" service "status" endpoint HTTP response body.

type TransferRequestBody

type TransferRequestBody struct {
	// Participant performing the transition. Release requires the current
	// controller; acquire may be any participant; transfer requires the current
	// controller
	ParticipantID string `form:"participant_id" json:"participant_id" xml:"participant_id"`
	// Explicit human consent to take or transfer control, demoting the current
	// controller to observer. There is no silent takeover without this
	Force bool `form:"force" json:"force" xml:"force"`
	// Target observer participant identifier for a transfer
	To *string `form:"to,omitempty" json:"to,omitempty" xml:"to,omitempty"`
}

TransferRequestBody is the type of the "display" service "transfer" endpoint HTTP request body.

func NewTransferRequestBody

func NewTransferRequestBody(p *display.DisplayControlPayload) *TransferRequestBody

NewTransferRequestBody builds the HTTP request body from the payload of the "transfer" endpoint of the "display" service.

type TransferResponseBody

type TransferResponseBody struct {
	// Controller after the transition, if any
	Controller *ParticipantResponseBody `form:"controller,omitempty" json:"controller,omitempty" xml:"controller,omitempty"`
	// Whether a controller was present before the transition
	WasHeld *bool `form:"was_held,omitempty" json:"was_held,omitempty" xml:"was_held,omitempty"`
	// True when release cleared the controller
	Released *bool `form:"released,omitempty" json:"released,omitempty" xml:"released,omitempty"`
}

TransferResponseBody is the type of the "display" service "transfer" endpoint HTTP response body.

Jump to

Keyboard shortcuts

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