basePath: /api
definitions:
  ent.AuthTokens:
    properties:
      created_at:
        description: CreatedAt holds the value of the "created_at" field.
        type: string
      edges:
        $ref: '#/definitions/ent.AuthTokensEdges'
        description: |-
          Edges holds the relations/edges for other nodes in the graph.
          The values are being populated by the AuthTokensQuery when eager-loading is set.
      expires_at:
        description: ExpiresAt holds the value of the "expires_at" field.
        type: string
      id:
        description: ID of the ent.
        type: string
      token:
        description: Token holds the value of the "token" field.
        items:
          type: integer
        type: array
      updated_at:
        description: UpdatedAt holds the value of the "updated_at" field.
        type: string
    type: object
  ent.AuthTokensEdges:
    properties:
      user:
        $ref: '#/definitions/ent.User'
        description: User holds the value of the user edge.
    type: object
  ent.Group:
    properties:
      created_at:
        description: CreatedAt holds the value of the "created_at" field.
        type: string
      currency:
        description: Currency holds the value of the "currency" field.
        type: string
      edges:
        $ref: '#/definitions/ent.GroupEdges'
        description: |-
          Edges holds the relations/edges for other nodes in the graph.
          The values are being populated by the GroupQuery when eager-loading is set.
      id:
        description: ID of the ent.
        type: string
      name:
        description: Name holds the value of the "name" field.
        type: string
      updated_at:
        description: UpdatedAt holds the value of the "updated_at" field.
        type: string
    type: object
  ent.GroupEdges:
    properties:
      items:
        description: Items holds the value of the items edge.
        items:
          $ref: '#/definitions/ent.Item'
        type: array
      labels:
        description: Labels holds the value of the labels edge.
        items:
          $ref: '#/definitions/ent.Label'
        type: array
      locations:
        description: Locations holds the value of the locations edge.
        items:
          $ref: '#/definitions/ent.Location'
        type: array
      users:
        description: Users holds the value of the users edge.
        items:
          $ref: '#/definitions/ent.User'
        type: array
    type: object
  ent.Item:
    properties:
      created_at:
        description: CreatedAt holds the value of the "created_at" field.
        type: string
      description:
        description: Description holds the value of the "description" field.
        type: string
      edges:
        $ref: '#/definitions/ent.ItemEdges'
        description: |-
          Edges holds the relations/edges for other nodes in the graph.
          The values are being populated by the ItemQuery when eager-loading is set.
      id:
        description: ID of the ent.
        type: string
      lifetime_warranty:
        description: LifetimeWarranty holds the value of the "lifetime_warranty" field.
        type: boolean
      manufacturer:
        description: Manufacturer holds the value of the "manufacturer" field.
        type: string
      model_number:
        description: ModelNumber holds the value of the "model_number" field.
        type: string
      name:
        description: Name holds the value of the "name" field.
        type: string
      notes:
        description: Notes holds the value of the "notes" field.
        type: string
      purchase_from:
        description: PurchaseFrom holds the value of the "purchase_from" field.
        type: string
      purchase_price:
        description: PurchasePrice holds the value of the "purchase_price" field.
        type: number
      purchase_time:
        description: PurchaseTime holds the value of the "purchase_time" field.
        type: string
      serial_number:
        description: SerialNumber holds the value of the "serial_number" field.
        type: string
      sold_notes:
        description: SoldNotes holds the value of the "sold_notes" field.
        type: string
      sold_price:
        description: SoldPrice holds the value of the "sold_price" field.
        type: number
      sold_time:
        description: SoldTime holds the value of the "sold_time" field.
        type: string
      sold_to:
        description: SoldTo holds the value of the "sold_to" field.
        type: string
      updated_at:
        description: UpdatedAt holds the value of the "updated_at" field.
        type: string
      warranty_details:
        description: WarrantyDetails holds the value of the "warranty_details" field.
        type: string
      warranty_expires:
        description: WarrantyExpires holds the value of the "warranty_expires" field.
        type: string
    type: object
  ent.ItemEdges:
    properties:
      fields:
        description: Fields holds the value of the fields edge.
        items:
          $ref: '#/definitions/ent.ItemField'
        type: array
      group:
        $ref: '#/definitions/ent.Group'
        description: Group holds the value of the group edge.
      label:
        description: Label holds the value of the label edge.
        items:
          $ref: '#/definitions/ent.Label'
        type: array
      location:
        $ref: '#/definitions/ent.Location'
        description: Location holds the value of the location edge.
    type: object
  ent.ItemField:
    properties:
      boolean_value:
        description: BooleanValue holds the value of the "boolean_value" field.
        type: boolean
      created_at:
        description: CreatedAt holds the value of the "created_at" field.
        type: string
      description:
        description: Description holds the value of the "description" field.
        type: string
      edges:
        $ref: '#/definitions/ent.ItemFieldEdges'
        description: |-
          Edges holds the relations/edges for other nodes in the graph.
          The values are being populated by the ItemFieldQuery when eager-loading is set.
      id:
        description: ID of the ent.
        type: string
      name:
        description: Name holds the value of the "name" field.
        type: string
      number_value:
        description: NumberValue holds the value of the "number_value" field.
        type: integer
      text_value:
        description: TextValue holds the value of the "text_value" field.
        type: string
      time_value:
        description: TimeValue holds the value of the "time_value" field.
        type: string
      type:
        description: Type holds the value of the "type" field.
        type: string
      updated_at:
        description: UpdatedAt holds the value of the "updated_at" field.
        type: string
    type: object
  ent.ItemFieldEdges:
    properties:
      item:
        $ref: '#/definitions/ent.Item'
        description: Item holds the value of the item edge.
    type: object
  ent.Label:
    properties:
      color:
        description: Color holds the value of the "color" field.
        type: string
      created_at:
        description: CreatedAt holds the value of the "created_at" field.
        type: string
      description:
        description: Description holds the value of the "description" field.
        type: string
      edges:
        $ref: '#/definitions/ent.LabelEdges'
        description: |-
          Edges holds the relations/edges for other nodes in the graph.
          The values are being populated by the LabelQuery when eager-loading is set.
      id:
        description: ID of the ent.
        type: string
      name:
        description: Name holds the value of the "name" field.
        type: string
      updated_at:
        description: UpdatedAt holds the value of the "updated_at" field.
        type: string
    type: object
  ent.LabelEdges:
    properties:
      group:
        $ref: '#/definitions/ent.Group'
        description: Group holds the value of the group edge.
      items:
        description: Items holds the value of the items edge.
        items:
          $ref: '#/definitions/ent.Item'
        type: array
    type: object
  ent.Location:
    properties:
      created_at:
        description: CreatedAt holds the value of the "created_at" field.
        type: string
      description:
        description: Description holds the value of the "description" field.
        type: string
      edges:
        $ref: '#/definitions/ent.LocationEdges'
        description: |-
          Edges holds the relations/edges for other nodes in the graph.
          The values are being populated by the LocationQuery when eager-loading is set.
      id:
        description: ID of the ent.
        type: string
      name:
        description: Name holds the value of the "name" field.
        type: string
      updated_at:
        description: UpdatedAt holds the value of the "updated_at" field.
        type: string
    type: object
  ent.LocationEdges:
    properties:
      group:
        $ref: '#/definitions/ent.Group'
        description: Group holds the value of the group edge.
      items:
        description: Items holds the value of the items edge.
        items:
          $ref: '#/definitions/ent.Item'
        type: array
    type: object
  ent.User:
    properties:
      created_at:
        description: CreatedAt holds the value of the "created_at" field.
        type: string
      edges:
        $ref: '#/definitions/ent.UserEdges'
        description: |-
          Edges holds the relations/edges for other nodes in the graph.
          The values are being populated by the UserQuery when eager-loading is set.
      email:
        description: Email holds the value of the "email" field.
        type: string
      id:
        description: ID of the ent.
        type: string
      is_superuser:
        description: IsSuperuser holds the value of the "is_superuser" field.
        type: boolean
      name:
        description: Name holds the value of the "name" field.
        type: string
      updated_at:
        description: UpdatedAt holds the value of the "updated_at" field.
        type: string
    type: object
  ent.UserEdges:
    properties:
      auth_tokens:
        description: AuthTokens holds the value of the auth_tokens edge.
        items:
          $ref: '#/definitions/ent.AuthTokens'
        type: array
      group:
        $ref: '#/definitions/ent.Group'
        description: Group holds the value of the group edge.
    type: object
  server.Result:
    properties:
      details: {}
      error:
        type: boolean
      item: {}
      message:
        type: string
    type: object
  server.Results:
    properties:
      items:
        type: any
    type: object
  types.ApiSummary:
    properties:
      health:
        type: boolean
      message:
        type: string
      title:
        type: string
      versions:
        items:
          type: string
        type: array
    type: object
  types.ItemCreate:
    properties:
      description:
        type: string
      labelIds:
        items:
          type: string
        type: array
      locationId:
        description: Edges
        type: string
      name:
        type: string
    type: object
  types.ItemOut:
    properties:
      createdAt:
        type: string
      description:
        type: string
      id:
        type: string
      labels:
        items:
          $ref: '#/definitions/types.LabelSummary'
        type: array
      lifetimeWarranty:
        description: Warranty
        type: boolean
      location:
        $ref: '#/definitions/types.LocationSummary'
        description: Edges
      manufacturer:
        type: string
      modelNumber:
        type: string
      name:
        type: string
      notes:
        description: Extras
        type: string
      purchaseFrom:
        type: string
      purchasePrice:
        type: number
      purchaseTime:
        description: Purchase
        type: string
      serialNumber:
        description: Identifications
        type: string
      soldNotes:
        type: string
      soldPrice:
        type: number
      soldTime:
        description: Sold
        type: string
      soldTo:
        type: string
      updatedAt:
        type: string
      warrantyDetails:
        type: string
      warrantyExpires:
        type: string
    type: object
  types.ItemSummary:
    properties:
      createdAt:
        type: string
      description:
        type: string
      id:
        type: string
      labels:
        items:
          $ref: '#/definitions/types.LabelSummary'
        type: array
      lifetimeWarranty:
        description: Warranty
        type: boolean
      location:
        $ref: '#/definitions/types.LocationSummary'
        description: Edges
      manufacturer:
        type: string
      modelNumber:
        type: string
      name:
        type: string
      notes:
        description: Extras
        type: string
      purchaseFrom:
        type: string
      purchasePrice:
        type: number
      purchaseTime:
        description: Purchase
        type: string
      serialNumber:
        description: Identifications
        type: string
      soldNotes:
        type: string
      soldPrice:
        type: number
      soldTime:
        description: Sold
        type: string
      soldTo:
        type: string
      updatedAt:
        type: string
      warrantyDetails:
        type: string
      warrantyExpires:
        type: string
    type: object
  types.LabelCreate:
    properties:
      color:
        type: string
      description:
        type: string
      name:
        type: string
    type: object
  types.LabelOut:
    properties:
      createdAt:
        type: string
      description:
        type: string
      groupId:
        type: string
      id:
        type: string
      items:
        items:
          $ref: '#/definitions/types.ItemSummary'
        type: array
      name:
        type: string
      updatedAt:
        type: string
    type: object
  types.LabelSummary:
    properties:
      createdAt:
        type: string
      description:
        type: string
      groupId:
        type: string
      id:
        type: string
      name:
        type: string
      updatedAt:
        type: string
    type: object
  types.LocationCount:
    properties:
      createdAt:
        type: string
      description:
        type: string
      id:
        type: string
      itemCount:
        type: integer
      name:
        type: string
      updatedAt:
        type: string
    type: object
  types.LocationCreate:
    properties:
      description:
        type: string
      name:
        type: string
    type: object
  types.LocationOut:
    properties:
      createdAt:
        type: string
      description:
        type: string
      id:
        type: string
      items:
        items:
          $ref: '#/definitions/types.ItemSummary'
        type: array
      name:
        type: string
      updatedAt:
        type: string
    type: object
  types.LocationSummary:
    properties:
      createdAt:
        type: string
      description:
        type: string
      id:
        type: string
      name:
        type: string
      updatedAt:
        type: string
    type: object
  types.TokenResponse:
    properties:
      expiresAt:
        type: string
      token:
        type: string
    type: object
  types.UserIn:
    properties:
      email:
        type: string
      name:
        type: string
      password:
        type: string
    type: object
  types.UserRegistration:
    properties:
      groupName:
        type: string
      user:
        $ref: '#/definitions/types.UserIn'
    type: object
  types.UserUpdate:
    properties:
      email:
        type: string
      name:
        type: string
    type: object
