storage

package
v0.0.0-...-fc9f0a5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

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 CreateMongoCollectionAndIndex

func CreateMongoCollectionAndIndex(collections []string) error

func DestroyCosHandle

func DestroyCosHandle()

func GetCosHandle

func GetCosHandle() *AliOssSdk.Client

func GetMongoDbClient

func GetMongoDbClient() *mongo.Client

func GetMongoDbCollectionHandle

func GetMongoDbCollectionHandle() *mongo.Collection

func GetMongoDbHandle

func GetMongoDbHandle() *mongo.Database

func GetObjectFromKey

func GetObjectFromKey(catalog string, objectKey string) (string, error)

func InitCos

func InitCos() error

阿里云对象存储

func InitMongoDb

func InitMongoDb() error

func StorageFromIoReader

func StorageFromIoReader(catalog string, objectKey string, file io.Reader) 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 GenerationRecordContent struct {
	Uuid    string `json:"uuid"`
	Content string `json:"content"`
}

通用记录内容

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"`
}

体育记录内容集

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL