simple

package
v0.129.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: Apache-2.0 Imports: 11 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.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServiceRouter

func NewServiceRouter(gc GenCallback, svcHandler *ServiceHandler) handlerinitialiser.HandlerInitialiser

NewServiceRouter creates a new service router for simple

Types

type DefaultSimpleImpl

type DefaultSimpleImpl struct {
}

DefaultSimpleImpl ...

func NewDefaultSimpleImpl

func NewDefaultSimpleImpl() *DefaultSimpleImpl

NewDefaultSimpleImpl for simple

type GenCallback

type GenCallback interface {
	AddMiddleware(ctx context.Context, r chi.Router)
	BasePath() string
	Config() validator.Validator
	HandleError(ctx context.Context, w http.ResponseWriter, kind common.Kind, message string, cause error)
	DownstreamTimeoutContext(ctx context.Context) (context.Context, context.CancelFunc)
}

GenCallback callbacks used by the generated code

type GetClient

type GetClient struct {
}

Get Client

type GetFoobarListClient

type GetFoobarListClient struct {
	GetTodos func(ctx context.Context, req *jsonplaceholder.GetTodosRequest) (*jsonplaceholder.TodosResponse, error)
}

GetFoobarList Client

type GetFoobarListRequest

type GetFoobarListRequest struct {
}

GetFoobarListRequest ...

type GetRequest

type GetRequest struct {
}

GetRequest ...

type Handler

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

Handler interface for simple

type Router

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

Router interface for simple

type ServiceHandler

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

ServiceHandler for simple API

func NewServiceHandler

func NewServiceHandler(genCallback GenCallback, serviceInterface *ServiceInterface, jsonplaceholderjsonplaceholderService jsonplaceholder.Service) *ServiceHandler

NewServiceHandler for simple

func (*ServiceHandler) GetFoobarListHandler

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

GetFoobarListHandler ...

func (*ServiceHandler) GetHandler

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

GetHandler ...

type ServiceInterface

type ServiceInterface struct {
	Get           func(ctx context.Context, req *GetRequest, client GetClient) (*Welcome, error)
	GetFoobarList func(ctx context.Context, req *GetFoobarListRequest, client GetFoobarListClient) (*jsonplaceholder.TodosResponse, error)
}

ServiceInterface for simple

type ServiceRouter

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

ServiceRouter for simple API

func (*ServiceRouter) Config

func (s *ServiceRouter) Config() validator.Validator

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 Welcome

type Welcome struct {
	Content string `json:"Content"`
}

Welcome ...

func (*Welcome) Validate

func (s *Welcome) Validate() error

*Welcome validator

Jump to

Keyboard shortcuts

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