github.com/soulteary/pocket-bookcase@v0.0.0-20240428065142-0b5a9a0fc98a/docs/swagger/docs.go (about)

     1  // Package swagger Code generated by swaggo/swag. DO NOT EDIT
     2  package swagger
     3  
     4  import "github.com/swaggo/swag"
     5  
     6  const docTemplate = `{
     7      "schemes": {{ marshal .Schemes }},
     8      "swagger": "2.0",
     9      "info": {
    10          "description": "{{escape .Description}}",
    11          "title": "{{.Title}}",
    12          "contact": {},
    13          "version": "{{.Version}}"
    14      },
    15      "host": "{{.Host}}",
    16      "basePath": "{{.BasePath}}",
    17      "paths": {
    18          "/api/v1/auth/account": {
    19              "patch": {
    20                  "produces": [
    21                      "application/json"
    22                  ],
    23                  "tags": [
    24                      "Auth"
    25                  ],
    26                  "summary": "Perform actions on the currently logged-in user.",
    27                  "parameters": [
    28                      {
    29                          "description": "Config data",
    30                          "name": "payload",
    31                          "in": "body",
    32                          "schema": {
    33                              "$ref": "#/definitions/api_v1.settingRequestPayload"
    34                          }
    35                      }
    36                  ],
    37                  "responses": {
    38                      "200": {
    39                          "description": "OK",
    40                          "schema": {
    41                              "$ref": "#/definitions/model.Account"
    42                          }
    43                      },
    44                      "403": {
    45                          "description": "Token not provided/invalid"
    46                      }
    47                  }
    48              }
    49          },
    50          "/api/v1/auth/login": {
    51              "post": {
    52                  "consumes": [
    53                      "application/json"
    54                  ],
    55                  "produces": [
    56                      "application/json"
    57                  ],
    58                  "tags": [
    59                      "Auth"
    60                  ],
    61                  "summary": "Login to an account using username and password",
    62                  "parameters": [
    63                      {
    64                          "description": "Login data",
    65                          "name": "payload",
    66                          "in": "body",
    67                          "schema": {
    68                              "$ref": "#/definitions/api_v1.loginRequestPayload"
    69                          }
    70                      }
    71                  ],
    72                  "responses": {
    73                      "200": {
    74                          "description": "Login successful",
    75                          "schema": {
    76                              "$ref": "#/definitions/api_v1.loginResponseMessage"
    77                          }
    78                      },
    79                      "400": {
    80                          "description": "Invalid login data"
    81                      }
    82                  }
    83              }
    84          },
    85          "/api/v1/auth/me": {
    86              "get": {
    87                  "produces": [
    88                      "application/json"
    89                  ],
    90                  "tags": [
    91                      "Auth"
    92                  ],
    93                  "summary": "Get information for the current logged in user",
    94                  "responses": {
    95                      "200": {
    96                          "description": "OK",
    97                          "schema": {
    98                              "$ref": "#/definitions/model.Account"
    99                          }
   100                      },
   101                      "403": {
   102                          "description": "Token not provided/invalid"
   103                      }
   104                  }
   105              }
   106          },
   107          "/api/v1/auth/refresh": {
   108              "post": {
   109                  "produces": [
   110                      "application/json"
   111                  ],
   112                  "tags": [
   113                      "Auth"
   114                  ],
   115                  "summary": "Refresh a token for an account",
   116                  "responses": {
   117                      "200": {
   118                          "description": "Refresh successful",
   119                          "schema": {
   120                              "$ref": "#/definitions/api_v1.loginResponseMessage"
   121                          }
   122                      },
   123                      "403": {
   124                          "description": "Token not provided/invalid"
   125                      }
   126                  }
   127              }
   128          },
   129          "/api/v1/bookmarks/cache": {
   130              "put": {
   131                  "produces": [
   132                      "application/json"
   133                  ],
   134                  "tags": [
   135                      "Auth"
   136                  ],
   137                  "summary": "Update Cache and Ebook on server.",
   138                  "parameters": [
   139                      {
   140                          "description": "Update Cache Payload",
   141                          "name": "payload",
   142                          "in": "body",
   143                          "required": true,
   144                          "schema": {
   145                              "$ref": "#/definitions/api_v1.updateCachePayload"
   146                          }
   147                      }
   148                  ],
   149                  "responses": {
   150                      "200": {
   151                          "description": "OK",
   152                          "schema": {
   153                              "$ref": "#/definitions/model.BookmarkDTO"
   154                          }
   155                      },
   156                      "403": {
   157                          "description": "Token not provided/invalid"
   158                      }
   159                  }
   160              }
   161          },
   162          "/api/v1/bookmarks/id/readable": {
   163              "get": {
   164                  "produces": [
   165                      "application/json"
   166                  ],
   167                  "tags": [
   168                      "Auth"
   169                  ],
   170                  "summary": "Get readable version of bookmark.",
   171                  "responses": {
   172                      "200": {
   173                          "description": "OK",
   174                          "schema": {
   175                              "$ref": "#/definitions/api_v1.contentResponseMessage"
   176                          }
   177                      },
   178                      "403": {
   179                          "description": "Token not provided/invalid"
   180                      }
   181                  }
   182              }
   183          },
   184          "/api/v1/tags": {
   185              "get": {
   186                  "produces": [
   187                      "application/json"
   188                  ],
   189                  "tags": [
   190                      "Tags"
   191                  ],
   192                  "summary": "List tags",
   193                  "responses": {
   194                      "200": {
   195                          "description": "List of tags",
   196                          "schema": {
   197                              "$ref": "#/definitions/model.Tag"
   198                          }
   199                      },
   200                      "403": {
   201                          "description": "Token not provided/invalid"
   202                      }
   203                  }
   204              },
   205              "post": {
   206                  "produces": [
   207                      "application/json"
   208                  ],
   209                  "tags": [
   210                      "Tags"
   211                  ],
   212                  "summary": "Create tag",
   213                  "responses": {
   214                      "200": {
   215                          "description": "Created tag",
   216                          "schema": {
   217                              "$ref": "#/definitions/model.Tag"
   218                          }
   219                      },
   220                      "400": {
   221                          "description": "Token not provided/invalid"
   222                      },
   223                      "403": {
   224                          "description": "Token not provided/invalid"
   225                      }
   226                  }
   227              }
   228          }
   229      },
   230      "definitions": {
   231          "api_v1.contentResponseMessage": {
   232              "type": "object",
   233              "properties": {
   234                  "content": {
   235                      "type": "string"
   236                  },
   237                  "html": {
   238                      "type": "string"
   239                  }
   240              }
   241          },
   242          "api_v1.loginRequestPayload": {
   243              "type": "object",
   244              "required": [
   245                  "password",
   246                  "username"
   247              ],
   248              "properties": {
   249                  "password": {
   250                      "type": "string"
   251                  },
   252                  "remember_me": {
   253                      "type": "boolean"
   254                  },
   255                  "username": {
   256                      "type": "string"
   257                  }
   258              }
   259          },
   260          "api_v1.loginResponseMessage": {
   261              "type": "object",
   262              "properties": {
   263                  "expires": {
   264                      "description": "Deprecated, used only for legacy APIs",
   265                      "type": "integer"
   266                  },
   267                  "session": {
   268                      "description": "Deprecated, used only for legacy APIs",
   269                      "type": "string"
   270                  },
   271                  "token": {
   272                      "type": "string"
   273                  }
   274              }
   275          },
   276          "api_v1.settingRequestPayload": {
   277              "type": "object",
   278              "properties": {
   279                  "config": {
   280                      "$ref": "#/definitions/model.UserConfig"
   281                  }
   282              }
   283          },
   284          "api_v1.updateCachePayload": {
   285              "type": "object",
   286              "required": [
   287                  "ids"
   288              ],
   289              "properties": {
   290                  "create_archive": {
   291                      "type": "boolean"
   292                  },
   293                  "create_ebook": {
   294                      "type": "boolean"
   295                  },
   296                  "ids": {
   297                      "type": "array",
   298                      "items": {
   299                          "type": "integer"
   300                      }
   301                  },
   302                  "keep_metadata": {
   303                      "type": "boolean"
   304                  },
   305                  "skip_exist": {
   306                      "type": "boolean"
   307                  }
   308              }
   309          },
   310          "model.Account": {
   311              "type": "object",
   312              "properties": {
   313                  "config": {
   314                      "$ref": "#/definitions/model.UserConfig"
   315                  },
   316                  "id": {
   317                      "type": "integer"
   318                  },
   319                  "owner": {
   320                      "type": "boolean"
   321                  },
   322                  "password": {
   323                      "type": "string"
   324                  },
   325                  "username": {
   326                      "type": "string"
   327                  }
   328              }
   329          },
   330          "model.BookmarkDTO": {
   331              "type": "object",
   332              "properties": {
   333                  "author": {
   334                      "type": "string"
   335                  },
   336                  "create_archive": {
   337                      "description": "TODO: migrate outside the DTO",
   338                      "type": "boolean"
   339                  },
   340                  "create_ebook": {
   341                      "description": "TODO: migrate outside the DTO",
   342                      "type": "boolean"
   343                  },
   344                  "excerpt": {
   345                      "type": "string"
   346                  },
   347                  "hasArchive": {
   348                      "type": "boolean"
   349                  },
   350                  "hasContent": {
   351                      "type": "boolean"
   352                  },
   353                  "hasEbook": {
   354                      "type": "boolean"
   355                  },
   356                  "html": {
   357                      "type": "string"
   358                  },
   359                  "id": {
   360                      "type": "integer"
   361                  },
   362                  "imageURL": {
   363                      "type": "string"
   364                  },
   365                  "modified": {
   366                      "type": "string"
   367                  },
   368                  "public": {
   369                      "type": "integer"
   370                  },
   371                  "tags": {
   372                      "type": "array",
   373                      "items": {
   374                          "$ref": "#/definitions/model.Tag"
   375                      }
   376                  },
   377                  "title": {
   378                      "type": "string"
   379                  },
   380                  "url": {
   381                      "type": "string"
   382                  }
   383              }
   384          },
   385          "model.Tag": {
   386              "type": "object",
   387              "properties": {
   388                  "id": {
   389                      "type": "integer"
   390                  },
   391                  "nBookmarks": {
   392                      "type": "integer"
   393                  },
   394                  "name": {
   395                      "type": "string"
   396                  }
   397              }
   398          },
   399          "model.UserConfig": {
   400              "type": "object",
   401              "properties": {
   402                  "CreateEbook": {
   403                      "type": "boolean"
   404                  },
   405                  "HideExcerpt": {
   406                      "type": "boolean"
   407                  },
   408                  "HideThumbnail": {
   409                      "type": "boolean"
   410                  },
   411                  "KeepMetadata": {
   412                      "type": "boolean"
   413                  },
   414                  "ListMode": {
   415                      "type": "boolean"
   416                  },
   417                  "MakePublic": {
   418                      "type": "boolean"
   419                  },
   420                  "NightMode": {
   421                      "type": "boolean"
   422                  },
   423                  "ShowId": {
   424                      "type": "boolean"
   425                  },
   426                  "UseArchive": {
   427                      "type": "boolean"
   428                  }
   429              }
   430          }
   431      }
   432  }`
   433  
   434  // SwaggerInfo holds exported Swagger Info so clients can modify it
   435  var SwaggerInfo = &swag.Spec{
   436  	Version:          "",
   437  	Host:             "",
   438  	BasePath:         "",
   439  	Schemes:          []string{},
   440  	Title:            "",
   441  	Description:      "",
   442  	InfoInstanceName: "swagger",
   443  	SwaggerTemplate:  docTemplate,
   444  	LeftDelim:        "{{",
   445  	RightDelim:       "}}",
   446  }
   447  
   448  func init() {
   449  	swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
   450  }