Documentation ¶
Index ¶
- type Service
- func (this *Service) GetRootRouter() (*gin.RouterGroup, error)
- func (this *Service) InitService() (bool, error)
- func (this *Service) ReStart() (bool, error)
- func (this *Service) SetCmdArgs() (bool, error)
- func (this *Service) SetConfigFile(filePath string) (bool, error)
- func (this *Service) Start(isBlocking bool)
- func (this *Service) Stop() (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct { Config config.Config `json:"Config"` Engine *gin.Engine RootRouter *gin.RouterGroup AuthDB mongo.AuthDB Setting settings.Setting }
func GetInstance ¶
This returns a new Instance of User Management Service
func (*Service) GetRootRouter ¶
func (this *Service) GetRootRouter() (*gin.RouterGroup, error)
func (*Service) InitService ¶
func (*Service) SetCmdArgs ¶
This sets configuration from command line arguments. Use this when you think your users might want to give command line arguments. Call this after SetConfig if you want it to have more priority.
func (*Service) SetConfigFile ¶
This SetConfig function takes filePath of the config file and loads the User Management Service Instance with specified settings if some error occurs it throws error. if no file is sent in filePath param then default settings are loaded
func (*Service) Start ¶
This function is used to start-up the service with given settings or default settings If you send isblocking true then the system waits for the server to end first before return Else the call starts the server and returns, then it is up to you to hold the system to keep the service running.