Documentation
¶
Index ¶
- Constants
- Variables
- func ConnRD()
- func DrawFile(path string) (string, error)
- func GenerateToken() string
- func GetCache(path string) string
- func GetContentType(path string) string
- func GetToken() (string, error)
- func GetV(key string) (string, error)
- func Init(prefix string) *gin.Engine
- func Log(s string)
- func Md5(source string) string
- func Min(a int, b int) int
- func RemoveCache(path string)
- func Request(method string, url string, headers map[string]string, payload []byte) ([]byte, error)
- func SetCache(path string, data []byte)
- func SetE(key string, data string, expire string)
- func SetExp(key string)
- func SetV(key string, data string)
- func Slink(isUpload bool, path string, fh *multipart.FileHeader) (string, error)
- func TestError(data *EndPointSrv) bool
- func TypeByExtension(extension string) string
- func UploadFile(path string, fh *multipart.FileHeader) (string, error)
- type Answer
- type DBModi
- type DBTPush
- type EndPointSrv
- type FileInfo
- type HashList
- type HttpRequestFormat
- type MSFile
- type MSFileRes
- type MSRespond
- type MultiEndPointSrv
- type UploaderFormat
Constants ¶
View Source
const CachedPath = "/tmp/core-"
View Source
const RDPrefix = "slink_"
Variables ¶
View Source
var ODExpire int64 = 0
View Source
var ODToken string = ""
View Source
var RDClient *redis.Client = nil
Functions ¶
func GenerateToken ¶
func GenerateToken() string
func GetContentType ¶
func RemoveCache ¶
func RemoveCache(path string)
func TestError ¶
func TestError(data *EndPointSrv) bool
func TypeByExtension ¶
TypeByExtension returns the content type based on the extension of the file
func UploadFile ¶
func UploadFile(path string, fh *multipart.FileHeader) (string, error)
Types ¶
type DBModi ¶
type EndPointSrv ¶
type HttpRequestFormat ¶
type MultiEndPointSrv ¶
type MultiEndPointSrv struct { State int `json:"state,omitempty"` Refresh *EndPointSrv `json:"odrefresh,omitempty"` Token *EndPointSrv `json:"odtoken,omitempty"` Expire *EndPointSrv `json:"odexpire,omitempty"` ClientID *EndPointSrv `json:"clientid,omitempty"` Redirect *EndPointSrv `json:"redirecturi,omitempty"` ClientSC *EndPointSrv `json:"clientsc,omitempty"` }
type UploaderFormat ¶
type UploaderFormat struct {
UploadUrl string `json:"uploadUrl"`
}
Click to show internal directories.
Click to hide internal directories.