mongodb

package
v0.0.0-...-1aee4c6 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

@Time : 2019/9/3 10:37 @Author : duanqiangwen @File : config @Software: GoLand

@Time : 2019/9/3 10:26 @Author : duanqiangwen @File : client @Software: GoLand

@Time : 2019/9/3 11:40 @Author : duanqiangwen @File : doc_model @Software: GoLand

Index

Constants

View Source
const (
	MongoHost     = ""
	MongoPort     = ""
	MongoDatabase = ""
	MongoUsername = ""
	MongoPassword = ""
)
View Source
const (
	IsDeletedFalse = 0
	IsDeletedTrue  = 1
	DefaultVersion = "1.0"
)

Variables

This section is empty.

Functions

func Insert

func Insert(db string, docs ...interface{})

Types

type Project

type Project struct {
	Id_       bson.ObjectId `json:"_id" bson:"_id,omitempty"`
	Name      string        `json:"name" bson:"name"`
	Host      string        `json:"host" bson:"host"`
	IsDeleted uint8         `json:"is_deleted" bson:"is_deleted"`
	CreatedAt time.Time     `json:"created_at"  bson:"created_at"`
	UpdateAt  time.Time     `json:"updated_at"  bson:"updated_at"`
}

func FindProjectByHost

func FindProjectByHost(host string) *Project

type SwaggerLocation

type SwaggerLocation struct {
	Id_       bson.ObjectId          `json:"_id" bson:"_id,omitempty"`
	ProjectId bson.ObjectId          `json:"project_id" bson:"project_id"`
	Version   string                 `json:"version" bson:"version"`
	Hash      string                 `json:"hash" bson:"hash"`
	Location  map[string]interface{} `json:"location" bson:"location"`
	IsDeleted uint8                  `json:"is_deleted" bson:"is_deleted"`
	CreatedAt time.Time              `json:"created_at"  bson:"created_at"`
	UpdateAt  time.Time              `json:"updated_at"  bson:"updated_at"`
}

func FindLocationMaxVersion

func FindLocationMaxVersion(projectId bson.ObjectId) *SwaggerLocation

Jump to

Keyboard shortcuts

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