assembler

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GatewayDbAssembler

type GatewayDbAssembler interface {
	Resp2GatewayService(*kong.KongServiceRespDto, *db.GatewayService) error
	Resp2GatewayServiceByApi(*kong.KongServiceRespDto, gw.ApiDto, string) (*db.GatewayService, error)
	Resp2GatewayRoute(*kong.KongRouteRespDto, *db.GatewayRoute) error
	Resp2GatewayRouteByAPi(*kong.KongRouteRespDto, string, string) (*db.GatewayRoute, error)
	Resp2GatewayPluginInstance(*kong.KongPluginRespDto, PluginParams) (*db.GatewayPluginInstance, error)
	BuildGatewayApi(gw.ApiDto, string, []db.GatewayPolicy, string, ...string) (*db.GatewayApi, error)
	BuildConsumerInfo(*db.GatewayConsumer) (*gw.ConsumerInfoDto, error)
	BuildConsumerApiInfo(*db.GatewayConsumerApi, *db.GatewayApi) (*gw.ConsumerApiInfoDto, error)
	BuildConsumerApiPolicyInfo(*db.GatewayPolicy) (*gw.ConsumerApiPolicyInfoDto, error)
}

type GatewayDbAssemblerImpl

type GatewayDbAssemblerImpl struct {
}

func (GatewayDbAssemblerImpl) BuildConsumerApiInfo

func (GatewayDbAssemblerImpl) BuildConsumerApiInfo(consumerApi *db.GatewayConsumerApi, gwApi *db.GatewayApi) (*gw.ConsumerApiInfoDto, error)

func (GatewayDbAssemblerImpl) BuildConsumerApiPolicyInfo

func (GatewayDbAssemblerImpl) BuildConsumerApiPolicyInfo(policy *db.GatewayPolicy) (*gw.ConsumerApiPolicyInfoDto, error)

func (GatewayDbAssemblerImpl) BuildConsumerInfo

func (GatewayDbAssemblerImpl) BuildConsumerInfo(consumer *db.GatewayConsumer) (*gw.ConsumerInfoDto, error)

func (GatewayDbAssemblerImpl) BuildGatewayApi

func (GatewayDbAssemblerImpl) BuildGatewayApi(reqDto gw.ApiDto, consumerId string, policies []db.GatewayPolicy, zoneId string, upstreamApiId ...string) (*db.GatewayApi, error)

func (GatewayDbAssemblerImpl) Resp2GatewayPluginInstance

func (GatewayDbAssemblerImpl) Resp2GatewayPluginInstance(resp *kong.KongPluginRespDto, params PluginParams) (*db.GatewayPluginInstance, error)

func (GatewayDbAssemblerImpl) Resp2GatewayRoute

func (GatewayDbAssemblerImpl) Resp2GatewayRoute(resp *kong.KongRouteRespDto, route *db.GatewayRoute) error

func (GatewayDbAssemblerImpl) Resp2GatewayRouteByAPi

func (impl GatewayDbAssemblerImpl) Resp2GatewayRouteByAPi(resp *kong.KongRouteRespDto, serviceId string, apiId string) (*db.GatewayRoute, error)

func (GatewayDbAssemblerImpl) Resp2GatewayService

func (GatewayDbAssemblerImpl) Resp2GatewayService(resp *kong.KongServiceRespDto, service *db.GatewayService) error

func (GatewayDbAssemblerImpl) Resp2GatewayServiceByApi

func (impl GatewayDbAssemblerImpl) Resp2GatewayServiceByApi(resp *kong.KongServiceRespDto, apiDto gw.ApiDto, apiId string) (*db.GatewayService, error)

type GatewayGroupAssembler

type GatewayGroupAssembler interface {
	GroupInfo2Dto([]gw.GatewayGroupInfo) ([]gw.GwApiGroupDto, error)
}

type GatewayGroupAssemblerImpl

type GatewayGroupAssemblerImpl struct {
}

func (GatewayGroupAssemblerImpl) GroupInfo2Dto

func (GatewayGroupAssemblerImpl) GroupInfo2Dto(infos []gw.GatewayGroupInfo) ([]gw.GwApiGroupDto, error)

type GatewayKongAssembler

type GatewayKongAssembler interface {
	BuildKongServiceReq(string, *gw.ApiDto) (*kong.KongServiceReqDto, error)
	BuildKongRouteReq(string, *gw.ApiDto, string, bool) (*kong.KongRouteReqDto, error)
	BuildKongPluginReqDto(string, *db.GatewayPolicy, string, string, string) (*kong.KongPluginReqDto, error)
}

type GatewayKongAssemblerImpl

type GatewayKongAssemblerImpl struct {
}

func (GatewayKongAssemblerImpl) BuildKongPluginReqDto

func (GatewayKongAssemblerImpl) BuildKongPluginReqDto(pluginId string, policy *db.GatewayPolicy, serviceId string, routeId string, consumerId string) (*kong.KongPluginReqDto, error)

func (GatewayKongAssemblerImpl) BuildKongRouteReq

func (GatewayKongAssemblerImpl) BuildKongRouteReq(routeId string, dto *gw.ApiDto, serviceId string, isRegexPath bool) (*kong.KongRouteReqDto, error)

func (GatewayKongAssemblerImpl) BuildKongServiceReq

func (GatewayKongAssemblerImpl) BuildKongServiceReq(serviceId string, dto *gw.ApiDto) (*kong.KongServiceReqDto, error)

type PluginParams

type PluginParams struct {
	PolicyId   string
	GroupId    string
	ServiceId  string
	RouteId    string
	ConsumerId string
	ApiId      string
}

Jump to

Keyboard shortcuts

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