Documentation ¶
Overview ¶
Copyright (c) 2023, donnie <donnie4w@gmail.com> All rights reserved. Use of t source code is governed by a BSD-style license that can be found in the LICENSE file.
github.com/donnie4w/wfs
Copyright (c) 2023, donnie <donnie4w@gmail.com> All rights reserved. Use of t source code is governed by a BSD-style license that can be found in the LICENSE file.
github.com/donnie4w/wfs
Copyright (c) 2023, donnie <donnie4w@gmail.com> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
github.com/donnie4w/wfs
Index ¶
Constants ¶
View Source
const ( KB = 1 << 10 MB = 1 << 20 GB = 1 << 30 )
View Source
const VERSION = "1.0.6"
Variables ¶
View Source
var ( Serve = hashmap.NewSortMap[int, Server]() Wfs Server STARTTIME = time.Now() UUID int64 Service string LOGDEBUG bool GOGC int Pid string ORIGIN string DEBUGADDR string WFSJSON string Conf *ConfBean Mode = 1 MaxSigma = float64(20) MaxSide = 10000 MaxPixel = 300000000 CompressType = int32(1) WFSDATA = "wfsdata" IMAGEVIEW2 = "?imageView2" IMAGEVIEW = "?imageView" IMAGEMODE = "?mode" MD2HTML = "?md2html" DefaultAccount = [2]string{"admin", "123"} WEBADDR = fmt.Sprint(6<<10 + 2) OPADDR = fmt.Sprint(":", 5<<10+2) LISTEN = 4<<10 + 2 SYNC = false Restrict = 95 DBBUFFER = 1 << 6 * MB InaccurateTime = time.Now().UnixNano() ConnectTimeout = 10 * time.Second WaitTimeout = 10 * time.Second FileSize = int64(1000 * MB) DataMaxsize = FileSize / 5 SocketTimeout = 10 * time.Second OpenSSL = &openssl{} Memlimit = int64(1 << 10) FileHash = 0 )
View Source
var ( KeyStoreInit func(string) Count func() int64 Seq func() int64 AppendData func(string, []byte, int32) (int64, ERROR) GetData func(string) []byte DelData func(string) ERROR Add func([]byte, []byte) error Del func([]byte) error SearchLike func(string) []*PathBean SearchLimit func(int64, int64) []*PathBean Defrag func(string) ERROR FragAnalysis func(string) (*FragBean, ERROR) Export func(func(*stub.SnapshotBean) bool) error ExportByINCR func(int64, int64, func(*stub.SnapshotBeans) bool) ERROR ExportFile func(int64, int64, func(*stub.SnapshotFile) bool) ERROR ExportByPaths func([]string, func(snaps *stub.SnapshotBeans) bool) ERROR Import func(*stub.SnapshotBean, bool) error ImportFile func(*stub.SnapshotFile) ERROR Modify func(string, string) ERROR WsClient func(tls bool, pid, opaddr, requri, name, pwd string) (ws *WS, err error) IsEmptyBigFile func(string) bool )
View Source
var ERR_AUTH = err(4105, "limited authority")
View Source
var ERR_DEFRAG_FORBID = err(5102, "operation files cannot be defragmented")
View Source
var ERR_DEFRAG_UNDERWAY = err(5103, "defragmentation is underway")
View Source
var ERR_EXSIT = err(4104, "has exist")
View Source
var ERR_FILEAPPEND = err(5105, "append data error")
View Source
var ERR_FILECREATE = err(5106, "create file error")
View Source
var ERR_NEWPATHEXIST = err(4107, "the new path already exists")
View Source
var ERR_NOPASS = err(4102, "verification fail")
View Source
var ERR_NOTEXSIT = err(4106, "not exist")
View Source
var ERR_OVERSIZE = err(4101, "data oversize")
View Source
var ERR_PARAMS = err(4103, "parameter error")
View Source
var ERR_STOPSERVICE = err(5104, "service has stopped")
View Source
var ERR_UNDEFINED = err(5101, "undefined error")
Functions ¶
Types ¶
type ConfBean ¶
type ConfBean struct { FileSize int64 `json:"filesize"` Opaddr *string `json:"opaddr"` WebAddr *string `json:"webaddr"` Listen int `json:"listen"` Admin_Ssl_crt string `json:"admin.ssl_certificate"` Admin_Ssl_crt_key string `json:"admin.ssl_certificate_key"` Ssl_crt string `json:"ssl_certificate"` Ssl_crt_key string `json:"ssl_certificate_key"` Memlimit int64 `json:"memlimit"` DataMaxsize int64 `json:"data.maxsize"` Init bool `json:"init"` Keystore *string `json:"keystore"` Mode *int `json:"mode"` Sync *bool `json:"sync"` Compress *int32 `json:"compress"` WfsData *string `json:"data.dir"` SLASH bool `json:"prefix.slash"` MaxSigma float64 `json:"maxsigma"` MaxSide int `json:"maxside"` MaxPixel int `json:"maxpixel"` Resample int8 `json:"resample"` ImgViewingRevProxy string `json:"imgViewingRevProxy"` FileHash *int `json:"filehash"` AdminUserName *string `json:"adminusername"` AdminPassword *string `json:"adminpassword"` Restrict *int `json:"restrict"` }
Click to show internal directories.
Click to hide internal directories.