Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewXeneLoggerMiddleware ¶
func NewXeneLoggerMiddleware(logger logrus.FieldLogger, verboseLogs bool) gin.HandlerFunc
NewXeneLoggerMiddleware a gin middleware which can be used a logger, this is used mostly to have a standard logger implementation throughout. We are using logrus logger to log any information in xene.
Types ¶
type APIServer ¶
type APIServer struct {
// contains filtered or unexported fields
}
APIServer is the standard type which is used to manage the API exposed by xene.
func NewHTTPSServer ¶
func NewHTTPSServer(host string, port uint32, keyFile, certFile, jwtSecret string, disableAuth, verboseLogs bool) *APIServer
NewHTTPSServer returns a new ApiServer capable of running HTTPs server on the specified port.
func NewHTTPServer ¶
func NewHTTPServer(host string, port uint32, disableAuth, verboseLogs bool, jwtSecret string) *APIServer
NewHTTPServer returns the ApiServer configured for running HTTP API server.
func NewUnixSocketServer ¶
NewUnixSocketServer returns the ApiServer configured for running HTTP server on a unix domain socket specified by the file.
func (*APIServer) JWTVerficationMiddleware ¶
JWTVerficationMiddleware is used to authenticate any request for user Sets the ctx 'user' value to the user email
func (*APIServer) NewAPIServerRouter ¶
NewAPIServerRouter returns a new gin router for xene api server. The parameter defines if the router should be initialized with a logger.
func (*APIServer) RunServer ¶
RunServer runs the server configured for the API. @title Xene API server @version 0.1.0 @description Xene is the workflow creator and manager tool
@contact.name Deepesh Pathak @contact.url https://dpathak.co @contact.email deepeshpathak09@gmail.com
@license.name Apache 2.0 @license.url http://www.apache.org/licenses/LICENSE-2.0.html
@host localhost:6060 @BasePath / @securityDefinitions.basic BasicAuth @securityDefinitions.apikey ApiKeyAuth @in header @name Authorization