gateway

package
v0.2.21 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KVApiPut    = "/put"
	KVApiDelete = "/delete"
	KVApiGet    = "/value"
)
View Source
const (
	AppCodeQuery = "appCode"
	TypeQuery    = "type"
	KeyQuery     = "key"
	ValueQuery   = "value"
)
View Source
const CoreHTTPPort = 40100
View Source
const LocalhostAddress = "http://10.62.0.1"
View Source
const OSHTTPPort = 40000
View Source
const UnixSocketPrefix = "/siyouyun/unix-socket/"

Variables

This section is empty.

Functions

func GetAppInfo

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

func RegisterMessageRobot added in v0.2.20

func RegisterMessageRobot(appCode, robotDesc string) error

func SendMessage added in v0.2.20

func SendMessage(un *utils.UserNamespace, appCode, content, replyUUID string) error

Types

type FFmpegOSApi added in v0.2.3

type FFmpegOSApi struct {
	Host string
	*utils.UserNamespace
}

func NewFFmpegOSApi added in v0.2.3

func NewFFmpegOSApi(un *utils.UserNamespace) *FFmpegOSApi

func (*FFmpegOSApi) GetInfo added in v0.2.3

func (kv *FFmpegOSApi) GetInfo(parentPath, name string) (*sdkdto.FFProbeInfo, error)

GetInfo GetInfo

type KVCoreApi added in v0.2.3

type KVCoreApi struct {
	Host    string
	AppCode string
	*utils.UserNamespace
}

func NewKVCoreApi added in v0.2.3

func NewKVCoreApi(appCode string, un *utils.UserNamespace) *KVCoreApi

func (*KVCoreApi) DeleteKV added in v0.2.3

func (kv *KVCoreApi) DeleteKV(kvType, key string) error

DeleteKV DeleteKV

func (*KVCoreApi) GetKV added in v0.2.3

func (kv *KVCoreApi) GetKV(kvType, key string) (*sdkdto.KV, bool)

GetKV GetKV

func (*KVCoreApi) PutKV added in v0.2.3

func (kv *KVCoreApi) PutKV(kvType, key, value string) error

PutKV PutKV

type StorageApi added in v0.1.21

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

func NewStorageApi added in v0.1.21

func NewStorageApi(un *utils.UserNamespace) *StorageApi

func (StorageApi) Chtimes added in v0.1.25

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

Chtimes 修改文件时间

func (StorageApi) EnsureDirExist added in v0.1.21

func (s StorageApi) EnsureDirExist(ps ...string)

EnsureDirExist 确保目录存在

func (StorageApi) FileExists added in v0.1.21

func (s StorageApi) FileExists(path string) bool

FileExists 文件是否存在

func (StorageApi) InodeToFileInfo added in v0.1.21

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

InodeToFileInfo inode转fileInfo

func (StorageApi) InodeToPath added in v0.1.21

func (s StorageApi) InodeToPath(inode int64) string

InodeToPath inode转path

func (StorageApi) InodesToFileInfos added in v0.1.21

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

InodesToFileInfos inodes转fileInfos

func (StorageApi) MkdirAll added in v0.1.21

func (s StorageApi) MkdirAll(path string) error

MkdirAll 递归创建目录

func (StorageApi) Open added in v0.1.21

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

Open 打开文件

func (StorageApi) OpenFile added in v0.1.21

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

OpenFile 打开或创建文件

func (StorageApi) PathToInode added in v0.1.21

func (s StorageApi) PathToInode(path string) int64

PathToInode path转inode

func (StorageApi) Remove added in v0.1.21

func (s StorageApi) Remove(path string) error

Remove 删除文件

func (StorageApi) Rename added in v0.1.21

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