Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(client): Reduce SQL boilerplate code #1758

Merged
merged 21 commits into from
Mar 14, 2020
59 changes: 21 additions & 38 deletions docs/api.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -1814,16 +1814,17 @@
},
"definitions": {
"JSONRawMessage": {
"description": "JSONRawMessage JSONRawMessage JSONRawMessage JSONRawMessage JSONRawMessage JSON raw message",
"type": "object"
},
"JSONWebKey": {
"description": "JSONWebKey JSONWebKey It is important that this model object is named JSONWebKey for\n\"swagger generate spec\" to generate only on definition of a\nJSONWebKey.",
"description": "It is important that this model object is named JSONWebKey for\n\"swagger generate spec\" to generate only on definition of a\nJSONWebKey.",
"type": "object",
"required": [
"use",
"kty",
"alg",
"kid",
"alg"
"kty",
"use"
],
"properties": {
"alg": {
Expand All @@ -1832,32 +1833,26 @@
"example": "RS256"
},
"crv": {
"description": "crv",
"type": "string",
"example": "P-256"
},
"d": {
"description": "d",
"type": "string",
"example": "T_N8I-6He3M8a7X1vWt6TGIx4xB_GP3Mb4SsZSA4v-orvJzzRiQhLlRR81naWYxfQAYt5isDI6_C2L9bdWo4FFPjGQFvNoRX-_sBJyBI_rl-TBgsZYoUlAj3J92WmY2inbA-PwyJfsaIIDceYBC-eX-xiCu6qMqkZi3MwQAFL6bMdPEM0z4JBcwFT3VdiWAIRUuACWQwrXMq672x7fMuaIaHi7XDGgt1ith23CLfaREmJku9PQcchbt_uEY-hqrFY6ntTtS4paWWQj86xLL94S-Tf6v6xkL918PfLSOTq6XCzxvlFwzBJqApnAhbwqLjpPhgUG04EDRrqrSBc5Y1BLevn6Ip5h1AhessBp3wLkQgz_roeckt-ybvzKTjESMuagnpqLvOT7Y9veIug2MwPJZI2VjczRc1vzMs25XrFQ8DpUy-bNdp89TmvAXwctUMiJdgHloJw23Cv03gIUAkDnsTqZmkpbIf-crpgNKFmQP_EDKoe8p_PXZZgfbRri3NoEVGP7Mk6yEu8LjJhClhZaBNjuWw2-KlBfOA3g79mhfBnkInee5KO9mGR50qPk1V-MorUYNTFMZIm0kFE6eYVWFBwJHLKYhHU34DoiK1VP-svZpC2uAMFNA_UJEwM9CQ2b8qe4-5e9aywMvwcuArRkAB5mBIfOaOJao3mfukKAE"
},
"dp": {
"description": "dp",
"type": "string",
"example": "G4sPXkc6Ya9y8oJW9_ILj4xuppu0lzi_H7VTkS8xj5SdX3coE0oimYwxIi2emTAue0UOa5dpgFGyBJ4c8tQ2VF402XRugKDTP8akYhFo5tAA77Qe_NmtuYZc3C3m3I24G2GvR5sSDxUyAN2zq8Lfn9EUms6rY3Ob8YeiKkTiBj0"
},
"dq": {
"description": "dq",
"type": "string",
"example": "s9lAH9fggBsoFR8Oac2R_E2gw282rT2kGOAhvIllETE1efrA6huUUvMfBcMpn8lqeW6vzznYY5SSQF7pMdC_agI3nG8Ibp1BUb0JUiraRNqUfLhcQb_d9GF4Dh7e74WbRsobRonujTYN1xCaP6TO61jvWrX-L18txXw494Q_cgk"
},
"e": {
"description": "e",
"type": "string",
"example": "AQAB"
},
"k": {
"description": "k",
"type": "string",
"example": "GawgguFyGrWKav7AX4VKUg"
},
Expand All @@ -1872,22 +1867,18 @@
"example": "RSA"
},
"n": {
"description": "n",
"type": "string",
"example": "vTqrxUyQPl_20aqf5kXHwDZrel-KovIp8s7ewJod2EXHl8tWlRB3_Rem34KwBfqlKQGp1nqah-51H4Jzruqe0cFP58hPEIt6WqrvnmJCXxnNuIB53iX_uUUXXHDHBeaPCSRoNJzNysjoJ30TIUsKBiirhBa7f235PXbKiHducLevV6PcKxJ5cY8zO286qJLBWSPm-OIevwqsIsSIH44Qtm9sioFikhkbLwoqwWORGAY0nl6XvVOlhADdLjBSqSAeT1FPuCDCnXwzCDR8N9IFB_IjdStFkC-rVt2K5BYfPd0c3yFp_vHR15eRd0zJ8XQ7woBC8Vnsac6Et1pKS59pX6256DPWu8UDdEOolKAPgcd_g2NpA76cAaF_jcT80j9KrEzw8Tv0nJBGesuCjPNjGs_KzdkWTUXt23Hn9QJsdc1MZuaW0iqXBepHYfYoqNelzVte117t4BwVp0kUM6we0IqyXClaZgOI8S-WDBw2_Ovdm8e5NmhYAblEVoygcX8Y46oH6bKiaCQfKCFDMcRgChme7AoE1yZZYsPbaG_3IjPrC4LBMHQw8rM9dWjJ8ImjicvZ1pAm0dx-KHCP3y5PVKrxBDf1zSOsBRkOSjB8TPODnJMz6-jd5hTtZxpZPwPoIdCanTZ3ZD6uRBpTmDwtpRGm63UQs1m5FWPwb0T2IF0"
},
"p": {
"description": "p",
"type": "string",
"example": "6NbkXwDWUhi-eR55Cgbf27FkQDDWIamOaDr0rj1q0f1fFEz1W5A_09YvG09Fiv1AO2-D8Rl8gS1Vkz2i0zCSqnyy8A025XOcRviOMK7nIxE4OH_PEsko8dtIrb3TmE2hUXvCkmzw9EsTF1LQBOGC6iusLTXepIC1x9ukCKFZQvdgtEObQ5kzd9Nhq-cdqmSeMVLoxPLd1blviVT9Vm8-y12CtYpeJHOaIDtVPLlBhJiBoPKWg3vxSm4XxIliNOefqegIlsmTIa3MpS6WWlCK3yHhat0Q-rRxDxdyiVdG_wzJvp0Iw_2wms7pe-PgNPYvUWH9JphWP5K38YqEBiJFXQ"
},
"q": {
"description": "q",
"type": "string",
"example": "0A1FmpOWR91_RAWpqreWSavNaZb9nXeKiBo0DQGBz32DbqKqQ8S4aBJmbRhJcctjCLjain-ivut477tAUMmzJwVJDDq2MZFwC9Q-4VYZmFU4HJityQuSzHYe64RjN-E_NQ02TWhG3QGW6roq6c57c99rrUsETwJJiwS8M5p15Miuz53DaOjv-uqqFAFfywN5WkxHbraBcjHtMiQuyQbQqkCFh-oanHkwYNeytsNhTu2mQmwR5DR2roZ2nPiFjC6nsdk-A7E3S3wMzYYFw7jvbWWoYWo9vB40_MY2Y0FYQSqcDzcBIcq_0tnnasf3VW4Fdx6m80RzOb2Fsnln7vKXAQ"
},
"qi": {
"description": "qi",
"type": "string",
"example": "GyM_p6JrXySiz1toFgKbWV-JdI3jQ4ypu9rbMWx3rQJBfmt0FoYzgUIZEVFEcOqwemRN81zoDAaa-Bk0KWNGDjJHZDdDmFhW3AN7lI-puxk_mHZGJ11rxyR8O55XLSe3SPmRfKwZI6yU24ZxvQKFYItdldUKGzO6Ia6zTKhAVRU"
},
Expand All @@ -1897,7 +1888,6 @@
"example": "sig"
},
"x": {
"description": "x",
"type": "string",
"example": "f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU"
},
Expand All @@ -1909,14 +1899,13 @@
}
},
"y": {
"description": "y",
"type": "string",
"example": "x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0"
}
}
},
"JSONWebKeySet": {
"description": "JSONWebKeySet JSONWebKeySet JSONWebKeySet It is important that this model object is named JSONWebKeySet for\n\"swagger generate spec\" to generate only on definition of a\nJSONWebKeySet. Since one with the same name is previously defined as\nclient.Client.JSONWebKeys and this one is last, this one will be\neffectively written in the swagger spec.",
"description": "It is important that this model object is named JSONWebKeySet for\n\"swagger generate spec\" to generate only on definition of a\nJSONWebKeySet. Since one with the same name is previously defined as\nclient.Client.JSONWebKeys and this one is last, this one will be\neffectively written in the swagger spec.",
"type": "object",
"properties": {
"keys": {
Expand All @@ -1929,6 +1918,7 @@
}
},
"JoseJSONWebKeySet": {
"description": "JoseJSONWebKeySet JoseJSONWebKeySet JoseJSONWebKeySet JoseJSONWebKeySet jose JSON web key set",
"type": "object"
},
"PreviousConsentSession": {
Expand Down Expand Up @@ -2017,7 +2007,7 @@
},
"acceptLoginRequest": {
"type": "object",
"title": "HandledLoginRequest is the request payload used to accept a login request.",
"title": "AcceptLoginRequest AcceptLoginRequest AcceptLoginRequest HandledLoginRequest is the request payload used to accept a login request.",
"required": [
"subject"
],
Expand Down Expand Up @@ -2054,7 +2044,7 @@
},
"completedRequest": {
"type": "object",
"title": "CompletedRequest CompletedRequest The response payload sent when accepting or rejecting a login or consent request.",
"title": "The response payload sent when accepting or rejecting a login or consent request.",
"properties": {
"redirect_to": {
"description": "RedirectURL is the URL which you should redirect the user to once the authentication process is completed.",
Expand All @@ -2064,7 +2054,7 @@
},
"consentRequest": {
"type": "object",
"title": "ConsentRequest Contains information on an ongoing consent request.",
"title": "Contains information on an ongoing consent request.",
"properties": {
"acr": {
"description": "ACR represents the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it\nto express that, for example, a user authenticated using two factor authentication.",
Expand Down Expand Up @@ -2125,7 +2115,7 @@
},
"consentRequestSession": {
"type": "object",
"title": "ConsentRequestSession ConsentRequestSession Used to pass session data to a consent request.",
"title": "Used to pass session data to a consent request.",
"properties": {
"access_token": {
"description": "AccessToken sets session data for the access and refresh token, as well as any future tokens issued by the\nrefresh grant. Keep in mind that this data will be available to anyone performing OAuth 2.0 Challenge Introspection.\nIf only your services can perform OAuth 2.0 Challenge Introspection, this is usually fine. But if third parties\ncan access that endpoint as well, sensitive data from the session might be exposed to them. Use with care!",
Expand All @@ -2144,11 +2134,10 @@
}
},
"flushInactiveOAuth2TokensRequest": {
"description": "FlushInactiveOAuth2TokensRequest FlushInactiveOAuth2TokensRequest FlushInactiveOAuth2TokensRequest FlushInactiveOAuth2TokensRequest flush inactive o auth2 tokens request",
"type": "object",
"properties": {
"notAfter": {
"description": "NotAfter sets after which point tokens should not be flushed. This is useful when you want to keep a history\nof recently issued tokens for auditing.\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time",
"description": "NotAfter sets after which point tokens should not be flushed. This is useful when you want to keep a history\nof recently issued tokens for auditing.",
"type": "string",
"format": "date-time"
}
Expand All @@ -2157,7 +2146,7 @@
"genericError": {
"description": "Error responses are sent when an error (e.g. unauthorized, bad request, ...) occurred.",
"type": "object",
"title": "Error response",
"title": "GenericError GenericError Error response",
"required": [
"error"
],
Expand Down Expand Up @@ -2186,7 +2175,6 @@
}
},
"healthNotReadyStatus": {
"description": "HealthNotReadyStatus HealthNotReadyStatus health not ready status",
"type": "object",
"properties": {
"errors": {
Expand All @@ -2199,7 +2187,6 @@
}
},
"healthStatus": {
"description": "HealthStatus HealthStatus HealthStatus health status",
"type": "object",
"properties": {
"status": {
Expand All @@ -2209,12 +2196,11 @@
}
},
"jsonWebKeySetGeneratorRequest": {
"description": "JSONWebKeySetGeneratorRequest JSONWebKeySetGeneratorRequest JSONWebKeySetGeneratorRequest json web key set generator request",
"type": "object",
"required": [
"alg",
"use",
"kid"
"kid",
"use"
],
"properties": {
"alg": {
Expand Down Expand Up @@ -2254,16 +2240,14 @@
"type": "array",
"items": {
"type": "string"
},
"$ref": "#/definitions/StringSlicePipeDelimiter"
}
},
"requested_scope": {
"description": "RequestedScope contains the OAuth 2.0 Scope requested by the OAuth 2.0 Client.",
"type": "array",
"items": {
"type": "string"
},
"$ref": "#/definitions/StringSlicePipeDelimiter"
}
},
"session_id": {
"description": "SessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag)\nthis ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false)\nthis will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back-\nchannel logout. It's value can generally be used to associate consecutive login requests by a certain user.",
Expand All @@ -2281,7 +2265,7 @@
},
"logoutRequest": {
"type": "object",
"title": "Contains information about an ongoing logout request.",
"title": "LogoutRequest Contains information about an ongoing logout request.",
"properties": {
"request_url": {
"description": "RequestURL is the original Logout URL requested.",
Expand Down Expand Up @@ -2533,7 +2517,7 @@
},
"openIDConnectContext": {
"type": "object",
"title": "Contains optional information about the OpenID Connect request.",
"title": "OpenIDConnectContext OpenIDConnectContext OpenIDConnectContext OpenIDConnectContext Contains optional information about the OpenID Connect request.",
"properties": {
"acr_values": {
"description": "ACRValues is the Authentication AuthorizationContext Class Reference requested in the OAuth 2.0 Authorization request.\nIt is a parameter defined by OpenID Connect and expresses which level of authentication (e.g. 2FA) is required.\n\nOpenID Connect defines it as follows:\n\u003e Requested Authentication AuthorizationContext Class Reference values. Space-separated string that specifies the acr values\nthat the Authorization Server is being requested to use for processing this Authentication Request, with the\nvalues appearing in order of preference. The Authentication AuthorizationContext Class satisfied by the authentication\nperformed is returned as the acr Claim Value, as specified in Section 2. The acr Claim is requested as a\nVoluntary Claim by this parameter.",
Expand Down Expand Up @@ -2568,7 +2552,7 @@
},
"rejectRequest": {
"type": "object",
"title": "RejectRequest RejectRequest The request payload used to accept a login or consent request.",
"title": "The request payload used to accept a login or consent request.",
"properties": {
"error": {
"description": "error",
Expand All @@ -2594,7 +2578,7 @@
}
},
"userinfoResponse": {
"description": "UserinfoResponse UserinfoResponse The userinfo response",
"description": "The userinfo response",
"type": "object",
"properties": {
"birthdate": {
Expand Down Expand Up @@ -2677,7 +2661,6 @@
}
},
"version": {
"description": "Version version",
"type": "object",
"properties": {
"version": {
Expand Down
2 changes: 1 addition & 1 deletion internal/httpclient/models/accept_login_request.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/httpclient/models/completed_request.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/httpclient/models/consent_request_session.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/httpclient/models/generic_error.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/httpclient/models/health_not_ready_status.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/httpclient/models/health_status.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/httpclient/models/jose_json_web_key_set.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/httpclient/models/json_raw_message.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/httpclient/models/json_web_key.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/httpclient/models/json_web_key_set.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/httpclient/models/logout_request.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/httpclient/models/open_id_connect_context.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading