Skip to content

Commit

Permalink
Goimports lints
Browse files Browse the repository at this point in the history
  • Loading branch information
ThibHrrd committed Aug 19, 2022
1 parent 425b431 commit 8cbe71b
Show file tree
Hide file tree
Showing 24 changed files with 504 additions and 504 deletions.
4 changes: 3 additions & 1 deletion cmd/cleanup/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ Copyright © 2019 NAME HERE <EMAIL ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down
2 changes: 1 addition & 1 deletion cmd/migrate/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
142 changes: 71 additions & 71 deletions identity/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,23 +104,23 @@ type adminListIdentities struct {

// swagger:route GET /admin/identities v0alpha2 adminListIdentities
//
// List Identities
// # List Identities
//
// Lists all identities. Does not support search at the moment.
//
// Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
//
// Produces:
// - application/json
// Produces:
// - application/json
//
// Schemes: http, https
// Schemes: http, https
//
// Security:
// oryAccessToken:
// Security:
// oryAccessToken:
//
// Responses:
// 200: identityList
// 500: jsonError
// Responses:
// 200: identityList
// 500: jsonError
func (h *Handler) list(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
page, itemsPerPage := x.ParsePagination(r)
is, err := h.r.IdentityPool().ListIdentities(r.Context(), page, itemsPerPage)
Expand Down Expand Up @@ -160,25 +160,25 @@ type adminGetIdentity struct {

// swagger:route GET /admin/identities/{id} v0alpha2 adminGetIdentity
//
// Get an Identity
// # Get an Identity
//
// Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
//
// Consumes:
// - application/json
// Consumes:
// - application/json
//
// Produces:
// - application/json
// Produces:
// - application/json
//
// Schemes: http, https
// Schemes: http, https
//
// Security:
// oryAccessToken:
// Security:
// oryAccessToken:
//
// Responses:
// 200: identity
// 404: jsonError
// 500: jsonError
// Responses:
// 200: identity
// 404: jsonError
// 500: jsonError
func (h *Handler) get(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
i, err := h.r.PrivilegedIdentityPool().GetIdentityConfidential(r.Context(), x.ParseUUID(ps.ByName("id")))
if err != nil {
Expand Down Expand Up @@ -309,26 +309,26 @@ type AdminCreateIdentityImportCredentialsOidcProvider struct {

// swagger:route POST /admin/identities v0alpha2 adminCreateIdentity
//
// Create an Identity
// # Create an Identity
//
// This endpoint creates an identity. Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
//
// Consumes:
// - application/json
// Consumes:
// - application/json
//
// Produces:
// - application/json
// Produces:
// - application/json
//
// Schemes: http, https
// Schemes: http, https
//
// Security:
// oryAccessToken:
// Security:
// oryAccessToken:
//
// Responses:
// 201: identity
// 400: jsonError
// 409: jsonError
// 500: jsonError
// Responses:
// 201: identity
// 400: jsonError
// 409: jsonError
// 500: jsonError
func (h *Handler) create(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
var cr AdminCreateIdentityBody
if err := jsonx.NewStrictDecoder(r.Body).Decode(&cr); err != nil {
Expand Down Expand Up @@ -426,29 +426,29 @@ type AdminUpdateIdentityBody struct {

// swagger:route PUT /admin/identities/{id} v0alpha2 adminUpdateIdentity
//
// Update an Identity
// # Update an Identity
//
// This endpoint updates an identity. The full identity payload (except credentials) is expected. This endpoint does not support patching.
//
// Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
//
// Consumes:
// - application/json
// Consumes:
// - application/json
//
// Produces:
// - application/json
// Produces:
// - application/json
//
// Schemes: http, https
// Schemes: http, https
//
// Security:
// oryAccessToken:
// Security:
// oryAccessToken:
//
// Responses:
// 200: identity
// 400: jsonError
// 404: jsonError
// 409: jsonError
// 500: jsonError
// Responses:
// 200: identity
// 400: jsonError
// 404: jsonError
// 409: jsonError
// 500: jsonError
func (h *Handler) update(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
var ur AdminUpdateIdentityBody
if err := h.dx.Decode(r, &ur,
Expand Down Expand Up @@ -516,26 +516,26 @@ type adminDeleteIdentity struct {

// swagger:route DELETE /admin/identities/{id} v0alpha2 adminDeleteIdentity
//
// Delete an Identity
// # Delete an Identity
//
// Calling this endpoint irrecoverably and permanently deletes the identity given its ID. This action can not be undone.
// This endpoint returns 204 when the identity was deleted or when the identity was not found, in which case it is
// assumed that is has been deleted already.
//
// Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
//
// Produces:
// - application/json
// Produces:
// - application/json
//
// Schemes: http, https
// Schemes: http, https
//
// Security:
// oryAccessToken:
// Security:
// oryAccessToken:
//
// Responses:
// 204: emptyResponse
// 404: jsonError
// 500: jsonError
// Responses:
// 204: emptyResponse
// 404: jsonError
// 500: jsonError
func (h *Handler) delete(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
if err := h.r.IdentityPool().(PrivilegedPool).DeleteIdentity(r.Context(), x.ParseUUID(ps.ByName("id"))); err != nil {
h.r.Writer().WriteError(w, r, err)
Expand Down Expand Up @@ -566,23 +566,23 @@ type adminPatchIdentity struct {
//
// Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
//
// Consumes:
// - application/json
// Consumes:
// - application/json
//
// Produces:
// - application/json
// Produces:
// - application/json
//
// Schemes: http, https
// Schemes: http, https
//
// Security:
// oryAccessToken:
// Security:
// oryAccessToken:
//
// Responses:
// 200: identity
// 400: jsonError
// 404: jsonError
// 409: jsonError
// 500: jsonError
// Responses:
// 200: identity
// 400: jsonError
// 404: jsonError
// 409: jsonError
// 500: jsonError
func (h *Handler) patch(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
requestBody, err := io.ReadAll(r.Body)
if err != nil {
Expand Down
26 changes: 13 additions & 13 deletions schema/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ type getIdentitySchema struct {
//
// Get a JSON Schema
//
// Produces:
// - application/json
// Produces:
// - application/json
//
// Schemes: http, https
// Schemes: http, https
//
// Responses:
// 200: identitySchema
// 404: jsonError
// 500: jsonError
// Responses:
// 200: identitySchema
// 404: jsonError
// 500: jsonError
func (h *Handler) getIdentitySchema(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
ss, err := h.r.IdentityTraitsSchemas(r.Context())
if err != nil {
Expand Down Expand Up @@ -148,14 +148,14 @@ type listIdentitySchemas struct {
//
// Get all Identity Schemas
//
// Produces:
// - application/json
// Produces:
// - application/json
//
// Schemes: http, https
// Schemes: http, https
//
// Responses:
// 200: identitySchemas
// 500: jsonError
// Responses:
// 200: identitySchemas
// 500: jsonError
func (h *Handler) getAll(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
page, itemsPerPage := x.ParsePagination(r)

Expand Down
18 changes: 9 additions & 9 deletions selfservice/errorx/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ type getSelfServiceError struct {

// swagger:route GET /self-service/errors v0alpha2 getSelfServiceError
//
// Get Self-Service Errors
// # Get Self-Service Errors
//
// This endpoint returns the error associated with a user-facing self service errors.
//
Expand All @@ -74,16 +74,16 @@ type getSelfServiceError struct {
//
// More information can be found at [Ory Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors).
//
// Produces:
// - application/json
// Produces:
// - application/json
//
// Schemes: http, https
// Schemes: http, https
//
// Responses:
// 200: selfServiceError
// 403: jsonError
// 404: jsonError
// 500: jsonError
// Responses:
// 200: selfServiceError
// 403: jsonError
// 404: jsonError
// 500: jsonError
func (h *Handler) publicFetchError(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
if err := h.fetchError(w, r); err != nil {
h.r.Writer().WriteError(w, r, err)
Expand Down
Loading

0 comments on commit 8cbe71b

Please sign in to comment.