transformer

package
v2.3.182 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2025 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SimpleTaskTransformer

type SimpleTaskTransformer struct {
	ID        int    `json:"id"`
	Name      string `json:"name"`
	Status    string `json:"status"`
	Type      string `json:"type"`
	CreatedAt string `json:"created_at"`
	UpdatedAt string `json:"updated_at"`

	User *UserSimpleTransformer `json:"user,omitempty"`
}

func SimpleTaskTransform

func SimpleTaskTransform(m *model.Task) *SimpleTaskTransformer

type TaskListTransformer

type TaskListTransformer struct {
	ID        int    `json:"id"`
	Name      string `json:"name"`
	Status    string `json:"status"`
	Type      string `json:"type"`
	CreatedAt string `json:"created_at"`
	UpdatedAt string `json:"updated_at"`

	User *UserSimpleTransformer `json:"user,omitempty"`
}

func TaskListTransform

func TaskListTransform(c *gin.Context, p *model2.Pagination[model.Task]) []TaskListTransformer

type TaskTransformer

type TaskTransformer struct {
	ID        int             `json:"id"`
	Name      string          `json:"name"`
	UserID    int             `json:"user_id"`
	Status    string          `json:"status"`
	Type      string          `json:"type"`
	Message   *model3.Message `json:"message,omitempty"`
	FileSize  *int64          `json:"file_size,omitempty"`
	CreatedAt string          `json:"created_at"`
	UpdatedAt string          `json:"updated_at"`

	User *UserSimpleTransformer `json:"user,omitempty"`
}

func TaskTransform

func TaskTransform(m *model.Task) *TaskTransformer

type UserSimpleTransformer added in v2.3.64

type UserSimpleTransformer struct {
	ID         int     `json:"id"`
	Login      string  `json:"login"`
	FirstName  string  `json:"first_name"`
	SecondName *string `json:"second_name"`
	LastName   *string `json:"last_name"`
}

func UserSimpleTransform added in v2.3.64

func UserSimpleTransform(m *model.User) *UserSimpleTransformer

Jump to

Keyboard shortcuts

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