gateway

package
v0.5.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	CoreServiceURL = "http://10.62.0.1:40100/syy"
	OSURL          = "http://10.62.0.1:40000/os"
	UnixSocketFile = "/siyouyun/unix-socket/syy_os_file.socket"
)
View Source
const (
	KVApiPut    = "/put"
	KVApiDelete = "/delete"
	KVApiGet    = "/value"
)
View Source
const (
	AppCodeQuery = "appCode"
	TypeQuery    = "type"
	KeyQuery     = "key"
	ValueQuery   = "value"
)
View Source
const (
	ScheduleOnceCreateApi = "/once/create"
	ScheduleOnceUpdateApi = "/once/update"
	ScheduleCronCreateApi = "/cron/create"
	ScheduleCronUpdateApi = "/cron/update"
)

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 CronCreateBody

type CronCreateBody struct {
	UGN     *utils.UserGroupNamespace
	AppCode string `json:"appCode"`
	Name    string `json:"name"`
	Payload []byte `json:"payload"`
	Cron    string `json:"cron"`
}

type FFmpegOSApi

type FFmpegOSApi struct {
	Host string
	*utils.UserGroupNamespace
}

func NewFFmpegOSApi

func NewFFmpegOSApi(ugn *utils.UserGroupNamespace) *FFmpegOSApi

func (*FFmpegOSApi) GetInfo

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

GetInfo GetInfo

type KVCoreApi

type KVCoreApi struct {
	Host    string
	AppCode string
	UGN     *utils.UserGroupNamespace
}

func NewKVCoreApi

func NewKVCoreApi(appCode string, ugn *utils.UserGroupNamespace) *KVCoreApi

func (*KVCoreApi) DeleteKV

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

DeleteKV DeleteKV

func (*KVCoreApi) GetKV

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

GetKV GetKV

func (*KVCoreApi) PutKV

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

PutKV PutKV

type OnceCreateBody

type OnceCreateBody struct {
	UGN        *utils.UserGroupNamespace
	AppCode    string `json:"appCode"`
	Name       string `json:"name"`
	Payload    []byte `json:"payload"`
	RemindTime int64  `json:"remindTime"`
}

type ScheduleApi

type ScheduleApi struct {
	Host    string
	AppCode string
	UGN     *utils.UserGroupNamespace
}

func NewScheduleApi

func NewScheduleApi(appCode string, ugn *utils.UserGroupNamespace) *ScheduleApi

func (*ScheduleApi) CronCreate

func (sa *ScheduleApi) CronCreate(name string, payload []byte, c string) (error, *int64)

func (*ScheduleApi) CronUpdate

func (sa *ScheduleApi) CronUpdate(eventId int64, c string) error

func (*ScheduleApi) OnceCreate

func (sa *ScheduleApi) OnceCreate(name string, payload []byte, remindTime int64) (error, *int64)

func (*ScheduleApi) OnceUpdate

func (sa *ScheduleApi) OnceUpdate(eventId int64, remindTime int64) error

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