// Package docs Code generated by swaggo/swag. DO NOT EDIT
package docs

import "github.com/swaggo/swag"

const docTemplate = `{
    "schemes": {{ marshal .Schemes }},
    "swagger": "2.0",
    "info": {
        "description": "{{escape .Description}}",
        "title": "{{.Title}}",
        "contact": {},
        "license": {
            "name": "AGPL",
            "url": "https://www.gnu.org/licenses/agpl-3.0.html"
        },
        "version": "{{.Version}}"
    },
    "host": "{{.Host}}",
    "basePath": "{{.BasePath}}",
    "paths": {
        "/login": {
            "post": {
                "description": "logs the user in and returns a jwt token",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "text/plain"
                ],
                "tags": [
                    "User"
                ],
                "summary": "login",
                "parameters": [
                    {
                        "description": "login info",
                        "name": "NewUser",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/types.NewUser"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successfully signed token for user",
                        "schema": {
                            "type": "Token"
                        }
                    },
                    "400": {
                        "description": "Bad request",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "/loginerenew": {
            "post": {
                "security": [
                    {
                        "bererToken": []
                    }
                ],
                "description": "renews the users token",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "text/plain"
                ],
                "tags": [
                    "User"
                ],
                "summary": "LoginRenews",
                "responses": {
                    "200": {
                        "description": "Successfully signed token for user",
                        "schema": {
                            "type": "Token"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "/promoteToAdmin": {
            "post": {
                "description": "promote chosen user to admin",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "text/plain"
                ],
                "tags": [
                    "User"
                ],
                "summary": "PromoteToAdmin",
                "parameters": [
                    {
                        "description": "user info",
                        "name": "NewUser",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/types.NewUser"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successfully prometed user",
                        "schema": {
                            "type": "json"
                        }
                    },
                    "400": {
                        "description": "bad request",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "/register": {
            "post": {
                "description": "Register a new user",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "text/plain"
                ],
                "tags": [
                    "User"
                ],
                "summary": "Register",
                "parameters": [
                    {
                        "description": "User to register",
                        "name": "NewUser",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/types.NewUser"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "User added",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "400": {
                        "description": "Bad request",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "/userdelete/{username}": {
            "delete": {
                "description": "UserDelete deletes a user from the database",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "text/plain"
                ],
                "tags": [
                    "User"
                ],
                "summary": "UserDelete",
                "responses": {
                    "200": {
                        "description": "User deleted",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "403": {
                        "description": "You can only delete yourself",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "/users/all": {
            "get": {
                "description": "lists all users",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "text/plain"
                ],
                "tags": [
                    "User"
                ],
                "summary": "ListsAllUsers",
                "responses": {
                    "200": {
                        "description": "Successfully signed token for user",
                        "schema": {
                            "type": "json"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "types.NewUser": {
            "type": "object",
            "properties": {
                "password": {
                    "type": "string"
                },
                "username": {
                    "type": "string"
                }
            }
        }
    },
    "securityDefinitions": {
        "bererToken": {
            "type": "apiKey",
            "name": "Authorization",
            "in": "header"
        }
    },
    "externalDocs": {
        "description": "OpenAPI",
        "url": "https://swagger.io/resources/open-api/"
    }
}`

// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
	Version:          "0.0.1",
	Host:             "localhost:8080",
	BasePath:         "/api",
	Schemes:          []string{},
	Title:            "TTime API",
	Description:      "This is the API for TTime, a time tracking application.",
	InfoInstanceName: "swagger",
	SwaggerTemplate:  docTemplate,
	LeftDelim:        "{{",
	RightDelim:       "}}",
}

func init() {
	swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}
