Initial commit

This commit is contained in:
Donny
2019-04-22 20:46:32 +08:00
commit 49ab8aadd1
25441 changed files with 4055000 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
package videoup
import (
"go-common/app/admin/main/mcn/conf"
"go-common/app/service/main/videoup/model/archive"
bm "go-common/library/net/http/blademaster"
)
const (
_typeURL = "/videoup/types"
)
// Dao .
type Dao struct {
c *conf.Config
client *bm.Client
videTypeURL string
videoUpTypeCache map[int]archive.Type
}
// New new a Dao and return.
func New(c *conf.Config) (d *Dao) {
d = &Dao{
c: c,
// http client
client: bm.NewClient(c.HTTPClient),
videTypeURL: c.Host.Videoup + _typeURL,
videoUpTypeCache: make(map[int]archive.Type),
}
d.refreshUpType()
go d.refreshUpTypeAsync()
return
}