From 562cabeaa8424d1fdc5be6d301f57ca0cba92d5a Mon Sep 17 00:00:00 2001 From: aeneasr <3372410+aeneasr@users.noreply.github.com> Date: Sat, 10 Sep 2022 11:38:52 +0200 Subject: [PATCH] chore: format --- cmd/root.go | 8 +++-- internal/httpclient/client/api/api_client.go | 31 ++++++++++--------- .../client/api/decisions_parameters.go | 8 +++-- .../client/api/decisions_responses.go | 15 ++++++--- .../client/api/get_rule_parameters.go | 8 +++-- .../client/api/get_rule_responses.go | 9 ++++-- .../client/api/get_version_parameters.go | 8 +++-- .../client/api/get_version_responses.go | 3 +- ...get_well_known_json_web_keys_parameters.go | 8 +++-- .../get_well_known_json_web_keys_responses.go | 6 ++-- .../api/is_instance_alive_parameters.go | 8 +++-- .../client/api/is_instance_alive_responses.go | 6 ++-- .../api/is_instance_ready_parameters.go | 8 +++-- .../client/api/is_instance_ready_responses.go | 6 ++-- .../client/api/list_rules_parameters.go | 8 +++-- .../client/api/list_rules_responses.go | 6 ++-- 16 files changed, 91 insertions(+), 55 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index 7c0ccc1f23..88bf3d8dd4 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -22,12 +22,14 @@ package cmd import ( "fmt" + "os" + "runtime" + + "github.com/spf13/cobra" + _ "github.com/ory/jsonschema/v3/fileloader" _ "github.com/ory/jsonschema/v3/httploader" "github.com/ory/x/configx" - "github.com/spf13/cobra" - "os" - "runtime" ) // RootCmd represents the base command when called without any subcommands diff --git a/internal/httpclient/client/api/api_client.go b/internal/httpclient/client/api/api_client.go index 68f716e7dc..0c85c1c592 100644 --- a/internal/httpclient/client/api/api_client.go +++ b/internal/httpclient/client/api/api_client.go @@ -48,9 +48,9 @@ type ClientService interface { } /* - Decisions accesses control decision API + Decisions accesses control decision API - > This endpoint works with all HTTP Methods (GET, POST, PUT, ...) and matches every path prefixed with /decision. + > This endpoint works with all HTTP Methods (GET, POST, PUT, ...) and matches every path prefixed with /decision. This endpoint mirrors the proxy capability of ORY Oathkeeper's proxy functionality but instead of forwarding the request to the upstream server, returns 200 (request should be allowed), 401 (unauthorized), or 403 (forbidden) @@ -92,9 +92,9 @@ func (a *Client) Decisions(params *DecisionsParams, opts ...ClientOption) (*Deci } /* - GetRule retrieves a rule +GetRule retrieves a rule - Use this method to retrieve a rule from the storage. If it does not exist you will receive a 404 error. +Use this method to retrieve a rule from the storage. If it does not exist you will receive a 404 error. */ func (a *Client) GetRule(params *GetRuleParams, opts ...ClientOption) (*GetRuleOK, error) { // TODO: Validate the params before sending @@ -132,9 +132,9 @@ func (a *Client) GetRule(params *GetRuleParams, opts ...ClientOption) (*GetRuleO } /* - GetVersion gets service version + GetVersion gets service version - This endpoint returns the service version typically notated using semantic versioning. + This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. @@ -178,9 +178,9 @@ func (a *Client) GetVersion(params *GetVersionParams, opts ...ClientOption) (*Ge } /* - GetWellKnownJSONWebKeys lists cryptographic keys +GetWellKnownJSONWebKeys lists cryptographic keys - This endpoint returns cryptographic keys that are required to, for example, verify signatures of ID Tokens. +This endpoint returns cryptographic keys that are required to, for example, verify signatures of ID Tokens. */ func (a *Client) GetWellKnownJSONWebKeys(params *GetWellKnownJSONWebKeysParams, opts ...ClientOption) (*GetWellKnownJSONWebKeysOK, error) { // TODO: Validate the params before sending @@ -218,9 +218,10 @@ func (a *Client) GetWellKnownJSONWebKeys(params *GetWellKnownJSONWebKeysParams, } /* - IsInstanceAlive checks alive status + IsInstanceAlive checks alive status + + This endpoint returns a 200 status code when the HTTP server is up running. - This endpoint returns a 200 status code when the HTTP server is up running. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the @@ -265,9 +266,10 @@ func (a *Client) IsInstanceAlive(params *IsInstanceAliveParams, opts ...ClientOp } /* - IsInstanceReady checks readiness status + IsInstanceReady checks readiness status + + This endpoint returns a 200 status code when the HTTP server is up running and the environment dependencies (e.g. - This endpoint returns a 200 status code when the HTTP server is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the @@ -312,9 +314,10 @@ func (a *Client) IsInstanceReady(params *IsInstanceReadyParams, opts ...ClientOp } /* - ListRules lists all rules + ListRules lists all rules + + This method returns an array of all rules that are stored in the backend. This is useful if you want to get a full - This method returns an array of all rules that are stored in the backend. This is useful if you want to get a full view of what rules you have currently in place. */ func (a *Client) ListRules(params *ListRulesParams, opts ...ClientOption) (*ListRulesOK, error) { diff --git a/internal/httpclient/client/api/decisions_parameters.go b/internal/httpclient/client/api/decisions_parameters.go index c14089e2ce..6950d28a66 100644 --- a/internal/httpclient/client/api/decisions_parameters.go +++ b/internal/httpclient/client/api/decisions_parameters.go @@ -52,10 +52,12 @@ func NewDecisionsParamsWithHTTPClient(client *http.Client) *DecisionsParams { } } -/* DecisionsParams contains all the parameters to send to the API endpoint - for the decisions operation. +/* +DecisionsParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the decisions operation. + + Typically these are written to a http.Request. */ type DecisionsParams struct { timeout time.Duration diff --git a/internal/httpclient/client/api/decisions_responses.go b/internal/httpclient/client/api/decisions_responses.go index 628e6ab110..9819ecaec4 100644 --- a/internal/httpclient/client/api/decisions_responses.go +++ b/internal/httpclient/client/api/decisions_responses.go @@ -63,7 +63,8 @@ func NewDecisionsOK() *DecisionsOK { return &DecisionsOK{} } -/* DecisionsOK describes a response with status code 200, with default header values. +/* + DecisionsOK describes a response with status code 200, with default header values. An empty response */ @@ -113,7 +114,8 @@ func NewDecisionsUnauthorized() *DecisionsUnauthorized { return &DecisionsUnauthorized{} } -/* DecisionsUnauthorized describes a response with status code 401, with default header values. +/* + DecisionsUnauthorized describes a response with status code 401, with default header values. genericError */ @@ -175,7 +177,8 @@ func NewDecisionsForbidden() *DecisionsForbidden { return &DecisionsForbidden{} } -/* DecisionsForbidden describes a response with status code 403, with default header values. +/* + DecisionsForbidden describes a response with status code 403, with default header values. genericError */ @@ -237,7 +240,8 @@ func NewDecisionsNotFound() *DecisionsNotFound { return &DecisionsNotFound{} } -/* DecisionsNotFound describes a response with status code 404, with default header values. +/* + DecisionsNotFound describes a response with status code 404, with default header values. genericError */ @@ -299,7 +303,8 @@ func NewDecisionsInternalServerError() *DecisionsInternalServerError { return &DecisionsInternalServerError{} } -/* DecisionsInternalServerError describes a response with status code 500, with default header values. +/* + DecisionsInternalServerError describes a response with status code 500, with default header values. genericError */ diff --git a/internal/httpclient/client/api/get_rule_parameters.go b/internal/httpclient/client/api/get_rule_parameters.go index f4d8bdd78a..cb20665919 100644 --- a/internal/httpclient/client/api/get_rule_parameters.go +++ b/internal/httpclient/client/api/get_rule_parameters.go @@ -52,10 +52,12 @@ func NewGetRuleParamsWithHTTPClient(client *http.Client) *GetRuleParams { } } -/* GetRuleParams contains all the parameters to send to the API endpoint - for the get rule operation. +/* +GetRuleParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the get rule operation. + + Typically these are written to a http.Request. */ type GetRuleParams struct { diff --git a/internal/httpclient/client/api/get_rule_responses.go b/internal/httpclient/client/api/get_rule_responses.go index 42b5fb8ad0..fc03ffcc99 100644 --- a/internal/httpclient/client/api/get_rule_responses.go +++ b/internal/httpclient/client/api/get_rule_responses.go @@ -51,7 +51,8 @@ func NewGetRuleOK() *GetRuleOK { return &GetRuleOK{} } -/* GetRuleOK describes a response with status code 200, with default header values. +/* + GetRuleOK describes a response with status code 200, with default header values. A rule */ @@ -113,7 +114,8 @@ func NewGetRuleNotFound() *GetRuleNotFound { return &GetRuleNotFound{} } -/* GetRuleNotFound describes a response with status code 404, with default header values. +/* + GetRuleNotFound describes a response with status code 404, with default header values. genericError */ @@ -175,7 +177,8 @@ func NewGetRuleInternalServerError() *GetRuleInternalServerError { return &GetRuleInternalServerError{} } -/* GetRuleInternalServerError describes a response with status code 500, with default header values. +/* + GetRuleInternalServerError describes a response with status code 500, with default header values. genericError */ diff --git a/internal/httpclient/client/api/get_version_parameters.go b/internal/httpclient/client/api/get_version_parameters.go index 8391443439..cc91b5a58b 100644 --- a/internal/httpclient/client/api/get_version_parameters.go +++ b/internal/httpclient/client/api/get_version_parameters.go @@ -52,10 +52,12 @@ func NewGetVersionParamsWithHTTPClient(client *http.Client) *GetVersionParams { } } -/* GetVersionParams contains all the parameters to send to the API endpoint - for the get version operation. +/* +GetVersionParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the get version operation. + + Typically these are written to a http.Request. */ type GetVersionParams struct { timeout time.Duration diff --git a/internal/httpclient/client/api/get_version_responses.go b/internal/httpclient/client/api/get_version_responses.go index e9f3834d7b..de92143f3e 100644 --- a/internal/httpclient/client/api/get_version_responses.go +++ b/internal/httpclient/client/api/get_version_responses.go @@ -39,7 +39,8 @@ func NewGetVersionOK() *GetVersionOK { return &GetVersionOK{} } -/* GetVersionOK describes a response with status code 200, with default header values. +/* + GetVersionOK describes a response with status code 200, with default header values. version */ diff --git a/internal/httpclient/client/api/get_well_known_json_web_keys_parameters.go b/internal/httpclient/client/api/get_well_known_json_web_keys_parameters.go index 774e913633..eb69470d96 100644 --- a/internal/httpclient/client/api/get_well_known_json_web_keys_parameters.go +++ b/internal/httpclient/client/api/get_well_known_json_web_keys_parameters.go @@ -52,10 +52,12 @@ func NewGetWellKnownJSONWebKeysParamsWithHTTPClient(client *http.Client) *GetWel } } -/* GetWellKnownJSONWebKeysParams contains all the parameters to send to the API endpoint - for the get well known JSON web keys operation. +/* +GetWellKnownJSONWebKeysParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the get well known JSON web keys operation. + + Typically these are written to a http.Request. */ type GetWellKnownJSONWebKeysParams struct { timeout time.Duration diff --git a/internal/httpclient/client/api/get_well_known_json_web_keys_responses.go b/internal/httpclient/client/api/get_well_known_json_web_keys_responses.go index cfa2487e0b..a50ad00962 100644 --- a/internal/httpclient/client/api/get_well_known_json_web_keys_responses.go +++ b/internal/httpclient/client/api/get_well_known_json_web_keys_responses.go @@ -45,7 +45,8 @@ func NewGetWellKnownJSONWebKeysOK() *GetWellKnownJSONWebKeysOK { return &GetWellKnownJSONWebKeysOK{} } -/* GetWellKnownJSONWebKeysOK describes a response with status code 200, with default header values. +/* + GetWellKnownJSONWebKeysOK describes a response with status code 200, with default header values. jsonWebKeySet */ @@ -107,7 +108,8 @@ func NewGetWellKnownJSONWebKeysInternalServerError() *GetWellKnownJSONWebKeysInt return &GetWellKnownJSONWebKeysInternalServerError{} } -/* GetWellKnownJSONWebKeysInternalServerError describes a response with status code 500, with default header values. +/* + GetWellKnownJSONWebKeysInternalServerError describes a response with status code 500, with default header values. genericError */ diff --git a/internal/httpclient/client/api/is_instance_alive_parameters.go b/internal/httpclient/client/api/is_instance_alive_parameters.go index 78943c489f..0718f0f274 100644 --- a/internal/httpclient/client/api/is_instance_alive_parameters.go +++ b/internal/httpclient/client/api/is_instance_alive_parameters.go @@ -52,10 +52,12 @@ func NewIsInstanceAliveParamsWithHTTPClient(client *http.Client) *IsInstanceAliv } } -/* IsInstanceAliveParams contains all the parameters to send to the API endpoint - for the is instance alive operation. +/* +IsInstanceAliveParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the is instance alive operation. + + Typically these are written to a http.Request. */ type IsInstanceAliveParams struct { timeout time.Duration diff --git a/internal/httpclient/client/api/is_instance_alive_responses.go b/internal/httpclient/client/api/is_instance_alive_responses.go index 3502acf7a2..5ceea9faa3 100644 --- a/internal/httpclient/client/api/is_instance_alive_responses.go +++ b/internal/httpclient/client/api/is_instance_alive_responses.go @@ -45,7 +45,8 @@ func NewIsInstanceAliveOK() *IsInstanceAliveOK { return &IsInstanceAliveOK{} } -/* IsInstanceAliveOK describes a response with status code 200, with default header values. +/* + IsInstanceAliveOK describes a response with status code 200, with default header values. healthStatus */ @@ -107,7 +108,8 @@ func NewIsInstanceAliveInternalServerError() *IsInstanceAliveInternalServerError return &IsInstanceAliveInternalServerError{} } -/* IsInstanceAliveInternalServerError describes a response with status code 500, with default header values. +/* + IsInstanceAliveInternalServerError describes a response with status code 500, with default header values. genericError */ diff --git a/internal/httpclient/client/api/is_instance_ready_parameters.go b/internal/httpclient/client/api/is_instance_ready_parameters.go index bf3a8a9b34..459fac0ff0 100644 --- a/internal/httpclient/client/api/is_instance_ready_parameters.go +++ b/internal/httpclient/client/api/is_instance_ready_parameters.go @@ -52,10 +52,12 @@ func NewIsInstanceReadyParamsWithHTTPClient(client *http.Client) *IsInstanceRead } } -/* IsInstanceReadyParams contains all the parameters to send to the API endpoint - for the is instance ready operation. +/* +IsInstanceReadyParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the is instance ready operation. + + Typically these are written to a http.Request. */ type IsInstanceReadyParams struct { timeout time.Duration diff --git a/internal/httpclient/client/api/is_instance_ready_responses.go b/internal/httpclient/client/api/is_instance_ready_responses.go index d5633c3312..5adb780477 100644 --- a/internal/httpclient/client/api/is_instance_ready_responses.go +++ b/internal/httpclient/client/api/is_instance_ready_responses.go @@ -45,7 +45,8 @@ func NewIsInstanceReadyOK() *IsInstanceReadyOK { return &IsInstanceReadyOK{} } -/* IsInstanceReadyOK describes a response with status code 200, with default header values. +/* + IsInstanceReadyOK describes a response with status code 200, with default header values. healthStatus */ @@ -107,7 +108,8 @@ func NewIsInstanceReadyServiceUnavailable() *IsInstanceReadyServiceUnavailable { return &IsInstanceReadyServiceUnavailable{} } -/* IsInstanceReadyServiceUnavailable describes a response with status code 503, with default header values. +/* + IsInstanceReadyServiceUnavailable describes a response with status code 503, with default header values. healthNotReadyStatus */ diff --git a/internal/httpclient/client/api/list_rules_parameters.go b/internal/httpclient/client/api/list_rules_parameters.go index c9dfe18d4e..3bf4624d07 100644 --- a/internal/httpclient/client/api/list_rules_parameters.go +++ b/internal/httpclient/client/api/list_rules_parameters.go @@ -53,10 +53,12 @@ func NewListRulesParamsWithHTTPClient(client *http.Client) *ListRulesParams { } } -/* ListRulesParams contains all the parameters to send to the API endpoint - for the list rules operation. +/* +ListRulesParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the list rules operation. + + Typically these are written to a http.Request. */ type ListRulesParams struct { diff --git a/internal/httpclient/client/api/list_rules_responses.go b/internal/httpclient/client/api/list_rules_responses.go index 8918859d7b..1187992bd3 100644 --- a/internal/httpclient/client/api/list_rules_responses.go +++ b/internal/httpclient/client/api/list_rules_responses.go @@ -45,7 +45,8 @@ func NewListRulesOK() *ListRulesOK { return &ListRulesOK{} } -/* ListRulesOK describes a response with status code 200, with default header values. +/* + ListRulesOK describes a response with status code 200, with default header values. A list of rules */ @@ -105,7 +106,8 @@ func NewListRulesInternalServerError() *ListRulesInternalServerError { return &ListRulesInternalServerError{} } -/* ListRulesInternalServerError describes a response with status code 500, with default header values. +/* + ListRulesInternalServerError describes a response with status code 500, with default header values. genericError */