chaoxing

package
v3.34.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: AGPL-3.0 Imports: 24 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CookiesToString

func CookiesToString(cookies []*http.Cookie) string

func EncryptByAES

func EncryptByAES(message, key string) (string, error)

Types

type Addition

type Addition struct {
	// 超星用户名及密码
	UserName string `json:"user_name" required:"true"`
	Password string `json:"password" required:"true"`
	// 从自己新建的小组url里获取
	Bbsid string `json:"bbsid" required:"true"`
	driver.RootID
	// 可不填,程序会自动登录获取
	Cookie string `json:"cookie"`
}

此程序挂载的是超星小组网盘,需要代理才能使用; 登录超星后进入个人空间,进入小组,新建小组,点击进去。 url中就有bbsid的参数,系统限制单文件大小2G,没有总容量限制

type ChaoXing

type ChaoXing struct {
	model.Storage
	Addition
	// contains filtered or unexported fields
}

func (*ChaoXing) Config

func (d *ChaoXing) Config() driver.Config

func (*ChaoXing) Copy

func (d *ChaoXing) Copy(ctx context.Context, srcObj, dstDir model.Obj) error

func (*ChaoXing) Drop

func (d *ChaoXing) Drop(ctx context.Context) error

func (*ChaoXing) GetAddition

func (d *ChaoXing) GetAddition() driver.Additional

func (*ChaoXing) GetFiles

func (d *ChaoXing) GetFiles(parent string) ([]File, error)

func (*ChaoXing) Init

func (d *ChaoXing) Init(ctx context.Context) error
func (d *ChaoXing) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)

func (*ChaoXing) List

func (d *ChaoXing) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)

func (*ChaoXing) Login

func (d *ChaoXing) Login() (string, error)

func (*ChaoXing) MakeDir

func (d *ChaoXing) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error

func (*ChaoXing) Move

func (d *ChaoXing) Move(ctx context.Context, srcObj, dstDir model.Obj) error

func (*ChaoXing) Put

func (d *ChaoXing) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, up driver.UpdateProgress) error

func (*ChaoXing) Remove

func (d *ChaoXing) Remove(ctx context.Context, obj model.Obj) error

func (*ChaoXing) Rename

func (d *ChaoXing) Rename(ctx context.Context, srcObj model.Obj, newName string) error

type Conf

type Conf struct {
	DowloadApi string
	// contains filtered or unexported fields
}

type DownResp

type DownResp struct {
	Msg        string `json:"msg"`
	Duration   int    `json:"duration"`
	Download   string `json:"download"`
	FileStatus string `json:"fileStatus"`
	URL        string `json:"url"`
	Status     bool   `json:"status"`
}

type File

type File struct {
	Cataid  int `json:"cataid"`
	Cfid    int `json:"cfid"`
	Content struct {
		Cfid             int     `json:"cfid"`
		Pid              int     `json:"pid"`
		FolderName       string  `json:"folderName"`
		ShareType        int     `json:"shareType"`
		Preview          string  `json:"preview"`
		Filetype         string  `json:"filetype"`
		PreviewURL       string  `json:"previewUrl"`
		IsImg            bool    `json:"isImg"`
		ParentPath       string  `json:"parentPath"`
		Icon             string  `json:"icon"`
		Suffix           string  `json:"suffix"`
		Duration         int     `json:"duration"`
		Pantype          string  `json:"pantype"`
		Puid             int_str `json:"puid"`
		Filepath         string  `json:"filepath"`
		Crc              string  `json:"crc"`
		Isfile           bool    `json:"isfile"`
		Residstr         string  `json:"residstr"`
		ObjectID         string  `json:"objectId"`
		Extinfo          string  `json:"extinfo"`
		Thumbnail        string  `json:"thumbnail"`
		Creator          int     `json:"creator"`
		ResTypeValue     int     `json:"resTypeValue"`
		UploadDateFormat string  `json:"uploadDateFormat"`
		DisableOpt       bool    `json:"disableOpt"`
		DownPath         string  `json:"downPath"`
		Sort             int     `json:"sort"`
		Topsort          int     `json:"topsort"`
		Restype          string  `json:"restype"`
		Size             int_str `json:"size"`
		UploadDate       int64   `json:"uploadDate"`
		FileSize         string  `json:"fileSize"`
		Name             string  `json:"name"`
		FileID           string  `json:"fileId"`
	} `json:"content"`
	CreatorID  int    `json:"creatorId"`
	DesID      string `json:"des_id"`
	ID         int    `json:"id"`
	Inserttime int64  `json:"inserttime"`
	Key        string `json:"key"`
	Norder     int    `json:"norder"`
	OwnerID    int    `json:"ownerId"`
	OwnerType  int    `json:"ownerType"`
	Path       string `json:"path"`
	Rid        int    `json:"rid"`
	Status     int    `json:"status"`
	Topsign    int    `json:"topsign"`
}

type ListFileResp

type ListFileResp struct {
	Msg      string   `json:"msg"`
	Result   int      `json:"result"`
	Status   bool     `json:"status"`
	UserAuth UserAuth `json:"userAuth"`
	List     []File   `json:"list"`
}

type Resp

type Resp struct {
	Result int `json:"result"`
}

type UploadDataRsp

type UploadDataRsp struct {
	Result int `json:"result"`
	Msg    struct {
		Puid  int    `json:"puid"`
		Token string `json:"token"`
	} `json:"msg"`
}

type UploadDoneParam

type UploadDoneParam struct {
	Cataid string `json:"cataid"`
	Key    string `json:"key"`
	Param  struct {
		DisableOpt       bool      `json:"disableOpt"`
		Resid            int64     `json:"resid"`
		Crc              string    `json:"crc"`
		Puid             int       `json:"puid"`
		Isfile           bool      `json:"isfile"`
		Pantype          string    `json:"pantype"`
		Size             int       `json:"size"`
		Name             string    `json:"name"`
		ObjectID         string    `json:"objectId"`
		Restype          string    `json:"restype"`
		UploadDate       time.Time `json:"uploadDate"`
		ModifyDate       time.Time `json:"modifyDate"`
		UploadDateFormat string    `json:"uploadDateFormat"`
		Residstr         string    `json:"residstr"`
		Suffix           string    `json:"suffix"`
		Preview          string    `json:"preview"`
		Thumbnail        string    `json:"thumbnail"`
		Creator          int       `json:"creator"`
		Duration         int       `json:"duration"`
		IsImg            bool      `json:"isImg"`
		PreviewURL       string    `json:"previewUrl"`
		Filetype         string    `json:"filetype"`
		Filepath         string    `json:"filepath"`
		Sort             int       `json:"sort"`
		Topsort          int       `json:"topsort"`
		ResTypeValue     int       `json:"resTypeValue"`
		Extinfo          string    `json:"extinfo"`
	} `json:"param"`
}

type UploadFileDataRsp

type UploadFileDataRsp struct {
	Result   bool   `json:"result"`
	Msg      string `json:"msg"`
	Crc      string `json:"crc"`
	ObjectID string `json:"objectId"`
	Resid    int64  `json:"resid"`
	Puid     int    `json:"puid"`
	Data     struct {
		DisableOpt       bool      `json:"disableOpt"`
		Resid            int64     `json:"resid"`
		Crc              string    `json:"crc"`
		Puid             int       `json:"puid"`
		Isfile           bool      `json:"isfile"`
		Pantype          string    `json:"pantype"`
		Size             int       `json:"size"`
		Name             string    `json:"name"`
		ObjectID         string    `json:"objectId"`
		Restype          string    `json:"restype"`
		UploadDate       time.Time `json:"uploadDate"`
		ModifyDate       time.Time `json:"modifyDate"`
		UploadDateFormat string    `json:"uploadDateFormat"`
		Residstr         string    `json:"residstr"`
		Suffix           string    `json:"suffix"`
		Preview          string    `json:"preview"`
		Thumbnail        string    `json:"thumbnail"`
		Creator          int       `json:"creator"`
		Duration         int       `json:"duration"`
		IsImg            bool      `json:"isImg"`
		PreviewURL       string    `json:"previewUrl"`
		Filetype         string    `json:"filetype"`
		Filepath         string    `json:"filepath"`
		Sort             int       `json:"sort"`
		Topsort          int       `json:"topsort"`
		ResTypeValue     int       `json:"resTypeValue"`
		Extinfo          string    `json:"extinfo"`
	} `json:"data"`
}

type UserAuth

type UserAuth struct {
	GroupAuth struct {
		AddData                 int    `json:"addData"`
		AddDataFolder           int    `json:"addDataFolder"`
		AddLebel                int    `json:"addLebel"`
		AddManager              int    `json:"addManager"`
		AddMem                  int    `json:"addMem"`
		AddTopicFolder          int    `json:"addTopicFolder"`
		AnonymousAddReply       int    `json:"anonymousAddReply"`
		AnonymousAddTopic       int    `json:"anonymousAddTopic"`
		BatchOperation          int    `json:"batchOperation"`
		DelData                 int    `json:"delData"`
		DelDataFolder           int    `json:"delDataFolder"`
		DelMem                  int    `json:"delMem"`
		DelTopicFolder          int    `json:"delTopicFolder"`
		Dismiss                 int    `json:"dismiss"`
		ExamEnc                 string `json:"examEnc"`
		GroupChat               int    `json:"groupChat"`
		IsShowCircleChatButton  int    `json:"isShowCircleChatButton"`
		IsShowCircleCloudButton int    `json:"isShowCircleCloudButton"`
		IsShowCompanyButton     int    `json:"isShowCompanyButton"`
		Join                    int    `json:"join"`
		MemberShowRankSet       int    `json:"memberShowRankSet"`
		ModifyDataFolder        int    `json:"modifyDataFolder"`
		ModifyExpose            int    `json:"modifyExpose"`
		ModifyName              int    `json:"modifyName"`
		ModifyShowPic           int    `json:"modifyShowPic"`
		ModifyTopicFolder       int    `json:"modifyTopicFolder"`
		ModifyVisibleState      int    `json:"modifyVisibleState"`
		OnlyMgrScoreSet         int    `json:"onlyMgrScoreSet"`
		Quit                    int    `json:"quit"`
		SendNotice              int    `json:"sendNotice"`
		ShowActivityManage      int    `json:"showActivityManage"`
		ShowActivitySet         int    `json:"showActivitySet"`
		ShowAttentionSet        int    `json:"showAttentionSet"`
		ShowAutoClearStatus     int    `json:"showAutoClearStatus"`
		ShowBarcode             int    `json:"showBarcode"`
		ShowChatRoomSet         int    `json:"showChatRoomSet"`
		ShowCircleActivitySet   int    `json:"showCircleActivitySet"`
		ShowCircleSet           int    `json:"showCircleSet"`
		ShowCmem                int    `json:"showCmem"`
		ShowDataFolder          int    `json:"showDataFolder"`
		ShowDelReason           int    `json:"showDelReason"`
		ShowForward             int    `json:"showForward"`
		ShowGroupChat           int    `json:"showGroupChat"`
		ShowGroupChatSet        int    `json:"showGroupChatSet"`
		ShowGroupSquareSet      int    `json:"showGroupSquareSet"`
		ShowLockAddSet          int    `json:"showLockAddSet"`
		ShowManager             int    `json:"showManager"`
		ShowManagerIdentitySet  int    `json:"showManagerIdentitySet"`
		ShowNeedDelReasonSet    int    `json:"showNeedDelReasonSet"`
		ShowNotice              int    `json:"showNotice"`
		ShowOnlyManagerReplySet int    `json:"showOnlyManagerReplySet"`
		ShowRank                int    `json:"showRank"`
		ShowRank2               int    `json:"showRank2"`
		ShowRecycleBin          int    `json:"showRecycleBin"`
		ShowReplyByClass        int    `json:"showReplyByClass"`
		ShowReplyNeedCheck      int    `json:"showReplyNeedCheck"`
		ShowSignbanSet          int    `json:"showSignbanSet"`
		ShowSpeechSet           int    `json:"showSpeechSet"`
		ShowTopicCheck          int    `json:"showTopicCheck"`
		ShowTopicNeedCheck      int    `json:"showTopicNeedCheck"`
		ShowTransferSet         int    `json:"showTransferSet"`
	} `json:"groupAuth"`
	OperationAuth struct {
		Add                int `json:"add"`
		AddTopicToFolder   int `json:"addTopicToFolder"`
		ChoiceSet          int `json:"choiceSet"`
		DelTopicFromFolder int `json:"delTopicFromFolder"`
		Delete             int `json:"delete"`
		Reply              int `json:"reply"`
		ScoreSet           int `json:"scoreSet"`
		TopSet             int `json:"topSet"`
		Update             int `json:"update"`
	} `json:"operationAuth"`
}

Jump to

Keyboard shortcuts

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