api

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2018 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	Healthy bool
}

Service is the main struct

func (*Service) HealthHandler

func (svc *Service) HealthHandler(ginCtx *gin.Context)

HealthHandler handles /health endpoint

func (*Service) IsHealthy

func (svc *Service) IsHealthy() bool

IsHealthy returns the health status of the running service.

func (*Service) RootHandler

func (svc *Service) RootHandler(ginCtx *gin.Context)

RootHandler handles / endpoint

func (*Service) Run

func (svc *Service) Run(config *ServiceConfig) error

Run is the main function of the server. It bootstraps the service and creates the route endpoints.

type ServiceConfig

type ServiceConfig struct {
	Config          *conf.Config
	OAuth2Endpoints oauth2.Endpoint
	CertKeyPair     tls.Certificate
	Httponly        bool
}

ServiceConfig contains everything configurable for the service endpoint.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL