Documentation
¶
Index ¶
- Variables
- func CloseSession(session *mongo.Client)
- func ConnectDB() (*mongo.Client, context.Context, error)
- func DropAndInitDataBase() bool
- func GetBooleanData(data map[string]interface{}, bsonData bson.M, field string) error
- func GetCollection(collection string) (*mongo.Collection, error)
- func GetFloat64Data(data map[string]interface{}, bsonData bson.M, field string) error
- func GetFloatMatrix(data map[string]interface{}, data2Set bson.M, field string) error
- func GetIdData(data map[string]interface{}, bsonData bson.M, field string) error
- func GetIntData(data map[string]interface{}, bsonData bson.M, field string) error
- func GetListData(data map[string]interface{}, data2Set bson.M, field string) error
- func GetStringData(data map[string]interface{}, bsonData bson.M, field string) error
- func GetTimeData(data map[string]interface{}, bsonData bson.M, field string) error
- func SetupSubTest(t *testing.T) func(t *testing.T)
- func SetupTestCase(t *testing.T) func(t *testing.T)
- type CaseTest
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //MongoDBHosts = fmt.Sprintf("mongodb://%s:%s@%s:%s", os.Getenv("DB_USER"), os.Getenv("DB_PASSWORD"), os.Getenv("DB_HOST"), os.Getenv("DB_PORT")) MongoDBHosts = fmt.Sprintf("mongodb://%s:%s", os.Getenv("DB_HOST"), os.Getenv("DB_PORT")) AuthDatabase = os.Getenv("DB_NAME") )
View Source
var (
COLLECTIONS_NAME = []string{
"users",
"modules",
"operations",
}
)
Functions ¶
func CloseSession ¶
func DropAndInitDataBase ¶
func DropAndInitDataBase() bool
func GetBooleanData ¶
function get Boolean Data
func GetCollection ¶
func GetCollection(collection string) (*mongo.Collection, error)
func GetFloat64Data ¶
function get Float64 Data
func GetFloatMatrix ¶
Function for get root
func GetListData ¶
Function for get root
func GetStringData ¶
function get String Data
func GetTimeData ¶
Types ¶
type CaseTest ¶
type CaseTest struct { Name string Id primitive.ObjectID Idaux primitive.ObjectID NAccess int Order int Position string Nam string Des string Url string Icon string Dni string Period string Address string Days []string Start time.Time End time.Time Model bson.M IdList []primitive.ObjectID ObjectList []interface{} Thereiserror bool Action bool }
test structure
Click to show internal directories.
Click to hide internal directories.