MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / NewDynamicClient

Function NewDynamicClient

gateway/apinto/dynamic.go:19–26  ·  view source on GitHub ↗
(client admin_client.Client, resource string)

Source from the content-addressed store, hash-verified

17var _ gateway.IDynamicClient = &DynamicClient{}
18
19func NewDynamicClient(client admin_client.Client, resource string) (*DynamicClient, error) {
20 cfg, has := gateway.GetDynamicResourceDriver(resource)
21 if !has {
22 return nil, errors.New("resource not found")
23 }
24
25 return &DynamicClient{client: client, profession: cfg.Profession, driver: cfg.Driver}, nil
26}
27
28type DynamicClient struct {
29 profession string

Callers 1

DynamicMethod · 0.85

Calls 1

GetDynamicResourceDriverFunction · 0.92

Tested by

no test coverage detected