kong

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

View Source
const (
	ConsumerRoot string = "/consumers/"
	PluginRoot   string = "/plugins/"
	ServiceRoot  string = "/services/"
	RouteRoot    string = "/routes/"
	AclRoot      string = "/acls/"
	UpstreamRoot string = "/upstreams/"
	HealthPath   string = "/health/"
	TargetPath   string = "/targets/"
)
View Source
const InnerHost = "gateway.inner"

Variables

View Source
var (
	ErrInvalidReq = errors.New("kongAdapter: invalid request")
)

Functions

This section is empty.

Types

type KongAdapter

type KongAdapter interface {
	KongExist() bool
	GetVersion() (string, error)
	CheckPluginEnabled(pluginName string) (bool, error)
	CreateConsumer(req *KongConsumerReqDto) (*KongConsumerRespDto, error)
	DeleteConsumer(string) error
	CreateOrUpdateRoute(req *KongRouteReqDto) (*KongRouteRespDto, error)
	DeleteRoute(string) error
	UpdateRoute(req *KongRouteReqDto) (*KongRouteRespDto, error)
	CreateOrUpdateService(req *KongServiceReqDto) (*KongServiceRespDto, error)
	DeleteService(string) error
	DeletePluginIfExist(req *KongPluginReqDto) error
	CreateOrUpdatePlugin(req *KongPluginReqDto) (*KongPluginRespDto, error)
	CreateOrUpdatePluginById(req *KongPluginReqDto) (*KongPluginRespDto, error)
	GetPlugin(req *KongPluginReqDto) (*KongPluginRespDto, error)
	AddPlugin(req *KongPluginReqDto) (*KongPluginRespDto, error)
	UpdatePlugin(req *KongPluginReqDto) (*KongPluginRespDto, error)
	PutPlugin(req *KongPluginReqDto) (*KongPluginRespDto, error)
	RemovePlugin(string) error
	CreateCredential(req *KongCredentialReqDto) (*KongCredentialDto, error)
	DeleteCredential(string, string, string) error
	GetCredentialList(string, string) (*KongCredentialListDto, error)
	CreateAclGroup(string, string) error
	CreateUpstream(req *KongUpstreamDto) (*KongUpstreamDto, error)
	GetUpstreamStatus(string) (*KongUpstreamStatusRespDto, error)
	AddUpstreamTarget(string, *KongTargetDto) (*KongTargetDto, error)
	DeleteUpstreamTarget(string, string) error
	TouchRouteOAuthMethod(string) error
	GetRoutes() ([]KongRouteRespDto, error)
}

func NewKongAdapter

func NewKongAdapter(kongAddr string) KongAdapter

func NewKongAdapterByConsumerId

func NewKongAdapterByConsumerId(consumerDb service.GatewayConsumerService, consumerId string) KongAdapter

func NewKongAdapterForConsumer

func NewKongAdapterForConsumer(consumer *orm.GatewayConsumer) KongAdapter

func NewKongAdapterForProject

func NewKongAdapterForProject(az, env, projectId string) KongAdapter

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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