corehub

package
v0.0.19-pre1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Salt = "signed-file"
)

Variables

This section is empty.

Functions

func SignFileId

func SignFileId(signer *signer.Signer, fid int64) (string, error)

Types

type CoreHub

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

func NewCoreHub

func NewCoreHub(app xtypes.App) *CoreHub

func (*CoreHub) DecodeSpaceFileId

func (c *CoreHub) DecodeSpaceFileId(id string) (int64, error)

func (*CoreHub) EncodeSpaceFileId

func (c *CoreHub) EncodeSpaceFileId(fid int64) (string, error)

func (*CoreHub) ExportState

func (c *CoreHub) ExportState(opts *StateExport) (string, error)

func (*CoreHub) HandleUserWS

func (c *CoreHub) HandleUserWS(userId int64, ctx *gin.Context)

func (*CoreHub) Import

func (c *CoreHub) Import(installId int64, zipfile string) error

func (*CoreHub) ListSpaceFilesSigned

func (c *CoreHub) ListSpaceFilesSigned(installId int64, path string) ([]FileMeta, error)

func (*CoreHub) Run

func (c *CoreHub) Run() error

func (*CoreHub) ServePreviewFileSigned

func (c *CoreHub) ServePreviewFileSigned(refId string, ctx *gin.Context)

func (*CoreHub) ServeSpaceFileSigned

func (c *CoreHub) ServeSpaceFileSigned(refId string, ctx *gin.Context)

func (*CoreHub) UserSendMessage

func (c *CoreHub) UserSendMessage(msg *dbmodels.UserMessage) (int64, error)

type FileMeta

type FileMeta struct {
	Id       string `json:"id"`
	Name     string `json:"name"`
	IsFolder bool   `json:"is_folder"`
	Path     string `json:"path"`
	Size     int64  `json:"size"`
	Mime     string `json:"mime"`
	Hash     string `json:"hash"`
}

type StateExport

type StateExport struct {
	InstallId     int64    `json:"install_id"`
	ExcludeTables []string `json:"exclude_tables"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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