http

package
v0.0.0-...-52787d2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2024 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Fields = fields{
	Image:    "image",
	Pdf:      "pdf",
	Markdown: "markdown",
	Svg:      "svg",
}
View Source
var Messages = messages{
	Success: successMessages{
		Create:           "http_success_create",
		Get:              "http_success_get",
		ImageUploaded:    "http_success_image_uploaded",
		PdfUploaded:      "http_success_pdf_uploaded",
		MarkdownUploaded: "http_success_markdown_uploaded",
		AvatarUploaded:   "http_success_avatar_uploaded",
		Ok:               "http_success_ok",
	},
	Error: errorMessages{
		Create:                  "http_error_create",
		Get:                     "http_error_get",
		OnlyAcceptFormData:      "http_error_only_accept_form_data",
		ImageNotFound:           "http_error_image_not_found",
		PdfNotFound:             "http_error_pdf_not_found",
		MarkdownNotFound:        "http_error_markdown_not_found",
		RequiredAuth:            "http_required_auth",
		AdminRoute:              "http_admin_route",
		CurrentUserAccess:       "http_current_user_access",
		UserNameRequired:        "http_user_name_required",
		AvatarNotFound:          "http_avatar_not_found",
		Forbidden:               "http_forbidden",
		RequiredBusinessSelect:  "http_error_required_owner_select",
		ForbiddenBusinessSelect: "http_error_forbidden_owner_select",
	},
}

Functions

This section is empty.

Types

type Config

type Config struct {
	App         app.Application
	I18n        i18np.I18n
	Validator   validator.Validator
	HttpHeaders config.HttpHeaders
	TokenSrv    token.Service
	SessionSrv  session.Service
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func New

func New(config Config) Server

func (Server) Load

func (h Server) Load(router fiber.Router) fiber.Router

func (Server) UploadAvatar

func (h Server) UploadAvatar(ctx *fiber.Ctx) error

func (Server) UploadBusinessAvatar

func (h Server) UploadBusinessAvatar(ctx *fiber.Ctx) error

func (Server) UploadBusinessCover

func (h Server) UploadBusinessCover(ctx *fiber.Ctx) error

func (Server) UploadImage

func (h Server) UploadImage(ctx *fiber.Ctx) error

func (Server) UploadListingImage

func (h Server) UploadListingImage(ctx *fiber.Ctx) error

func (Server) UploadMarkdown

func (h Server) UploadMarkdown(ctx *fiber.Ctx) error

func (Server) UploadPdf

func (h Server) UploadPdf(ctx *fiber.Ctx) error

func (Server) UploadSvg

func (h Server) UploadSvg(ctx *fiber.Ctx) error

Directories

Path Synopsis
dto
req
res

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL