Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrorParamsEmpty errors.CodeError = iota + errors.MinPkgStatic ErrorFileInfo ErrorFileOpen ErrorFiletemp ErrorFileNotFound )
Variables ¶
This section is empty.
Functions ¶
func IsCodeError ¶
func IsCodeError() bool
Types ¶
type Static ¶
type Static interface { RegisterRouter(route string, register librtr.RegisterRouter, router ...gin.HandlerFunc) RegisterRouterInGroup(route, group string, register librtr.RegisterRouterInGroup, router ...gin.HandlerFunc) RegisterLogger(log func() liblog.Logger) SetDownload(pathFile string, flag bool) SetIndex(group, route, pathFile string) GetIndex(group, route string) string SetRedirect(srcGroup, srcRoute, dstGroup, dstRoute string) GetRedirect(srcGroup, srcRoute string) string SetSpecific(group, route string, router gin.HandlerFunc) GetSpecific(group, route string) gin.HandlerFunc IsDownload(pathFile string) bool IsIndex(pathFile string) bool IsIndexForRoute(pathFile, group, route string) bool IsRedirect(group, route string) bool Has(pathFile string) bool List(rootPath string) ([]string, liberr.Error) Find(pathFile string) (io.ReadCloser, liberr.Error) Info(pathFile string) (os.FileInfo, liberr.Error) Temp(pathFile string) (libiot.FileProgress, liberr.Error) Map(func(pathFile string, inf os.FileInfo) error) liberr.Error UseTempForFileSize(size int64) StatusInfo() (name string, release string, hash string) StatusHealth() error StatusComponent(mandatory bool, message libsts.FctMessage, infoCacheTimeout, healthCacheTimeout time.Duration, sts libsts.RouteStatus) Get(c *gin.Context) SendFile(c *gin.Context, filename string, size int64, isDownload bool, buf io.ReadCloser) }
Click to show internal directories.
Click to hide internal directories.