tutorial-go-fiber-rest-api
uuid
Our great sponsors
tutorial-go-fiber-rest-api | uuid | |
---|---|---|
2 | 10 | |
173 | 3,566 | |
- | 3.1% | |
2.6 | 1.5 | |
14 days ago | about 1 month ago | |
Go | Go | |
MIT License | BSD 3-clause "New" or "Revised" License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
tutorial-go-fiber-rest-api
uuid
-
Go Lang for .NET devs
You can see the same naming dilemma in many Go library implementations, i.e., where a package is used to organize functions related to a single a type (https://github.com/google/uuid) vs organizing code of related functionality (https://github.com/golang/go/tree/master/src/math).
-
goes - CQRS & Event-Sourcing Toolkit
Type inference is not perfect yet (especially for functional options). Also not being able to add type parameters to methods is a bit annoying (can be worked around using package-level functions) but besides that generics fit quite nicely into the library. If type inference gets better then I think I can even remove the hard dependency on github.com/google/uuid and let users use custom types for ids.
-
Web dev learning path advice
Learn how to create UUIDs: https://github.com/google/uuid
-
Faster implementation for uuid.NewString()
We are using https://github.com/google/uuid and its method: uuid.NewString(). During our profiling we have found this method to be one of the most expensive calls in our system. Even larger than some of our json.Marshal/UnMarshal code.
-
💭 How to make clear & pretty error messages from the Go backend to your frontend?
So, we have a field with type uuid.UUID which we create with the package google/uuid, which we want to check with the built-in validator uuid.Parse() of that package. All we need to do is add a new RegisterValidation method to the NewValidator function (described above) with simple logic code:
-
Image Compression with Golang
Another library I'm going to use is google/uuid, because I'm going to want to rename the image that we uploaded, in order to ensure that its name is unique.
-
CVE-2021-3538 issued for latest release of github.com/satori/go.uuid
use https://github.com/google/uuid instead. It is maintained and have some nice add-on dependency like https://github.com/lithammer/shortuuid
-
How to create and verify JWT & PASETO token in Golang
Here I use the UUID type for this field. The type is defined in the google/uuid package, wo we have to run go get command to download and add it to the project.
-
📖 Build a RESTful API on Go: Fiber, PostgreSQL, JWT and Swagger docs in isolated Docker containers
👍 I recommend to use the google/uuid package to create unique IDs, because this is a more versatile way to protect your application against common number brute force attacks. Especially if your REST API will have public methods without authorization and request limit.
- Use Cases or arrays instead of slices
What are some alternatives?
uuid - A UUID package originally forked from github.com/satori/go.uuid
fiber-swagger - fiber middleware to automatically generate RESTful API documentation with Swagger 2.0.
jwt - 🧬 JWT middleware for Fiber
swagger-ui - Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
validator - :100:Go Struct and Field validation, including Cross Field, Cross Struct, Map, Slice and Array diving
go.uuid - UUID package for Go
shortuuid - :mushroom: A generator library for concise, unambiguous and URL-safe UUIDs
fiber-go-template - 📝 Production-ready backend template with Fiber Go Web Framework for Create Go App CLI.
jwt-go - ARCHIVE - Golang implementation of JSON Web Tokens (JWT). This project is now maintained at:
Testify - A toolkit with common assertions and mocks that plays nicely with the standard library
swag - Automatically generate RESTful API documentation with Swagger 2.0 for Go.
fiber-jwt - JWT for fiber