Skip to content

maiaaraujo5/gostart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GO START

A helper to start clients and applications.

How to use

Easy Way

It's very simple to use gostart, if you use fx in your application you can start the application like this:

      application.Run(
   	application.Start.
   		WithEcho().
   		WithMongo().
   		WithRabbitMQ().
   		WithCustomProvider(fx.AuthenticatorHandlerModule()).
   		Build(),
   )

In this example, all these providers will be initialized for you, with default configurations.

Start client as you want

If you don't use fx, or you don't want to initialize the clients in the same time, you can call the methods to initialize in your code like this:

import (
   "github.com/maiaaraujo5/gostart/cache/redis"
   
   func main() {
     client, err := redis.Connect()
     if err!=nil {... //do something with error}	
     
     ... //do something with redis client
     }
   
)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages