chore: Formatting
This commit is contained in:
parent
69f4de6739
commit
c5da33f10f
@ -5,13 +5,13 @@ import (
|
||||
)
|
||||
|
||||
// GenerateBarcode godoc
|
||||
// @Summary Generate barcodes
|
||||
// @Description Generate barcodes based on the provided data
|
||||
// @Tags barcodes
|
||||
// @Param type path string true "Barcode type" Enums(ean13, code128)
|
||||
// @Param content path string true "Barcode content" MinLength(1)
|
||||
// @Produce image/png
|
||||
// @Router /v1/barcodes/{type}/{content} [get]
|
||||
// @Summary Generate barcodes
|
||||
// @Description Generate barcodes based on the provided data
|
||||
// @Tags barcodes
|
||||
// @Param type path string true "Barcode type" Enums(ean13, code128)
|
||||
// @Param content path string true "Barcode content" MinLength(1)
|
||||
// @Produce image/png
|
||||
// @Router /v1/barcodes/{type}/{content} [get]
|
||||
func (h *DefaultHandler) GenerateBarcode(c *fiber.Ctx) error {
|
||||
c.Set(fiber.HeaderContentType, "text/plain")
|
||||
return c.Send([]byte("Hello, World!"))
|
||||
|
@ -10,14 +10,14 @@ import (
|
||||
)
|
||||
|
||||
// GenerateCard godoc
|
||||
// @Summary Generate runner cards
|
||||
// @Description Generate cards based on the provided data
|
||||
// @Tags pdfs
|
||||
// @Accept json
|
||||
// @Param data body models.CardRequest true "Card data"
|
||||
// @Produce application/pdf
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /v1/pdfs/cards [post]
|
||||
// @Summary Generate runner cards
|
||||
// @Description Generate cards based on the provided data
|
||||
// @Tags pdfs
|
||||
// @Accept json
|
||||
// @Param data body models.CardRequest true "Card data"
|
||||
// @Produce application/pdf
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /v1/pdfs/cards [post]
|
||||
func (h *DefaultHandler) GenerateCard(c *fiber.Ctx) error {
|
||||
cardRequest := new(models.CardRequest)
|
||||
if err := c.BodyParser(cardRequest); err != nil {
|
||||
|
@ -10,14 +10,14 @@ import (
|
||||
)
|
||||
|
||||
// GenerateCertificate godoc
|
||||
// @Summary Generate runner certificates
|
||||
// @Description Generate certificates based on the provided data
|
||||
// @Tags pdfs
|
||||
// @Accept json
|
||||
// @Param data body models.CertificateRequest true "Certificate data"
|
||||
// @Produce application/pdf
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /v1/pdfs/certificates [post]
|
||||
// @Summary Generate runner certificates
|
||||
// @Description Generate certificates based on the provided data
|
||||
// @Tags pdfs
|
||||
// @Accept json
|
||||
// @Param data body models.CertificateRequest true "Certificate data"
|
||||
// @Produce application/pdf
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /v1/pdfs/certificates [post]
|
||||
func (h *DefaultHandler) GenerateCertificate(c *fiber.Ctx) error {
|
||||
certificateRequest := new(models.CertificateRequest)
|
||||
if err := c.BodyParser(certificateRequest); err != nil {
|
||||
|
@ -10,14 +10,14 @@ import (
|
||||
)
|
||||
|
||||
// GenerateContract godoc
|
||||
// @Summary Generate a contract
|
||||
// @Description Generate a contract based on the provided data
|
||||
// @Tags pdfs
|
||||
// @Accept json
|
||||
// @Param data body models.ContractRequest true "Contract data"
|
||||
// @Produce application/pdf
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /v1/pdfs/contracts [post]
|
||||
// @Summary Generate a contract
|
||||
// @Description Generate a contract based on the provided data
|
||||
// @Tags pdfs
|
||||
// @Accept json
|
||||
// @Param data body models.ContractRequest true "Contract data"
|
||||
// @Produce application/pdf
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /v1/pdfs/contracts [post]
|
||||
func (h *DefaultHandler) GenerateContract(c *fiber.Ctx) error {
|
||||
contract := new(models.ContractRequest)
|
||||
if err := c.BodyParser(contract); err != nil {
|
||||
|
20
main.go
20
main.go
@ -55,16 +55,16 @@ func loadEnv() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// @title LfK Document Server API
|
||||
// @description This is the API documentation for the LfK Document Server - a tool for pdf generation.
|
||||
// @license.name CC BY-NC-SA 4.0
|
||||
// @termsOfService https://lauf-fuer-kaya.de/datenschutz
|
||||
// @contact.name ODIT.Services UG (haftungsbeschränkt)
|
||||
// @contact.url https://odit.services
|
||||
// @contact.email info@odit.services
|
||||
// @securityDefinitions.apiKey ApiKeyAuth
|
||||
// @in query
|
||||
// @name key
|
||||
// @title LfK Document Server API
|
||||
// @description This is the API documentation for the LfK Document Server - a tool for pdf generation.
|
||||
// @license.name CC BY-NC-SA 4.0
|
||||
// @termsOfService https://lauf-fuer-kaya.de/datenschutz
|
||||
// @contact.name ODIT.Services UG (haftungsbeschränkt)
|
||||
// @contact.url https://odit.services
|
||||
// @contact.email info@odit.services
|
||||
// @securityDefinitions.apiKey ApiKeyAuth
|
||||
// @in query
|
||||
// @name key
|
||||
func main() {
|
||||
|
||||
err := loadEnv()
|
||||
|
Loading…
x
Reference in New Issue
Block a user