Documentation ¶
Index ¶
- Constants
- Variables
- func BatchInsertMoleculars(ctx context.Context, client *mongo.Client, collection *mongo.Collection, ...) error
- func DeleteMolecular(ctx context.Context, collection *mongo.Collection, Fingerprint string) (err error)
- func InsertMolecular(ctx context.Context, collection *mongo.Collection, molecular *Molecular) error
- type CategoryType
- type Molecular
Constants ¶
View Source
const ( CATEGORY1 CategoryType = "category1" CATEGORY2 = "category2" CATEGORY3 = "category3" )
Variables ¶
View Source
var BJLoc, _ = time.LoadLocation("Asia/Shanghai")
Functions ¶
func BatchInsertMoleculars ¶
func DeleteMolecular ¶
func InsertMolecular ¶
Types ¶
type CategoryType ¶
type CategoryType string
type Molecular ¶
type Molecular struct { ID primitive.ObjectID `bson:"_id"` CreatedAt time.Time `bson:"created_at"` UpdatedAt time.Time `bson:"updated_at"` Deleted bool `bson:"deleted"` Fingerprint string `bson:"fingerprint"` Title string `bson:"title,omitempty"` Category CategoryType `bson:"category,omitempty"` Attributes map[string]string `bson:"attributes,omitempty"` Tags []string `bson:"tags,omitempty"` }
func NewMolecular ¶
Click to show internal directories.
Click to hide internal directories.