Documentation
¶
Index ¶
- Variables
- func AddAuth(policyAdapter persist.Adapter, authentication Authentication)
- func InitGRPCServer[T config.HasBaseConfig](cfg T, serviceName, version string, defaultValues ...config.DefaultValue)
- func InitRESTServer[T config.HasBaseConfig](cfg T, serviceName, version string, defaultValues ...config.DefaultValue)
- func StartGRPCServer()
- func StartRESTServer()
- type Authentication
Constants ¶
This section is empty.
Variables ¶
View Source
var GRPCServer *grpc.Server
View Source
var RESTServer *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 REST-Server. Must be called after InitRESTServer and before StartRESTServer.
func InitGRPCServer ¶ added in v0.7.0
func InitGRPCServer[T config.HasBaseConfig]( cfg T, serviceName, version string, defaultValues ...config.DefaultValue, )
func InitRESTServer ¶ added in v0.7.0
func InitRESTServer[T config.HasBaseConfig]( cfg T, serviceName, version string, defaultValues ...config.DefaultValue, )
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 StartGRPCServer ¶ added in v0.7.0
func StartGRPCServer()
func StartRESTServer ¶ added in v0.7.0
func StartRESTServer()
Types ¶
type Authentication ¶ added in v0.2.0
type Authentication struct {
BasicAuthenticator middleware.BasicAuthenticator
}
Directories
¶
| Path | Synopsis |
|---|---|
|
Package api provides primitives to interact with the openapi HTTP API.
|
Package api provides primitives to interact with the openapi HTTP API. |
|
Package client provides primitives to interact with the openapi HTTP API.
|
Package client provides primitives to interact with the openapi HTTP API. |
Click to show internal directories.
Click to hide internal directories.