Documentation ¶
Overview ¶
Package remoteconfig provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.11.0 DO NOT EDIT.
Index ¶
- func GetSwagger() (swagger *openapi3.T, err error)
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
- func NewGetConfigRequest(server string) (*http.Request, error)
- func NewUpdateProviderConfigurationRequest(server string, body UpdateProviderConfigurationJSONRequestBody) (*http.Request, error)
- func NewUpdateProviderConfigurationRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- type ChiServerOptions
- type Client
- func (c *Client) GetConfig(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) UpdateProviderConfiguration(ctx context.Context, body UpdateProviderConfigurationJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UpdateProviderConfigurationWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) GetConfigWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetConfigResponse, error)
- func (c *ClientWithResponses) UpdateProviderConfigurationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*UpdateProviderConfigurationResponse, error)
- func (c *ClientWithResponses) UpdateProviderConfigurationWithResponse(ctx context.Context, body UpdateProviderConfigurationJSONRequestBody, ...) (*UpdateProviderConfigurationResponse, error)
- type ClientWithResponsesInterface
- type DeploymentConfigResponse
- type DeploymentConfiguration
- type GetConfigResponse
- type HttpRequestDoer
- type InvalidParamFormatError
- type MiddlewareFunc
- type NotificationsConfiguration
- type ProviderConfiguration
- type ProviderMap
- type RequestEditorFn
- type RequiredHeaderError
- type RequiredParamError
- type ServerInterface
- type ServerInterfaceWrapper
- type SlackConfiguration
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type UnmarshalingParamError
- type UpdateProviderConfigurationJSONRequestBody
- type UpdateProviderConfigurationResponse
- type UpdateProvidersRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSwagger ¶
GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.
func Handler ¶
func Handler(si ServerInterface) http.Handler
Handler creates http.Handler with routing matching OpenAPI spec.
func HandlerFromMux ¶
func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerFromMuxWithBaseURL ¶
func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
func NewGetConfigRequest ¶
NewGetConfigRequest generates requests for GetConfig
func NewUpdateProviderConfigurationRequest ¶
func NewUpdateProviderConfigurationRequest(server string, body UpdateProviderConfigurationJSONRequestBody) (*http.Request, error)
NewUpdateProviderConfigurationRequest calls the generic UpdateProviderConfiguration builder with application/json body
Types ¶
type ChiServerOptions ¶
type ChiServerOptions struct { BaseURL string BaseRouter chi.Router Middlewares []MiddlewareFunc ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) }
type Client ¶
type Client struct { // The endpoint of the server conforming to this interface, with scheme, // https://api.deepmap.com for example. This can contain a path relative // to the server, such as https://api.deepmap.com/dev-test, and all the // paths in the swagger spec will be appended to the server. Server string // Doer for performing requests, typically a *http.Client with any // customized settings, such as certificate chains. Client HttpRequestDoer // A list of callbacks for modifying requests which are generated before sending over // the network. RequestEditors []RequestEditorFn }
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) UpdateProviderConfiguration ¶
func (c *Client) UpdateProviderConfiguration(ctx context.Context, body UpdateProviderConfigurationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface { // GetConfig request GetConfig(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) // UpdateProviderConfiguration request with any body UpdateProviderConfigurationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) UpdateProviderConfiguration(ctx context.Context, body UpdateProviderConfigurationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) }
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) GetConfigWithResponse ¶
func (c *ClientWithResponses) GetConfigWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetConfigResponse, error)
GetConfigWithResponse request returning *GetConfigResponse
func (*ClientWithResponses) UpdateProviderConfigurationWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateProviderConfigurationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateProviderConfigurationResponse, error)
UpdateProviderConfigurationWithBodyWithResponse request with arbitrary body returning *UpdateProviderConfigurationResponse
func (*ClientWithResponses) UpdateProviderConfigurationWithResponse ¶
func (c *ClientWithResponses) UpdateProviderConfigurationWithResponse(ctx context.Context, body UpdateProviderConfigurationJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateProviderConfigurationResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // GetConfig request GetConfigWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetConfigResponse, error) // UpdateProviderConfiguration request with any body UpdateProviderConfigurationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateProviderConfigurationResponse, error) UpdateProviderConfigurationWithResponse(ctx context.Context, body UpdateProviderConfigurationJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateProviderConfigurationResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type DeploymentConfigResponse ¶
type DeploymentConfigResponse struct { // The configuration for a Common Fate deployment. DeploymentConfiguration DeploymentConfiguration `json:"deploymentConfiguration"` }
DeploymentConfigResponse defines model for DeploymentConfigResponse.
type DeploymentConfiguration ¶
type DeploymentConfiguration struct { // Notifications configuration for the deployment. NotificationsConfiguration NotificationsConfiguration `json:"notificationsConfiguration"` // Configuration of all Access Providers. ProviderConfiguration ProviderMap `json:"providerConfiguration"` }
The configuration for a Common Fate deployment.
type GetConfigResponse ¶
type GetConfigResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { // The configuration for a Common Fate deployment. DeploymentConfiguration DeploymentConfiguration `json:"deploymentConfiguration"` } }
func ParseGetConfigResponse ¶
func ParseGetConfigResponse(rsp *http.Response) (*GetConfigResponse, error)
ParseGetConfigResponse parses an HTTP response from a GetConfigWithResponse call
func (GetConfigResponse) Status ¶
func (r GetConfigResponse) Status() string
Status returns HTTPResponse.Status
func (GetConfigResponse) StatusCode ¶
func (r GetConfigResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type MiddlewareFunc ¶
type MiddlewareFunc func(http.HandlerFunc) http.HandlerFunc
type NotificationsConfiguration ¶
type NotificationsConfiguration struct { // The Slack notification configuration. Slack *SlackConfiguration `json:"slack,omitempty"` SlackIncomingWebhooks *map[string]map[string]string `json:"slackIncomingWebhooks,omitempty"` }
Notifications configuration for the deployment.
type ProviderConfiguration ¶
type ProviderConfiguration struct { Uses string `json:"uses"` With map[string]string `json:"with"` }
Configuration settings for an individual Access Provider.
type ProviderMap ¶
type ProviderMap struct {
AdditionalProperties map[string]ProviderConfiguration `json:"-"`
}
Configuration of all Access Providers.
func (ProviderMap) Get ¶
func (a ProviderMap) Get(fieldName string) (value ProviderConfiguration, found bool)
Getter for additional properties for ProviderMap. Returns the specified element and whether it was found
func (ProviderMap) MarshalJSON ¶
func (a ProviderMap) MarshalJSON() ([]byte, error)
Override default JSON handling for ProviderMap to handle AdditionalProperties
func (*ProviderMap) Set ¶
func (a *ProviderMap) Set(fieldName string, value ProviderConfiguration)
Setter for additional properties for ProviderMap
func (*ProviderMap) UnmarshalJSON ¶
func (a *ProviderMap) UnmarshalJSON(b []byte) error
Override default JSON handling for ProviderMap to handle AdditionalProperties
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type RequiredHeaderError ¶
func (*RequiredHeaderError) Error ¶
func (e *RequiredHeaderError) Error() string
func (*RequiredHeaderError) Unwrap ¶
func (e *RequiredHeaderError) Unwrap() error
type RequiredParamError ¶
type RequiredParamError struct {
ParamName string
}
func (*RequiredParamError) Error ¶
func (e *RequiredParamError) Error() string
type ServerInterface ¶
type ServerInterface interface { // Get Deployment Configuration // (GET /api/v1/config) GetConfig(w http.ResponseWriter, r *http.Request) // Update Access Provider configuration // (PUT /api/v1/config/providers) UpdateProviderConfiguration(w http.ResponseWriter, r *http.Request) }
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct { Handler ServerInterface HandlerMiddlewares []MiddlewareFunc ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) }
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) GetConfig ¶
func (siw *ServerInterfaceWrapper) GetConfig(w http.ResponseWriter, r *http.Request)
GetConfig operation middleware
func (*ServerInterfaceWrapper) UpdateProviderConfiguration ¶
func (siw *ServerInterfaceWrapper) UpdateProviderConfiguration(w http.ResponseWriter, r *http.Request)
UpdateProviderConfiguration operation middleware
type SlackConfiguration ¶
type SlackConfiguration struct { // The Slack API token. Should be a reference to secret in `awsssm://` format. ApiToken string `json:"apiToken"` }
The Slack notification configuration.
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error
type UpdateProviderConfigurationJSONRequestBody ¶
type UpdateProviderConfigurationJSONRequestBody UpdateProvidersRequest
UpdateProviderConfigurationJSONRequestBody defines body for UpdateProviderConfiguration for application/json ContentType.
type UpdateProviderConfigurationResponse ¶
func ParseUpdateProviderConfigurationResponse ¶
func ParseUpdateProviderConfigurationResponse(rsp *http.Response) (*UpdateProviderConfigurationResponse, error)
ParseUpdateProviderConfigurationResponse parses an HTTP response from a UpdateProviderConfigurationWithResponse call
func (UpdateProviderConfigurationResponse) Status ¶
func (r UpdateProviderConfigurationResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateProviderConfigurationResponse) StatusCode ¶
func (r UpdateProviderConfigurationResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdateProvidersRequest ¶
type UpdateProvidersRequest struct { // Configuration of all Access Providers. ProviderConfiguration ProviderMap `json:"providerConfiguration"` }
UpdateProvidersRequest defines model for UpdateProvidersRequest.