base

package
v0.0.1-rc3 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveFiles

func SaveFiles(g *gin.Context, path string) error

func SaveToTarFile

func SaveToTarFile(g *gin.Context, path string) error

SaveToTarFile 保存为tar压缩文件

func Send

func Send(g *gin.Context, v interface{})

func Upgrade

func Upgrade(w http.ResponseWriter, r *http.Request) (*websocket.Conn, error)

Types

type Base

type Base[T any] struct {
	types.Base[T]
}

func (*Base[T]) WithCode

func (r *Base[T]) WithCode(code types.Code) IBase[T]

func (*Base[T]) WithData

func (r *Base[T]) WithData(data T) IBase[T]

func (*Base[T]) WithError

func (r *Base[T]) WithError(err error) IBase[T]

type IBase

type IBase[T any] interface {
	WithCode(code types.Code) IBase[T]
	WithError(err error) IBase[T]
	WithData(data T) IBase[T]
}

func WithCode

func WithCode[T any](code types.Code) IBase[T]

func WithData

func WithData[T any](data T) IBase[T]

func WithError

func WithError[T any](err error) IBase[T]

Jump to

Keyboard shortcuts

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