Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Server *gin.Engine
Functions ¶
func AddAuth ¶ added in v0.3.0
func AddAuth(policyAdapter persist.Adapter, authentication Authentication)
AddAuth adds authentication and authorization middleware to the server. Must be called after Init and before Start.
func Init ¶
func Init[T config.HasBaseConfig]( cfg T, serviceName, version string, )
GetConfig is the main function for consumers to load and get their configuration. It takes a pointer to any struct type that defines the configuration schema. The struct should have appropriate mapstructure and validate tags. Must be called before Init.
func Start ¶
func Start()
@title SharedDeps Server @version v0.0.0 @description API Abstraction of common web-server duties providing re-use capabilities. @license.name GNU General Public License v3.0 @license.url https://www.gnu.org/licenses/gpl-3.0.html
Types ¶
type Authentication ¶ added in v0.2.0
type Authentication struct {
BasicAuthenticator middleware.BasicAuthenticator
}
Directories
¶
| Path | Synopsis |
|---|---|
|
Package docs Code generated by swaggo/swag.
|
Package docs Code generated by swaggo/swag. |
Click to show internal directories.
Click to hide internal directories.