response

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: May 2, 2025 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorResponse

type ErrorResponse struct {
	Error string `json:"error"`
}

type ImageResponse

type ImageResponse struct {
	Url       string    `json:"url"`
	S3Key     string    `json:"s3_key"`
	Size      int       `json:"size,omitempty"`
	MimeType  string    `json:"mimeType,omitempty"`
	ExpiresAt time.Time `json:"expiresAt,omitempty"`
	CreatedAt time.Time `json:"createdAt"`
}

ImageResponse godoc @Description Структура ответа для изображения @Tags response @Properties @Property url string "URL изображения" @Property s3_key string "Ключ S3" @Property size int "Размер файла в байтах" // Опционально @Property mimeType string "MIME тип файла" // Опционально @Property expiresAt string "Время истечения срока действия ссылки" // Опционально @Property createdAt string "Время создания изображения" @Success 200 {object} ImageResponse

func (*ImageResponse) Marker

func (r *ImageResponse) Marker()

type Response

type Response interface {
	Marker()
}

type RoleResponse

type RoleResponse struct {
	Name        role_enum.RoleName `json:"name"`
	Description string             `json:"description,omitempty"`
}

func (*RoleResponse) Marker

func (r *RoleResponse) Marker()

type SuccessResponse

type SuccessResponse struct {
	Success bool   `json:"success"`
	Message string `json:"message"`
}

type UserResponse

type UserResponse struct {
	Username  string        `json:"username"`
	Email     string        `json:"email"`
	FirstName string        `json:"first_name,omitempty"`
	LastName  string        `json:"last_name,omitempty"`
	Role      *RoleResponse `json:"role"`
	IsActive  bool          `json:"is_active"`
	LastLogin *time.Time    `json:"last_login,omitempty"`
	CreatedAt time.Time     `json:"created_at"`
	UpdatedAt time.Time     `json:"updated_at"`
}

func (*UserResponse) Marker

func (r *UserResponse) Marker()

Jump to

Keyboard shortcuts

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