info:
  contact:
    name: Don't
  description: This is a simple Rest API Server Template that implements some basic
    User and Authentication patterns to help you get started and bootstrap your next
    project!.
  license:
    name: MIT
  title: Go API Templates
  version: "1.0"
paths:
  /v1/items:
    get:
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/server.Results'
            - properties:
                items:
                  items:
                    $ref: '#/definitions/types.ItemOut'
                  type: array
              type: object
      security:
      - Bearer: []
      summary: Get All Items
      tags:
      - Items
    post:
      parameters:
      - description: Item Data
        in: body
        name: payload
        required: true
        schema:
          $ref: '#/definitions/types.ItemCreate'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/types.ItemSummary'
      security:
      - Bearer: []
      summary: Create a new item
      tags:
      - Items
  /v1/items/{id}:
    delete:
      parameters:
      - description: Item ID
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "204":
          description: ""
      security:
      - Bearer: []
      summary: deletes a item
      tags:
      - Items
    get:
      parameters:
      - description: Item ID
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/types.ItemOut'
      security:
      - Bearer: []
      summary: Gets a item and fields
      tags:
      - Items
    put:
      parameters:
      - description: Item ID
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/types.ItemOut'
      security:
      - Bearer: []
      summary: updates a item
      tags:
      - Items
  /v1/items/import:
    post:
      parameters:
      - description: Image to upload
        in: formData
        name: csv
        required: true
        type: file
      produces:
      - application/json
      responses:
        "204":
          description: ""
      security:
      - Bearer: []
      summary: imports items into the database
      tags:
      - Items
  /v1/labels:
    get:
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/server.Results'
            - properties:
                items:
                  items:
                    $ref: '#/definitions/types.LabelOut'
                  type: array
              type: object
      security:
      - Bearer: []
      summary: Get All Labels
      tags:
      - Labels
    post:
      parameters:
      - description: Label Data
        in: body
        name: payload
        required: true
        schema:
          $ref: '#/definitions/types.LabelCreate'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/types.LabelSummary'
      security:
      - Bearer: []
      summary: Create a new label
      tags:
      - Labels
  /v1/labels/{id}:
    delete:
      parameters:
      - description: Label ID
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "204":
          description: ""
      security:
      - Bearer: []
      summary: deletes a label
      tags:
      - Labels
    get:
      parameters:
      - description: Label ID
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/types.LabelOut'
      security:
      - Bearer: []
      summary: Gets a label and fields
      tags:
      - Labels
    put:
      parameters:
      - description: Label ID
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/types.LabelOut'
      security:
      - Bearer: []
      summary: updates a label
      tags:
      - Labels
  /v1/locations:
    get:
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/server.Results'
            - properties:
                items:
                  items:
                    $ref: '#/definitions/types.LocationCount'
                  type: array
              type: object
      security:
      - Bearer: []
      summary: Get All Locations
      tags:
      - Locations
    post:
      parameters:
      - description: Location Data
        in: body
        name: payload
        required: true
        schema:
          $ref: '#/definitions/types.LocationCreate'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/types.LocationSummary'
      security:
      - Bearer: []
      summary: Create a new location
      tags:
      - Locations
  /v1/locations/{id}:
    delete:
      parameters:
      - description: Location ID
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "204":
          description: ""
      security:
      - Bearer: []
      summary: deletes a location
      tags:
      - Locations
    get:
      parameters:
      - description: Location ID
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/types.LocationOut'
      security:
      - Bearer: []
      summary: Gets a location and fields
      tags:
      - Locations
    put:
      parameters:
      - description: Location ID
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/types.LocationOut'
      security:
      - Bearer: []
      summary: updates a location
      tags:
      - Locations
  /v1/status:
    get:
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/types.ApiSummary'
      summary: Retrieves the basic information about the API
      tags:
      - Base
  /v1/users/login:
    post:
      consumes:
      - application/x-www-form-urlencoded
      - application/json
      parameters:
      - description: string
        example: admin@admin.com
        in: formData
        name: username
        type: string
      - description: string
        example: admin
        in: formData
        name: password
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/types.TokenResponse'
      summary: User Login
      tags:
      - Authentication
  /v1/users/logout:
    post:
      responses:
        "204":
          description: ""
      security:
      - Bearer: []
      summary: User Logout
      tags:
      - Authentication
  /v1/users/refresh:
    get:
      description: |-
        handleAuthRefresh returns a handler that will issue a new token from an existing token.
        This does not validate that the user still exists within the database.
      responses:
        "200":
          description: ""
      security:
      - Bearer: []
      summary: User Token Refresh
      tags:
      - Authentication
  /v1/users/register:
    post:
      parameters:
      - description: User Data
        in: body
        name: payload
        required: true
        schema:
          $ref: '#/definitions/types.UserRegistration'
      produces:
      - application/json
      responses:
        "204":
          description: ""
      summary: Get the current user
      tags:
      - User
  /v1/users/self:
    delete:
      produces:
      - application/json
      responses:
        "204":
          description: ""
      security:
      - Bearer: []
      summary: Deletes the user account
      tags:
      - User
    get:
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/server.Result'
            - properties:
                item:
                  $ref: '#/definitions/ent.User'
              type: object
      security:
      - Bearer: []
      summary: Get the current user
      tags:
      - User
    put:
      parameters:
      - description: User Data
        in: body
        name: payload
        required: true
        schema:
          $ref: '#/definitions/types.UserUpdate'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/server.Result'
            - properties:
                item:
                  $ref: '#/definitions/types.UserUpdate'
              type: object
      security:
      - Bearer: []
      summary: Update the current user
      tags:
      - User
  /v1/users/self/password:
    put:
      produces:
      - application/json
      responses:
        "204":
          description: ""
      security:
      - Bearer: []
      summary: 'Update the current user''s password // TODO:'
      tags:
      - User
securityDefinitions:
  Bearer:
    description: '"Type ''Bearer TOKEN'' to correctly set the API Key"'
    in: header
    name: Authorization
    type: apiKey
swagger: "2.0"