contentdb

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContentDBService

type ContentDBService struct {
	DBClient *mongo.Client

	DBNamePrefix string
	// contains filtered or unexported fields
}

func NewContentDBService

func NewContentDBService(configs types.DBConfig, InstanceIDs []string) *ContentDBService

func (*ContentDBService) AddNewsItem added in v0.3.0

func (dbService *ContentDBService) AddNewsItem(instanceID string, newsItem types.NewsItem) (string, error)

func (*ContentDBService) AddTickBiteMapData

func (dbService *ContentDBService) AddTickBiteMapData(instanceID string, tickBiteMapData types.TickBiteMapData) (string, error)

func (*ContentDBService) CreateIndexNewsItemInfos added in v0.2.0

func (dbService *ContentDBService) CreateIndexNewsItemInfos(instanceID string) error

func (*ContentDBService) CreateIndexTickBiteMapInfos added in v0.2.0

func (dbService *ContentDBService) CreateIndexTickBiteMapInfos(instanceID string) error

func (*ContentDBService) DeleteFileInfo added in v0.2.0

func (dbService *ContentDBService) DeleteFileInfo(instanceID string, fileID string) (count int64, err error)

func (*ContentDBService) FindFileInfo added in v0.2.0

func (dbService *ContentDBService) FindFileInfo(instanceID string, fileID string) (types.FileInfo, error)

func (*ContentDBService) FindTickBiteMapDataNewerThan

func (dbService *ContentDBService) FindTickBiteMapDataNewerThan(instanceID string, time int64) (tickBiteMapData []types.TickBiteMapData, err error)

func (*ContentDBService) GetFileInfoList added in v0.2.0

func (dbService *ContentDBService) GetFileInfoList(instanceID string) (fileInfoList []types.FileInfo, err error)

func (*ContentDBService) GetNewsItemsList added in v0.2.0

func (dbService *ContentDBService) GetNewsItemsList(instanceID string) (newsItemList []types.NewsItem, err error)

func (*ContentDBService) SaveFileInfo added in v0.2.0

func (dbService *ContentDBService) SaveFileInfo(instanceID string, fileInfo types.FileInfo) (types.FileInfo, error)

Jump to

Keyboard shortcuts

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