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

Function FromServiceProxy

module/router/dto/output.go:77–97  ·  view source on GitHub ↗
(proxy *api.Proxy)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected