gateway

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CoreServiceURL = "http://10.62.0.1:40100/syy"
	OSServiceURL   = "http://10.62.0.1:40000/os"
	UnixSocketFile = "/siyouyun/unix-socket/syy_os_file.socket"
)

Variables

This section is empty.

Functions

func GetAppInfo

func GetAppInfo(code string) (*sdkdto.AppRegisterInfo, error)

func RegisterAppMessageRobot added in v0.4.16

func RegisterAppMessageRobot(appCode, robotDesc string) error

func SendMessage

func SendMessage(ugn *utils.UserGroupNamespace, appCode, content, replyUUID string) error

Types

type StorageApi

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

func NewStorageApi

func NewStorageApi(ugn *utils.UserGroupNamespace) *StorageApi

func (StorageApi) Chtimes

func (s StorageApi) Chtimes(path string, atime time.Time, mtime time.Time) error

Chtimes 修改文件时间

func (StorageApi) EnsureDirExist

func (s StorageApi) EnsureDirExist(path string)

EnsureDirExist 确保目录存在

func (StorageApi) FileExists

func (s StorageApi) FileExists(path string) bool

FileExists 文件是否存在

func (StorageApi) InodeToFileInfo

func (s StorageApi) InodeToFileInfo(inode uint64) *sdkdto.FileInfoRes

InodeToFileInfo inode转fileInfo

func (StorageApi) InodeToPath

func (s StorageApi) InodeToPath(inode uint64) string

InodeToPath inode转path

func (StorageApi) InodesToFileInfos

func (s StorageApi) InodesToFileInfos(inodes ...uint64) map[uint64]*sdkdto.FileInfoRes

InodesToFileInfos inodes转fileInfos

func (StorageApi) MkdirAll

func (s StorageApi) MkdirAll(path string) error

MkdirAll 递归创建目录

func (StorageApi) Open

func (s StorageApi) Open(path string) (*os.File, error)

Open 打开文件

func (StorageApi) OpenAvatarFile added in v0.4.13

func (s StorageApi) OpenAvatarFile(path string) (*os.File, error)

OpenAvatarFile 打开替身文件

func (StorageApi) OpenFile

func (s StorageApi) OpenFile(path string, flag int, perm os.FileMode) (*os.File, error)

OpenFile 打开或创建文件

func (StorageApi) PathToInode

func (s StorageApi) PathToInode(path string) uint64

PathToInode path转inode

func (StorageApi) Remove

func (s StorageApi) Remove(path string) error

Remove 删除文件或空目录

func (StorageApi) RemoveAll added in v0.4.22

func (s StorageApi) RemoveAll(path string) error

RemoveAll 删除文件或文件夹(包括子目录)

func (StorageApi) Rename

func (s StorageApi) Rename(oldPath, newPath string) error

Rename 重命名文件

Jump to

Keyboard shortcuts

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