Giter VIP home page Giter VIP logo

gwuu's People

Contributors

evillord666 avatar nekrasovst avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gwuu's Issues

Add decorator function to cors handling

Sometimes cors middleware is not working as a quick solution we should add decorator function for handling CORS req (it should set Access-Control-Allow-Origin value to required one)

Update modules names

Unfortunately i found following issue - we have not access to gorm module from gwuu package -> gwuu.gorm. Also properly set top module name and version because when i import gwuu i see in go.sum:

github.com/wissance/gwuu v0.0.0-20210315093816-2fd5013531a2 h1:0NItVqNOuPTMSdSPosLjUnCvGU0DmJNpkHIpRARkq/o=
github.com/wissance/gwuu v0.0.0-20210315093816-2fd5013531a2/go.mod h1:Z+GbE6rxlJPQ1V2eQ+U2msaHRCmgQ91G4ST8ggZ9BKI=

But it should look like:

github.com/wissance/gwuu v1.0 ....

Add option to skip database exists check

When we 100% sure that database does not exists we could skip database check (this will speed up database works especially with frequent database creation (in tests))

Create test functions that allow to compare arrays

We should create help functions for comparison primitive data types:

  • array of strings (with order option and case invariant option)
  • array of integers (with order option) <- however here we have a problem with bunch of integer types
  • array of float (with order option)
  • array of complex (with order option)

Fix issue when there are 2 similar Routes from different SubRouters

This PR reproduces the issue - #17 (test)

func TestHandleFuncForSubRouterSameName(t *testing.T) {
	internalSubNet := "192.168.30.0"
	handler := NewWebApiHandler(true, internalSubNet)
	objectResource := "/api/object/"
	handler.HandleFunc(handler.Router, objectResource, func(writer http.ResponseWriter, request *http.Request) {
	}, "GET")
	service1Router := handler.Router.PathPrefix("/service1").Subrouter()
	handler.HandleFunc(service1Router, objectResource, func(writer http.ResponseWriter, request *http.Request) {
	}, "POST")
	checkOptionRouteCors(t, handler.Router, "/api/object/", internalSubNet, "*", "OPTIONS,GET")
	checkOptionRouteCors(t, handler.Router, "/service1/api/object/", internalSubNet, "*", "OPTIONS,POST")
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.