Documentation
¶
Index ¶
- func AttachAgentPath(name string) string
- func BuildAttachPayload(agentAttachBody string, agentAttachName string, agentAttachNamespace string) (*agent.AgentAttachPayload, error)
- func BuildReleasePayload(agentReleaseName string, agentReleaseNamespace string, ...) (*agent.ReleasePayload, error)
- func BuildRenewPayload(agentRenewName string, agentRenewNamespace string, agentRenewSessionID string) (*agent.RenewPayload, error)
- func BuildStatusPayload(agentStatusName string, agentStatusNamespace string) (*agent.StatusPayload, error)
- func DecodeAttachResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)
- func DecodeReleaseResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)
- func DecodeRenewResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)
- func DecodeStatusResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)
- func EncodeAttachRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error
- func EncodeReleaseRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error
- func EncodeRenewRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error
- func EncodeStatusRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error
- func NewAttachAgentTicketOK(body *AttachResponseBody) *agentviews.AgentTicketView
- func NewAttachForbidden(body string) agent.Forbidden
- func NewAttachInvalid(body string) agent.Invalid
- func NewAttachNotFound(body string) agent.NotFound
- func NewAttachUnauthorized(body string) agent.Unauthorized
- func NewReleaseAgentReleaseOK(body *ReleaseResponseBody) *agentviews.AgentReleaseView
- func NewReleaseForbidden(body string) agent.Forbidden
- func NewReleaseNotFound(body string) agent.NotFound
- func NewReleaseUnauthorized(body string) agent.Unauthorized
- func NewRenewAgentRenewOK(body *RenewResponseBody) *agentviews.AgentRenewView
- func NewRenewForbidden(body string) agent.Forbidden
- func NewRenewNotFound(body string) agent.NotFound
- func NewRenewUnauthorized(body string) agent.Unauthorized
- func NewStatusAgentStatusOK(body *StatusResponseBody) *agentviews.AgentStatusView
- func NewStatusForbidden(body string) agent.Forbidden
- func NewStatusNotFound(body string) agent.NotFound
- func NewStatusUnauthorized(body string) agent.Unauthorized
- func ReleaseAgentPath(name string) string
- func RenewAgentPath(name string) string
- func StatusAgentPath(name string) string
- type AttachRequestBody
- type AttachResponseBody
- type Client
- func (c *Client) Attach() goa.Endpoint
- func (c *Client) BuildAttachRequest(ctx context.Context, v any) (*http.Request, error)
- func (c *Client) BuildReleaseRequest(ctx context.Context, v any) (*http.Request, error)
- func (c *Client) BuildRenewRequest(ctx context.Context, v any) (*http.Request, error)
- func (c *Client) BuildStatusRequest(ctx context.Context, v any) (*http.Request, error)
- func (c *Client) Release() goa.Endpoint
- func (c *Client) Renew() goa.Endpoint
- func (c *Client) Status() goa.Endpoint
- type ReleaseResponseBody
- type RenewResponseBody
- type StatusResponseBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttachAgentPath ¶
AttachAgentPath returns the URL path to the agent service attach HTTP endpoint.
func BuildAttachPayload ¶
func BuildAttachPayload(agentAttachBody string, agentAttachName string, agentAttachNamespace string) (*agent.AgentAttachPayload, error)
BuildAttachPayload builds the payload for the agent attach endpoint from CLI flags.
func BuildReleasePayload ¶
func BuildReleasePayload(agentReleaseName string, agentReleaseNamespace string, agentReleaseSessionID string) (*agent.ReleasePayload, error)
BuildReleasePayload builds the payload for the agent release endpoint from CLI flags.
func BuildRenewPayload ¶
func BuildRenewPayload(agentRenewName string, agentRenewNamespace string, agentRenewSessionID string) (*agent.RenewPayload, error)
BuildRenewPayload builds the payload for the agent renew endpoint from CLI flags.
func BuildStatusPayload ¶
func BuildStatusPayload(agentStatusName string, agentStatusNamespace string) (*agent.StatusPayload, error)
BuildStatusPayload builds the payload for the agent status endpoint from CLI flags.
func DecodeAttachResponse ¶
func DecodeAttachResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)
DecodeAttachResponse returns a decoder for responses returned by the agent attach endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeAttachResponse may return the following errors:
- "forbidden" (type agent.Forbidden): http.StatusForbidden
- "invalid" (type agent.Invalid): http.StatusBadRequest
- "not_found" (type agent.NotFound): http.StatusNotFound
- "unauthorized" (type agent.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 agent release endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeReleaseResponse may return the following errors:
- "forbidden" (type agent.Forbidden): http.StatusForbidden
- "not_found" (type agent.NotFound): http.StatusNotFound
- "unauthorized" (type agent.Unauthorized): http.StatusUnauthorized
- error: internal error
func DecodeRenewResponse ¶
func DecodeRenewResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)
DecodeRenewResponse returns a decoder for responses returned by the agent renew endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeRenewResponse may return the following errors:
- "forbidden" (type agent.Forbidden): http.StatusForbidden
- "not_found" (type agent.NotFound): http.StatusNotFound
- "unauthorized" (type agent.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 agent status endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeStatusResponse may return the following errors:
- "forbidden" (type agent.Forbidden): http.StatusForbidden
- "not_found" (type agent.NotFound): http.StatusNotFound
- "unauthorized" (type agent.Unauthorized): http.StatusUnauthorized
- error: internal error
func EncodeAttachRequest ¶
func EncodeAttachRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error
EncodeAttachRequest returns an encoder for requests sent to the agent attach 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 agent release server.
func EncodeRenewRequest ¶
EncodeRenewRequest returns an encoder for requests sent to the agent renew 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 agent status server.
func NewAttachAgentTicketOK ¶
func NewAttachAgentTicketOK(body *AttachResponseBody) *agentviews.AgentTicketView
NewAttachAgentTicketOK builds a "agent" service "attach" endpoint result from a HTTP "OK" response.
func NewAttachForbidden ¶
NewAttachForbidden builds a agent service attach endpoint forbidden error.
func NewAttachInvalid ¶
NewAttachInvalid builds a agent service attach endpoint invalid error.
func NewAttachNotFound ¶
NewAttachNotFound builds a agent service attach endpoint not_found error.
func NewAttachUnauthorized ¶
func NewAttachUnauthorized(body string) agent.Unauthorized
NewAttachUnauthorized builds a agent service attach endpoint unauthorized error.
func NewReleaseAgentReleaseOK ¶
func NewReleaseAgentReleaseOK(body *ReleaseResponseBody) *agentviews.AgentReleaseView
NewReleaseAgentReleaseOK builds a "agent" service "release" endpoint result from a HTTP "OK" response.
func NewReleaseForbidden ¶
NewReleaseForbidden builds a agent service release endpoint forbidden error.
func NewReleaseNotFound ¶
NewReleaseNotFound builds a agent service release endpoint not_found error.
func NewReleaseUnauthorized ¶
func NewReleaseUnauthorized(body string) agent.Unauthorized
NewReleaseUnauthorized builds a agent service release endpoint unauthorized error.
func NewRenewAgentRenewOK ¶
func NewRenewAgentRenewOK(body *RenewResponseBody) *agentviews.AgentRenewView
NewRenewAgentRenewOK builds a "agent" service "renew" endpoint result from a HTTP "OK" response.
func NewRenewForbidden ¶
NewRenewForbidden builds a agent service renew endpoint forbidden error.
func NewRenewNotFound ¶
NewRenewNotFound builds a agent service renew endpoint not_found error.
func NewRenewUnauthorized ¶
func NewRenewUnauthorized(body string) agent.Unauthorized
NewRenewUnauthorized builds a agent service renew endpoint unauthorized error.
func NewStatusAgentStatusOK ¶
func NewStatusAgentStatusOK(body *StatusResponseBody) *agentviews.AgentStatusView
NewStatusAgentStatusOK builds a "agent" service "status" endpoint result from a HTTP "OK" response.
func NewStatusForbidden ¶
NewStatusForbidden builds a agent service status endpoint forbidden error.
func NewStatusNotFound ¶
NewStatusNotFound builds a agent service status endpoint not_found error.
func NewStatusUnauthorized ¶
func NewStatusUnauthorized(body string) agent.Unauthorized
NewStatusUnauthorized builds a agent service status endpoint unauthorized error.
func ReleaseAgentPath ¶
ReleaseAgentPath returns the URL path to the agent service release HTTP endpoint.
func RenewAgentPath ¶
RenewAgentPath returns the URL path to the agent service renew HTTP endpoint.
func StatusAgentPath ¶
StatusAgentPath returns the URL path to the agent service status HTTP endpoint.
Types ¶
type AttachRequestBody ¶
type AttachRequestBody struct {
// Viewer-chosen participant label, echoed in session records. Not an
// authorization boundary
Participant *string `form:"participant,omitempty" json:"participant,omitempty" xml:"participant,omitempty"`
}
AttachRequestBody is the type of the "agent" service "attach" endpoint HTTP request body.
func NewAttachRequestBody ¶
func NewAttachRequestBody(p *agent.AgentAttachPayload) *AttachRequestBody
NewAttachRequestBody builds the HTTP request body from the payload of the "attach" endpoint of the "agent" service.
type AttachResponseBody ¶
type AttachResponseBody struct {
// Opaque server-side session identifier for renew/release correlation. Never
// sent to the guest
ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
// Signed bearer ticket (id.payload.signature) to present in the agent attach
// message
Ticket *string `form:"ticket,omitempty" json:"ticket,omitempty" xml:"ticket,omitempty"`
// Ticket/session lifetime in milliseconds; renew at half of it
TTLMs *int `form:"ttl_ms,omitempty" json:"ttl_ms,omitempty" xml:"ttl_ms,omitempty"`
// Agent ticket/API revision
Protocol *int `form:"protocol,omitempty" json:"protocol,omitempty" xml:"protocol,omitempty"`
}
AttachResponseBody is the type of the "agent" service "attach" endpoint HTTP response body.
type Client ¶
type Client struct {
// Attach Doer is the HTTP client used to make requests to the attach endpoint.
AttachDoer goahttp.Doer
// Renew Doer is the HTTP client used to make requests to the renew endpoint.
RenewDoer goahttp.Doer
// Status Doer is the HTTP client used to make requests to the status endpoint.
StatusDoer goahttp.Doer
// Release Doer is the HTTP client used to make requests to the release
// endpoint.
ReleaseDoer 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 agent 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 agent service servers.
func (*Client) Attach ¶
Attach returns an endpoint that makes HTTP requests to the agent service attach server.
func (*Client) BuildAttachRequest ¶
BuildAttachRequest instantiates a HTTP request object with method and path set to call the "agent" service "attach" endpoint
func (*Client) BuildReleaseRequest ¶
BuildReleaseRequest instantiates a HTTP request object with method and path set to call the "agent" service "release" endpoint
func (*Client) BuildRenewRequest ¶
BuildRenewRequest instantiates a HTTP request object with method and path set to call the "agent" service "renew" endpoint
func (*Client) BuildStatusRequest ¶
BuildStatusRequest instantiates a HTTP request object with method and path set to call the "agent" service "status" endpoint
func (*Client) Release ¶
Release returns an endpoint that makes HTTP requests to the agent service release server.
type ReleaseResponseBody ¶
type ReleaseResponseBody struct {
// Whether the session is gone (unknown ids report ok: best-effort release)
OK *bool `form:"ok,omitempty" json:"ok,omitempty" xml:"ok,omitempty"`
}
ReleaseResponseBody is the type of the "agent" service "release" endpoint HTTP response body.
type RenewResponseBody ¶
type RenewResponseBody struct {
// Renewed lifetime in milliseconds
TTLMs *int `form:"ttl_ms,omitempty" json:"ttl_ms,omitempty" xml:"ttl_ms,omitempty"`
// Agent ticket/API revision
Protocol *int `form:"protocol,omitempty" json:"protocol,omitempty" xml:"protocol,omitempty"`
}
RenewResponseBody is the type of the "agent" service "renew" endpoint HTTP response body.
type StatusResponseBody ¶
type StatusResponseBody struct {
// Whether at least one live agent session is bound to this workspace
Active *bool `form:"active,omitempty" json:"active,omitempty" xml:"active,omitempty"`
// Live (unexpired) session count for this workspace
Sessions *int `form:"sessions,omitempty" json:"sessions,omitempty" xml:"sessions,omitempty"`
// Agent ticket/API revision
Protocol *int `form:"protocol,omitempty" json:"protocol,omitempty" xml:"protocol,omitempty"`
}
StatusResponseBody is the type of the "agent" service "status" endpoint HTTP response body.