 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- func NewHandler(handler MetadataHandler) http.Handler
- func NewHealthCheckHandler() http.Handler
- type API
- type CreateServiceResponse
- type Credentials
- type DocsObject
- type Documentation
- type ErrorHandler
- type Events
- type MetadataHandler
- type Oauth
- type Service
- type ServiceDetails
- type ServiceDetailsValidator
- type ServiceDetailsValidatorFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
func NewHandler(handler MetadataHandler) http.Handler
func NewHealthCheckHandler ¶
NewHealthCheckHandler creates handler for performing health check
Types ¶
type API ¶
type API struct {
	TargetUrl   string          `json:"targetUrl" valid:"url,required~targetUrl field cannot be empty."`
	Credentials *Credentials    `json:"credentials,omitempty"`
	Spec        json.RawMessage `json:"spec,omitempty"`
}
    type CreateServiceResponse ¶
type CreateServiceResponse struct {
	ID string `json:"id"`
}
    type Credentials ¶
type Credentials struct {
	Oauth Oauth `json:"oauth" valid:"required~oauth field cannot be empty"`
}
    type DocsObject ¶
type Documentation ¶
type Documentation struct {
	DisplayName string       `json:"displayName" valid:"required~displayName field cannot be empty in documentation"`
	Description string       `json:"description" valid:"required~description field cannot be empty in documentation"`
	Type        string       `json:"type" valid:"required~type field cannot be empty in documentation"`
	Tags        []string     `json:"tags,omitempty"`
	Docs        []DocsObject `json:"docs,omitempty"`
}
    type ErrorHandler ¶
func NewErrorHandler ¶
func NewErrorHandler(code int, message string) *ErrorHandler
func (*ErrorHandler) ServeHTTP ¶
func (eh *ErrorHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type Events ¶
type Events struct {
	Spec json.RawMessage `json:"spec" valid:"required~spec cannot be empty"`
}
    type MetadataHandler ¶
type MetadataHandler interface {
	CreateService(w http.ResponseWriter, r *http.Request)
	GetService(w http.ResponseWriter, r *http.Request)
	GetServices(w http.ResponseWriter, r *http.Request)
	UpdateService(w http.ResponseWriter, r *http.Request)
	DeleteService(w http.ResponseWriter, r *http.Request)
}
    func NewInvalidStateMetadataHandler ¶
func NewInvalidStateMetadataHandler(message string) MetadataHandler
func NewMetadataHandler ¶
func NewMetadataHandler(validator ServiceDetailsValidator, serviceDefinitionService metadata.ServiceDefinitionService) MetadataHandler
type ServiceDetails ¶
type ServiceDetails struct {
	Provider      string         `json:"provider" valid:"required~Provider field cannot be empty."`
	Name          string         `json:"name" valid:"required~Name field cannot be empty."`
	Description   string         `json:"description" valid:"required~Description field cannot be empty."`
	Api           *API           `json:"api,omitempty"`
	Events        *Events        `json:"events,omitempty"`
	Documentation *Documentation `json:"documentation,omitempty"`
}
    type ServiceDetailsValidator ¶
type ServiceDetailsValidator interface {
	Validate(details ServiceDetails) apperrors.AppError
}
    func NewServiceDetailsValidator ¶
func NewServiceDetailsValidator() ServiceDetailsValidator
type ServiceDetailsValidatorFunc ¶
type ServiceDetailsValidatorFunc func(details ServiceDetails) apperrors.AppError
func (ServiceDetailsValidatorFunc) Validate ¶
func (f ServiceDetailsValidatorFunc) Validate(details ServiceDetails) apperrors.AppError
 Click to show internal directories. 
   Click to hide internal directories.