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

Function ToServiceProxy

module/router/dto/input.go:77–98  ·  view source on GitHub ↗
(proxy *InputProxy)

Source from the content-addressed store, hash-verified

75}
76
77func ToServiceProxy(proxy *InputProxy) *api.Proxy {
78 if proxy == nil {
79 return &api.Proxy{}
80 }
81 headers := utils.SliceToSlice(proxy.Headers, func(h *Header) *api.Header {
82 return &api.Header{
83 Key: h.Key,
84 Value: h.Value,
85 Opt: h.Opt,
86 OptType: h.OptType,
87 }
88 })
89
90 return &api.Proxy{
91 Path: proxy.Path,
92 Timeout: proxy.Timeout,
93 Retry: proxy.Retry,
94 Extends: proxy.Extends,
95 Plugins: proxy.Plugins,
96 Headers: headers,
97 }
98}
99
100type ListInput struct {
101 Projects []string `json:"projects"`

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected