Documentation
¶
Overview ¶
Package handlers provides HTTP request handlers for the Gate API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
Code string `json:"error_code"`
Message string `json:"error"`
RequestID string `json:"request_id"`
RetryAfterSeconds int `json:"retry_after_seconds,omitempty"`
}
ErrorResponse is the JSON body returned for all exchange failures.
type ExchangeHandler ¶
type ExchangeHandler struct {
// contains filtered or unexported fields
}
ExchangeHandler handles POST /api/v1/exchange requests.
func NewExchangeHandler ¶
func NewExchangeHandler(service sts.Exchanger) (*ExchangeHandler, error)
NewExchangeHandler creates an ExchangeHandler with the given STS service. It pulls a tracer and meters from the global OTel providers.
func (*ExchangeHandler) Exchange ¶
func (h *ExchangeHandler) Exchange(w http.ResponseWriter, r *http.Request)
Exchange delegates to the STS service and writes the response.
type ExchangeInput ¶
type ExchangeInput struct {
Body sts.ExchangeRequest `in:"body=json"`
}
ExchangeInput is the httpin-decoded input for the exchange endpoint.
type InfoHandler ¶
type InfoHandler struct{}
InfoHandler serves build and version information.
func (InfoHandler) GetInfo ¶
func (InfoHandler) GetInfo(w http.ResponseWriter, r *http.Request)
GetInfo writes build and version information as JSON.
type InfoResponse ¶
type InfoResponse struct {
FIPSEnabled bool `json:"fips_enabled"`
}
InfoResponse is the JSON body returned by the info endpoint.
Click to show internal directories.
Click to hide internal directories.