pack

package
v0.0.0-...-2d053d8 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildFileDataBytes

func BuildFileDataBytes(file *multipart.FileHeader) ([]byte, error)

func BuildSpu

func BuildSpu(spu *modelKitex.Spu) *model.Spu

func BuildSpuImage

func BuildSpuImage(img *modelKitex.SpuImage) *model.SpuImage

func BuildSpuImages

func BuildSpuImages(imgs []*modelKitex.SpuImage) []*model.SpuImage

func BuildSpus

func BuildSpus(spus []*modelKitex.Spu) []*model.Spu

func BuildUserInfo

func BuildUserInfo(u *rpcModel.UserInfo) *model.UserInfo

BuildUserInfo 将 RPC 交流实体转换成 http 返回的实体

func RespData

func RespData(c *app.RequestContext, data any)

func RespError

func RespError(c *app.RequestContext, err error)

func RespList

func RespList(c *app.RequestContext, items any)

func RespSuccess

func RespSuccess(c *app.RequestContext)

Types

type Base

type Base struct {
	Code string `json:"code"`
	Msg  string `json:"message"`
}

type RespWithData

type RespWithData struct {
	Code string `json:"code"`
	Msg  string `json:"message"`
	Data any    `json:"data"`
}

Jump to

Keyboard shortcuts

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