Documentation ¶
Index ¶
- Variables
- func CreateMongoCollectionAndIndex(collections []string) error
- func DestroyCosHandle()
- func GetCosHandle() *AliOssSdk.Client
- func GetMongoDbClient() *mongo.Client
- func GetMongoDbCollectionHandle() *mongo.Collection
- func GetMongoDbHandle() *mongo.Database
- func GetObjectFromKey(catalog string, objectKey string) (string, error)
- func InitCos() error
- func InitMongoDb() error
- func StorageFromIoReader(catalog string, objectKey string, file io.Reader) error
- type EconomicsRecordContentCollection
- type EntertainmentRecordContentCollection
- type GenerationRecordContent
- type MilitaryRecordContentCollection
- type PersonageRecordContentContentCollection
- type SportRecordContentCollection
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CosHandle *AliOssSdk.Client CosBucketHandle *AliOssSdk.Bucket CosLock = sync.RWMutex{} BucketPrefix = "niwo" )
View Source
var ( MongoDbClient *mongo.Client MongoDbHandle *mongo.Database MongoDbCollectionHandle *mongo.Collection MongoLock = sync.RWMutex{} )
Functions ¶
func DestroyCosHandle ¶
func DestroyCosHandle()
func GetCosHandle ¶
func GetMongoDbClient ¶
func GetMongoDbCollectionHandle ¶
func GetMongoDbCollectionHandle() *mongo.Collection
func GetMongoDbHandle ¶
func InitMongoDb ¶
func InitMongoDb() error
Types ¶
type EconomicsRecordContentCollection ¶
type EconomicsRecordContentCollection struct { Uuid string `json:"uuid"` Content string `json:"content"` }
经济记录内容集
type EntertainmentRecordContentCollection ¶
type EntertainmentRecordContentCollection struct { Uuid string `json:"uuid"` Content string `json:"content"` }
娱乐记录内容集
type GenerationRecordContent ¶
通用记录内容
type MilitaryRecordContentCollection ¶
type MilitaryRecordContentCollection struct { Uuid string `json:"uuid"` Content string `json:"content"` }
军事记录内容集
type PersonageRecordContentContentCollection ¶
type PersonageRecordContentContentCollection struct { Uuid string `json:"uuid"` Content string `json:"content"` }
人物记录内容集
type SportRecordContentCollection ¶
type SportRecordContentCollection struct { Uuid string `json:"uuid"` Content string `json:"content"` }
体育记录内容集
Click to show internal directories.
Click to hide internal directories.