downstream

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Code generated by sysl DO NOT EDIT.

Code generated by sysl DO NOT EDIT.

Code generated by sysl DO NOT EDIT.

Code generated by sysl DO NOT EDIT.

Code generated by sysl DO NOT EDIT.

Code generated by sysl DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServiceRouter

NewServiceRouter creates a new service router for Downstream

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for Downstream API

func NewClient

func NewClient(client *http.Client, serviceURL string) *Client

NewClient for Downstream

func (*Client) GetServiceDocsList

func (s *Client) GetServiceDocsList(ctx context.Context, req *GetServiceDocsListRequest) (*ServiceDoc, error)

GetServiceDocsList ...

type DefaultDownstreamImpl

type DefaultDownstreamImpl struct {
}

DefaultDownstreamImpl ...

func NewDefaultDownstreamImpl

func NewDefaultDownstreamImpl() *DefaultDownstreamImpl

NewDefaultDownstreamImpl for Downstream

type DownstreamConfig

type DownstreamConfig struct {
	ContextTimeout time.Duration `yaml:"contextTimeout"`
}

DownstreamConfig for Downstream

type GetServiceDocsListClient

type GetServiceDocsListClient struct {
}

GetServiceDocsList Client

type GetServiceDocsListRequest

type GetServiceDocsListRequest struct {
}

GetServiceDocsListRequest ...

type Handler

type Handler interface {
	GetServiceDocsListHandler(w http.ResponseWriter, r *http.Request)
}

Handler interface for Downstream

type Router

type Router interface {
	Route(router *chi.Mux)
}

Router interface for Downstream

type Service

type Service interface {
	GetServiceDocsList(ctx context.Context, req *GetServiceDocsListRequest) (*ServiceDoc, error)
}

Service interface for Downstream

type ServiceDoc

type ServiceDoc struct {
	Openapi string `json:"openapi"`
	Swagger string `json:"swagger"`
}

ServiceDoc ...

func (*ServiceDoc) Validate

func (s *ServiceDoc) Validate() error

*ServiceDoc validator

type ServiceHandler

type ServiceHandler struct {
	// contains filtered or unexported fields
}

ServiceHandler for Downstream API

func NewServiceHandler

func NewServiceHandler(genCallback core.RestGenCallback, serviceInterface *ServiceInterface) *ServiceHandler

NewServiceHandler for Downstream

func (*ServiceHandler) GetServiceDocsListHandler

func (s *ServiceHandler) GetServiceDocsListHandler(w http.ResponseWriter, r *http.Request)

GetServiceDocsListHandler ...

type ServiceInterface

type ServiceInterface struct {
	GetServiceDocsList func(ctx context.Context, req *GetServiceDocsListRequest, client GetServiceDocsListClient) (*ServiceDoc, error)
}

ServiceInterface for Downstream

type ServiceRouter

type ServiceRouter struct {
	// contains filtered or unexported fields
}

ServiceRouter for Downstream API

func (*ServiceRouter) Config

func (s *ServiceRouter) Config() interface{}

Config ...

func (*ServiceRouter) Name

func (s *ServiceRouter) Name() string

Name ...

func (*ServiceRouter) WireRoutes

func (s *ServiceRouter) WireRoutes(ctx context.Context, r chi.Router)

WireRoutes ...

type Status

type Status struct {
	StatusField string `json:"statusField"`
}

Status ...

func (Status) Error

func (s Status) Error() string

Error fulfills the error type interface for Status

func (*Status) Validate

func (s *Status) Validate() error

*Status validator

Jump to

Keyboard shortcuts

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