Documentation
¶
Index ¶
- Constants
- Variables
- func VerifyBucketName(name string) bool
- func VerifySign(pkey, signmsg, sign []byte) (bool, error)
- type AuthType
- type Client
- type ConMgr
- type CustomClaims
- type Message
- func NewCloseMsg(fileName string, status Status) *Message
- func NewEndMsg(fileName, fileHash string, size, originSize uint64, lastmark bool) *Message
- func NewFileMsg(fileName string, buflen int, buf []byte) *Message
- func NewHeadMsg(fileName string, fid string, lastmark bool, pkey, signmsg, sign []byte) *Message
- func NewNotifyMsg(fileName string, status Status) *Message
- func NewRecvFileMsg(fid string) *Message
- func NewRecvHeadMsg(fid string, pkey, signmsg, sign []byte) *Message
- type MsgType
- type NetConn
- type Node
- type Notify
- type Oss
- type RtnBlockInfo
- type RtnFileType
- type RtnUserBrief
- type Status
- type TcpCon
Constants ¶
View Source
const ( FileType_file uint8 = 1 FileType_filler uint8 = 2 )
Variables ¶
View Source
var ( HEAD_FILE = []byte("c100") HEAD_FILLER = []byte("c101") )
Functions ¶
func VerifyBucketName ¶
Bucket name verification rules It can only contain numbers, lowercase letters, special characters (. -) And the length is 3-63 Must start and end with a letter or number Must not contain two adjacent points Must not be formatted as an IP address
func VerifySign ¶
Types ¶
type Client ¶
type ConMgr ¶
type ConMgr struct {
// contains filtered or unexported fields
}
type CustomClaims ¶
type CustomClaims struct {
Account string `json:"account"`
jwt.StandardClaims
}
type Message ¶
type Message struct {
Pubkey []byte `json:"pubkey"`
SignMsg []byte `json:"signmsg"`
Sign []byte `json:"sign"`
Bytes []byte `json:"bytes"`
FileName string `json:"filename"`
FileHash string `json:"filehash"`
FileSize uint64 `json:"filesize"`
MsgType MsgType `json:"msgtype"`
LastMark bool `json:"lastmark"`
FileType uint8 `json:"filetype"`
}
func NewCloseMsg ¶
func NewHeadMsg ¶
func NewNotifyMsg ¶
func NewRecvFileMsg ¶
func NewRecvHeadMsg ¶
type Node ¶
type RtnBlockInfo ¶
file block info
type RtnFileType ¶
type RtnFileType struct {
FileSize uint64
FileState string
UserBriefs []RtnUserBrief
BlockInfo []RtnBlockInfo
}
type RtnUserBrief ¶
type TcpCon ¶
type TcpCon struct {
// contains filtered or unexported fields
}
func (*TcpCon) HandlerLoop ¶
func (t *TcpCon) HandlerLoop()
Click to show internal directories.
Click to hide internal directories.