dbendpoints

package
v0.124.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: Apache-2.0 Imports: 17 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.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServiceRouter

NewServiceRouter creates a new service router for DbEndpoints

Types

type Callback

type Callback struct{}

func (Callback) AddMiddleware

func (c Callback) AddMiddleware(ctx context.Context, r chi.Router)

func (Callback) BasePath

func (c Callback) BasePath() string

func (Callback) Config

func (c Callback) Config() interface{}

func (Callback) DownstreamTimeoutContext

func (c Callback) DownstreamTimeoutContext(ctx context.Context) (context.Context, context.CancelFunc)

func (Callback) MapError added in v0.5.0

func (c Callback) MapError(ctx context.Context, cause error) *common.HTTPError

type Client

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

Client for DbEndpoints API

func NewClient

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

NewClient for DbEndpoints

func (*Client) GetCompanyLocationList

func (s *Client) GetCompanyLocationList(ctx context.Context, req *GetCompanyLocationListRequest) (*GetCompanyLocationResponse, error)

GetCompanyLocationList ...

type Company

type Company struct {
	AbnNumber      int64        `json:"abnNumber"`
	CompanyCountry string       `json:"companyCountry"`
	CompanyName    string       `json:"companyName"`
	Departments    []Department `json:"departments"`
}

Company ...

func (*Company) Validate

func (s *Company) Validate() error

*Company validator

type Config

type Config struct{}

func (Config) Validate

func (c Config) Validate() error

type DefaultDbEndpointsImpl

type DefaultDbEndpointsImpl struct {
}

DefaultDbEndpointsImpl ...

func NewDefaultDbEndpointsImpl

func NewDefaultDbEndpointsImpl() *DefaultDbEndpointsImpl

NewDefaultDbEndpointsImpl for DbEndpoints

func (*DefaultDbEndpointsImpl) GetCompanyLocationList

type Department

type Department struct {
	DeptId   int64  `json:"deptId"`
	DeptLoc  string `json:"deptLoc"`
	DeptName string `json:"deptName"`
}

Department ...

func (*Department) Validate

func (s *Department) Validate() error

*Department validator

type DownstreamConfig

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

DownstreamConfig for DbEndpoints

type GetCompanyLocationListClient

type GetCompanyLocationListClient struct {
	Conn *sql.Conn
	// contains filtered or unexported fields
}

GetCompanyLocationList Client

type GetCompanyLocationListRequest

type GetCompanyLocationListRequest struct {
	DeptLoc     string
	CompanyName *string
}

GetCompanyLocationListRequest ...

type GetCompanyLocationResponse

type GetCompanyLocationResponse struct {
	Companies []Company `json:"companies"`
	Message   string    `json:"message"`
}

GetCompanyLocationResponse ...

func (*GetCompanyLocationResponse) Validate

func (s *GetCompanyLocationResponse) Validate() error

*GetCompanyLocationResponse validator

type Handler

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

Handler interface for DbEndpoints

type Router

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

Router interface for DbEndpoints

type Service

type Service interface {
	GetCompanyLocationList(ctx context.Context, req *GetCompanyLocationListRequest) (*GetCompanyLocationResponse, error)
}

Service interface for DbEndpoints

type ServiceHandler

type ServiceHandler struct {
	DB *sql.DB
	// contains filtered or unexported fields
}

ServiceHandler for DbEndpoints API

func NewServiceHandler

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

NewServiceHandler for DbEndpoints

func (*ServiceHandler) GetCompanyLocationListHandler

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

GetCompanyLocationListHandler ...

type ServiceInterface

type ServiceInterface struct {
	GetCompanyLocationList func(ctx context.Context, req *GetCompanyLocationListRequest, client GetCompanyLocationListClient) (*GetCompanyLocationResponse, error)
}

ServiceInterface for DbEndpoints

type ServiceRouter

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

ServiceRouter for DbEndpoints 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 ...

Jump to

Keyboard shortcuts

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