func NewTestRethinkAPIServer() (server.APIServer, error) { address := "0.0.0.0:28015" databaseName := uuid.NewWithoutDashes() if err := server.InitDBs(address, databaseName); err != nil { return nil, err } return server.NewRethinkAPIServer(address, databaseName) }
func getRethinkAPIServer(env *appEnv) (persist.APIServer, error) { if err := persist_server.CheckDBs(fmt.Sprintf("%s:28015", env.DatabaseAddress), env.DatabaseName); err != nil { return nil, err } return persist_server.NewRethinkAPIServer(fmt.Sprintf("%s:28015", env.DatabaseAddress), env.DatabaseName) }