query_docstring
stringlengths
24
20.8k
positive_code
stringlengths
17
325k
hard_negative_code
stringlengths
17
325k
similarity_score
float64
0.3
1
query_repo
stringclasses
407 values
query_path
stringlengths
5
170
hn_repo
stringclasses
400 values
hn_path
stringlengths
5
170
hn_license
stringclasses
4 values
language
stringclasses
1 value
Request returns the HTTP request as represented in the current environment. This assumes the current program is being run by a web server in a CGI environment. The returned Request's Body is populated, if applicable.
func Request() (*http.Request, error) { r, err := RequestFromMap(envMap(os.Environ())) if err != nil { return nil, err } if r.ContentLength > 0 { r.Body = ioutil.NopCloser(io.LimitReader(os.Stdin, r.ContentLength)) } return r, nil }
func (c *Client) makeRequest(ctx context.Context, r *httputil.Request, payload httputil.Payload) (*http.Request, error) { const op = "Client.MakeRequest" var body io.Reader if payload != nil { b, err := payload.Buffer() if err != nil { return nil, err } body = b } req, err := http.NewRequest(r.Method, r.URL, body) if err != nil { return nil, &errors.Error{Code: errors.INVALID, Message: "Error creating http request", Operation: op, Err: err} } if mail.Debug { fmt.Println(c.curlString(req, payload)) } req = req.WithContext(ctx) if payload != nil && payload.ContentType() != "" { req.Header.Add("Content-Type", payload.ContentType()) } if r.BasicAuthUser != "" && r.BasicAuthPassword != "" { req.SetBasicAuth(r.BasicAuthUser, r.BasicAuthPassword) } for header, value := range r.Headers { req.Header.Add(header, value) } return req, nil }
0.598244
mit-pdos/biscuit
src/net/http/cgi/child.go
ainsleyclark/go-mail
internal/client/client.go
MIT
go
Request returns the HTTP request as represented in the current environment. This assumes the current program is being run by a web server in a CGI environment. The returned Request's Body is populated, if applicable.
func Request() (*http.Request, error) { r, err := RequestFromMap(envMap(os.Environ())) if err != nil { return nil, err } if r.ContentLength > 0 { r.Body = ioutil.NopCloser(io.LimitReader(os.Stdin, r.ContentLength)) } return r, nil }
func NewRequest(method, target string, body io.Reader) *http.Request { if method == "" { method = "GET" } req, err := http.ReadRequest(bufio.NewReader(strings.NewReader(method + " " + target + " HTTP/1.0\r\n\r\n"))) if err != nil { panic("invalid NewRequest arguments; " + err.Error()) } // HTTP/1.0 was used above to avoid needing a Host field. Change it to 1.1 here. req.Proto = "HTTP/1.1" req.ProtoMinor = 1 req.Close = false if body != nil { switch v := body.(type) { case *bytes.Buffer: req.ContentLength = int64(v.Len()) case *bytes.Reader: req.ContentLength = int64(v.Len()) case *strings.Reader: req.ContentLength = int64(v.Len()) default: req.ContentLength = -1 } if rc, ok := body.(io.ReadCloser); ok { req.Body = rc } else { req.Body = ioutil.NopCloser(body) } }
0.588982
mit-pdos/biscuit
src/net/http/cgi/child.go
mit-pdos/biscuit
src/net/http/httptest/httptest.go
BSD-3-Clause
go
Request returns the HTTP request as represented in the current environment. This assumes the current program is being run by a web server in a CGI environment. The returned Request's Body is populated, if applicable.
func Request() (*http.Request, error) { r, err := RequestFromMap(envMap(os.Environ())) if err != nil { return nil, err } if r.ContentLength > 0 { r.Body = ioutil.NopCloser(io.LimitReader(os.Stdin, r.ContentLength)) } return r, nil }
func newRequest(method, url string) *http.Request { req, err := http.NewRequest(method, url, nil) if err != nil { panic(err) } // extract the escaped original host+path from url // http://localhost/path/here?v=1#frag -> //localhost/path/here opaque := "" if i := len(req.URL.Scheme); i > 0 { opaque = url[i+1:] } if i := strings.LastIndex(opaque, "?"); i > -1 { opaque = opaque[:i] } if i := strings.LastIndex(opaque, "#"); i > -1 { opaque = opaque[:i] } // Escaped host+path workaround as detailed in https://golang.org/pkg/net/url/#URL // for < 1.5 client side workaround req.URL.Opaque = opaque // Simulate writing to wire var buff bytes.Buffer req.Write(&buff) ioreader := bufio.NewReader(&buff) // Parse request off of 'wire' req, err = http.ReadRequest(ioreader) if err != nil { panic(err) } return req }
0.57598
mit-pdos/biscuit
src/net/http/cgi/child.go
genuinetools/binctr
vendor/github.com/gorilla/mux/mux_test.go
MIT
go
Request returns the HTTP request as represented in the current environment. This assumes the current program is being run by a web server in a CGI environment. The returned Request's Body is populated, if applicable.
func Request() (*http.Request, error) { r, err := RequestFromMap(envMap(os.Environ())) if err != nil { return nil, err } if r.ContentLength > 0 { r.Body = ioutil.NopCloser(io.LimitReader(os.Stdin, r.ContentLength)) } return r, nil }
func (p Params) GetHTTPRequest() (*http.Request, error) { key := "_request" value, err := p.Get(key) if err != nil { return nil, err } request, ok := value.(*http.Request) if !ok { return nil, ErrParamInvalid{fmt.Errorf("expecting http.request value for key %q (was %T)", key, value)} } return request, nil }
0.570931
mit-pdos/biscuit
src/net/http/cgi/child.go
rclone/rclone
fs/rc/params.go
MIT
go
Request returns the HTTP request as represented in the current environment. This assumes the current program is being run by a web server in a CGI environment. The returned Request's Body is populated, if applicable.
func Request() (*http.Request, error) { r, err := RequestFromMap(envMap(os.Environ())) if err != nil { return nil, err } if r.ContentLength > 0 { r.Body = ioutil.NopCloser(io.LimitReader(os.Stdin, r.ContentLength)) } return r, nil }
func GetRequest(ctx context.Context) (*http.Request, error) { if r, ok := ctx.Value("http.request").(*http.Request); r != nil && ok { return r, nil } return nil, ErrNoRequestContext }
0.564268
mit-pdos/biscuit
src/net/http/cgi/child.go
genuinetools/binctr
vendor/github.com/docker/distribution/context/http.go
MIT
go
ScrollChanged is called in the OnInput event handler for updating, when the scrollbar value has changed, for given dimension. This is part of the Layouter interface.
func (fr *Frame) ScrollChanged(d math32.Dims, sb *Slider) { fr.Geom.Scroll.SetDim(d, -sb.Value) fr.This.(Layouter).ApplyScenePos() // computes updated positions fr.NeedsRender() }
func (fr *Frame) ScrollUpdateFromGeom(d math32.Dims) { if !fr.HasScroll[d] || fr.scrolls[d] == nil { return } sb := fr.scrolls[d] cv := fr.Geom.Scroll.Dim(d) sb.setValueEvent(-cv) fr.This.(Layouter).ApplyScenePos() // computes updated positions fr.NeedsRender() }
0.781967
cogentcore/core
core/scroll.go
cogentcore/core
core/scroll.go
BSD-3-Clause
go
ScrollChanged is called in the OnInput event handler for updating, when the scrollbar value has changed, for given dimension. This is part of the Layouter interface.
func (fr *Frame) ScrollChanged(d math32.Dims, sb *Slider) { fr.Geom.Scroll.SetDim(d, -sb.Value) fr.This.(Layouter).ApplyScenePos() // computes updated positions fr.NeedsRender() }
func (s *Scrollbar) Update(gtx layout.Context, axis layout.Axis, viewportStart, viewportEnd float32) { // Calculate the length of the major axis of the scrollbar. This is // the length of the track within which pointer events occur, and is // used to scale those interactions. trackHeight := float32(axis.Convert(gtx.Constraints.Max).X) s.delta = 0 centerOnClick := func(normalizedPos float32) { // When the user clicks on the scrollbar we center on that point, respecting the limits of the beginning and end // of the scrollbar. // // Centering gives a consistent experience whether the user clicks above or below the indicator. target := normalizedPos - (viewportEnd-viewportStart)/2 s.delta += target - viewportStart if s.delta < -viewportStart { s.delta = -viewportStart } else if s.delta > 1-viewportEnd { s.delta = 1 - viewportEnd } } // Jump to a click in the track. for { event, ok := s.track.Update(gtx.Source) if !ok { break } if event.Kind != gesture.KindClick || event.Modifiers != key.Modifiers(0) || event.NumClicks > 1 { continue } pos := axis.Convert(image.Point{ X: int(event.Position.X), Y: int(event.Position.Y), }) normalizedPos := float32(pos.X) / trackHeight // Clicking on the indicator should not jump to that position on the track. The user might've just intended to // drag and changed their mind. if !(normalizedPos >= viewportStart && normalizedPos <= viewportEnd) { centerOnClick(normalizedPos) } } // Offset to account for any drags. for { event, ok := s.drag.Update(gtx.Metric, gtx.Source, gesture.Axis(axis)) if !ok { break } switch event.Kind { case pointer.Drag: case pointer.Release, pointer.Cancel: s.dragging = false continue default: continue } dragOffset := axis.FConvert(event.Position).X // The user can drag outside of the constraints, or even the window. Limit dragging to within the scrollbar. if dragOffset < 0 { dragOffset = 0 } else if dragOffset > trackHeight { dragOffset = trackHeight } normalizedDragOffset := dragOffset / trackHeight if !s.dragging { s.dragging = true s.oldDragPos = normalizedDragOffset if normalizedDragOffset < viewportStart || normalizedDragOffset > viewportEnd { // The user started dragging somewhere on the track that isn't covered by the indicator. Consider this a // click in addition to a drag and jump to the clicked point. // // TODO(dh): this isn't perfect. We only get the pointer.Drag event once the user has actually dragged, // which means that if the user presses the mouse button and neither releases it nor drags it, nothing // will happen. pos := axis.Convert(image.Point{ X: int(event.Position.X), Y: int(event.Position.Y), }) normalizedPos := float32(pos.X) / trackHeight centerOnClick(normalizedPos) } } else { s.delta += normalizedDragOffset - s.oldDragPos if viewportStart+s.delta < 0 { // Adjust normalizedDragOffset - and thus the future s.oldDragPos - so that futile dragging up has to be // countered with dragging down again. Otherwise, dragging up would have no effect, but dragging down would // immediately start scrolling. We want the user to undo their ineffective drag first. normalizedDragOffset -= viewportStart + s.delta // Limit s.delta to the maximum amount scrollable s.delta = -viewportStart } else if viewportEnd+s.delta > 1 { normalizedDragOffset += (1 - viewportEnd) - s.delta s.delta = 1 - viewportEnd } s.oldDragPos = normalizedDragOffset } } // Process events from the indicator so that hover is // detected properly. for { if _, ok := s.indicator.Update(gtx.Source); !ok { break } } }
0.647808
cogentcore/core
core/scroll.go
aarzilli/nucular
vendor/gioui.org/widget/list.go
MIT
go
ScrollChanged is called in the OnInput event handler for updating, when the scrollbar value has changed, for given dimension. This is part of the Layouter interface.
func (fr *Frame) ScrollChanged(d math32.Dims, sb *Slider) { fr.Geom.Scroll.SetDim(d, -sb.Value) fr.This.(Layouter).ApplyScenePos() // computes updated positions fr.NeedsRender() }
func (fr *Frame) ConfigScrolls() { for d := math32.X; d <= math32.Y; d++ { if fr.HasScroll[d] { fr.configScroll(d) } } }
0.606526
cogentcore/core
core/scroll.go
cogentcore/core
core/scroll.go
BSD-3-Clause
go
ScrollChanged is called in the OnInput event handler for updating, when the scrollbar value has changed, for given dimension. This is part of the Layouter interface.
func (fr *Frame) ScrollChanged(d math32.Dims, sb *Slider) { fr.Geom.Scroll.SetDim(d, -sb.Value) fr.This.(Layouter).ApplyScenePos() // computes updated positions fr.NeedsRender() }
func (fr *Frame) SetScrollParams(d math32.Dims, sb *Slider) { sb.Step = fr.Styles.Font.Size.Dots // step by lines sb.PageStep = 10.0 * sb.Step // todo: more dynamic }
0.584814
cogentcore/core
core/scroll.go
cogentcore/core
core/scroll.go
BSD-3-Clause
go
ScrollChanged is called in the OnInput event handler for updating, when the scrollbar value has changed, for given dimension. This is part of the Layouter interface.
func (fr *Frame) ScrollChanged(d math32.Dims, sb *Slider) { fr.Geom.Scroll.SetDim(d, -sb.Value) fr.This.(Layouter).ApplyScenePos() // computes updated positions fr.NeedsRender() }
func (lb *ListBase) ScrollToIndexNoUpdate(idx int) bool { if lb.VisibleRows == 0 { return false } if idx < lb.StartIndex { lb.StartIndex = idx lb.StartIndex = max(0, lb.StartIndex) lb.updateScroll() return true } if idx >= lb.StartIndex+lb.VisibleRows { lb.StartIndex = idx - (lb.VisibleRows - 4) lb.StartIndex = max(0, lb.StartIndex) lb.updateScroll() return true } return false }
0.584069
cogentcore/core
core/scroll.go
cogentcore/core
core/list.go
BSD-3-Clause
go
readTokenAsMetricName copies a metric name from p.buf into p.currentToken. The first byte considered is the byte already read (now in p.currentByte). The first byte not part of a metric name is still copied into p.currentByte, but not into p.currentToken.
func (p *TextParser) readTokenAsMetricName() { p.currentToken.Reset() if !isValidMetricNameStart(p.currentByte) { return } for { p.currentToken.WriteByte(p.currentByte) p.currentByte, p.err = p.buf.ReadByte() if p.err != nil || !isValidMetricNameContinuation(p.currentByte) { return } } }
func (p *TextParser) readTokenAsLabelValue() { p.currentToken.Reset() escaped := false for { if p.currentByte, p.err = p.buf.ReadByte(); p.err != nil { return } if escaped { switch p.currentByte { case '"', '\\': p.currentToken.WriteByte(p.currentByte) case 'n': p.currentToken.WriteByte('\n') default: p.parseError(fmt.Sprintf("invalid escape sequence '\\%c'", p.currentByte)) return } escaped = false continue } switch p.currentByte { case '"': return case '\n': p.parseError(fmt.Sprintf("label value %q contains unescaped new-line", p.currentToken.String())) return case '\\': escaped = true default: p.currentToken.WriteByte(p.currentByte) } } }
0.712941
k8snetworkplumbingwg/multus-cni
vendor/github.com/prometheus/common/expfmt/text_parse.go
k8snetworkplumbingwg/multus-cni
vendor/github.com/prometheus/common/expfmt/text_parse.go
Apache-2.0
go
readTokenAsMetricName copies a metric name from p.buf into p.currentToken. The first byte considered is the byte already read (now in p.currentByte). The first byte not part of a metric name is still copied into p.currentByte, but not into p.currentToken.
func (p *TextParser) readTokenAsMetricName() { p.currentToken.Reset() if !isValidMetricNameStart(p.currentByte) { return } for { p.currentToken.WriteByte(p.currentByte) p.currentByte, p.err = p.buf.ReadByte() if p.err != nil || !isValidMetricNameContinuation(p.currentByte) { return } } }
func (p *TextParser) readTokenUntilWhitespace() { p.currentToken.Reset() for p.err == nil && !isBlankOrTab(p.currentByte) && p.currentByte != '\n' { p.currentToken.WriteByte(p.currentByte) p.currentByte, p.err = p.buf.ReadByte() } }
0.628215
k8snetworkplumbingwg/multus-cni
vendor/github.com/prometheus/common/expfmt/text_parse.go
k8snetworkplumbingwg/multus-cni
vendor/github.com/prometheus/common/expfmt/text_parse.go
Apache-2.0
go
readTokenAsMetricName copies a metric name from p.buf into p.currentToken. The first byte considered is the byte already read (now in p.currentByte). The first byte not part of a metric name is still copied into p.currentByte, but not into p.currentToken.
func (p *TextParser) readTokenAsMetricName() { p.currentToken.Reset() if !isValidMetricNameStart(p.currentByte) { return } for { p.currentToken.WriteByte(p.currentByte) p.currentByte, p.err = p.buf.ReadByte() if p.err != nil || !isValidMetricNameContinuation(p.currentByte) { return } } }
func (ps *PromSurfacer) promMetricName(k string) string { k = ps.prefix + k // Before checking with regex, see if this metric name is // already known. This block will be entered only once per // metric name. if metricName, ok := promMetricNames[k]; ok { return metricName } ps.l.Infof("Checking validity of new metric: %s", k) // We'll come here only once per metric name. // Prometheus doesn't support "-" in metric names. metricName := strings.Replace(k, "-", "_", -1) if !ps.metricNameRe.MatchString(metricName) { // Explicitly store a zero string so that we don't check it again. promMetricNames[k] = "" ps.l.Warningf("Ignoring invalid prometheus metric name: %s", k) return "" } promMetricNames[k] = metricName return metricName }
0.611467
k8snetworkplumbingwg/multus-cni
vendor/github.com/prometheus/common/expfmt/text_parse.go
google/cloudprober
surfacers/prometheus/prometheus.go
Apache-2.0
go
readTokenAsMetricName copies a metric name from p.buf into p.currentToken. The first byte considered is the byte already read (now in p.currentByte). The first byte not part of a metric name is still copied into p.currentByte, but not into p.currentToken.
func (p *TextParser) readTokenAsMetricName() { p.currentToken.Reset() if !isValidMetricNameStart(p.currentByte) { return } for { p.currentToken.WriteByte(p.currentByte) p.currentByte, p.err = p.buf.ReadByte() if p.err != nil || !isValidMetricNameContinuation(p.currentByte) { return } } }
func IsValidMetricName(n LabelValue) bool { switch NameValidationScheme { case LegacyValidation: return IsValidLegacyMetricName(n) case UTF8Validation: if len(n) == 0 { return false } return utf8.ValidString(string(n)) default: panic(fmt.Sprintf("Invalid name validation scheme requested: %d", NameValidationScheme)) } }
0.600482
k8snetworkplumbingwg/multus-cni
vendor/github.com/prometheus/common/expfmt/text_parse.go
Telefonica/prometheus-kafka-adapter
vendor/github.com/prometheus/common/model/metric.go
Apache-2.0
go
readTokenAsMetricName copies a metric name from p.buf into p.currentToken. The first byte considered is the byte already read (now in p.currentByte). The first byte not part of a metric name is still copied into p.currentByte, but not into p.currentToken.
func (p *TextParser) readTokenAsMetricName() { p.currentToken.Reset() if !isValidMetricNameStart(p.currentByte) { return } for { p.currentToken.WriteByte(p.currentByte) p.currentByte, p.err = p.buf.ReadByte() if p.err != nil || !isValidMetricNameContinuation(p.currentByte) { return } } }
func IsValidMetricName(n LabelValue) bool { if len(n) == 0 { return false } for i, b := range n { if !((b >= 'a' && b <= 'z') || (b >= 'A' && b <= 'Z') || b == '_' || b == ':' || (b >= '0' && b <= '9' && i > 0)) { return false } } return true }
0.570087
k8snetworkplumbingwg/multus-cni
vendor/github.com/prometheus/common/expfmt/text_parse.go
k8snetworkplumbingwg/multus-cni
vendor/github.com/prometheus/common/model/metric.go
Apache-2.0
go
L2BlockTime is a free data retrieval call binding the contract method 0x93991af3. Solidity: function l2BlockTime() view returns(uint256)
func (_L2OutputOracle *L2OutputOracleCaller) L2BlockTime(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} err := _L2OutputOracle.contract.Call(opts, &out, "l2BlockTime") if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err }
func (_L2OutputOracle *L2OutputOracleCaller) L2BLOCKTIME(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} err := _L2OutputOracle.contract.Call(opts, &out, "L2_BLOCK_TIME") if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err }
0.870454
ethereum-optimism/optimism
op-proposer/bindings/l2outputoracle.go
ethereum-optimism/optimism
op-proposer/bindings/l2outputoracle.go
MIT
go
L2BlockTime is a free data retrieval call binding the contract method 0x93991af3. Solidity: function l2BlockTime() view returns(uint256)
func (_L2OutputOracle *L2OutputOracleCaller) L2BlockTime(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} err := _L2OutputOracle.contract.Call(opts, &out, "l2BlockTime") if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err }
func (_L2OutputOracle *L2OutputOracleCaller) ComputeL2Timestamp(opts *bind.CallOpts, _l2BlockNumber *big.Int) (*big.Int, error) { var out []interface{} err := _L2OutputOracle.contract.Call(opts, &out, "computeL2Timestamp", _l2BlockNumber) if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err }
0.715327
ethereum-optimism/optimism
op-proposer/bindings/l2outputoracle.go
ethereum-optimism/optimism
op-proposer/bindings/l2outputoracle.go
MIT
go
L2BlockTime is a free data retrieval call binding the contract method 0x93991af3. Solidity: function l2BlockTime() view returns(uint256)
func (_L2OutputOracle *L2OutputOracleCaller) L2BlockTime(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} err := _L2OutputOracle.contract.Call(opts, &out, "l2BlockTime") if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err }
func (_L1BlockNumber *L1BlockNumberCaller) GetL1BlockNumber(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} err := _L1BlockNumber.contract.Call(opts, &out, "getL1BlockNumber") if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err }
0.665655
ethereum-optimism/optimism
op-proposer/bindings/l2outputoracle.go
ethereum-optimism/optimism
op-e2e/bindings/l1blocknumber.go
MIT
go
L2BlockTime is a free data retrieval call binding the contract method 0x93991af3. Solidity: function l2BlockTime() view returns(uint256)
func (_L2OutputOracle *L2OutputOracleCaller) L2BlockTime(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} err := _L2OutputOracle.contract.Call(opts, &out, "l2BlockTime") if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err }
func (_MultiCall3 *MultiCall3Caller) GetCurrentBlockTimestamp(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} err := _MultiCall3.contract.Call(opts, &out, "getCurrentBlockTimestamp") if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err }
0.651963
ethereum-optimism/optimism
op-proposer/bindings/l2outputoracle.go
ethereum-optimism/optimism
op-e2e/bindings/multicall3.go
MIT
go
L2BlockTime is a free data retrieval call binding the contract method 0x93991af3. Solidity: function l2BlockTime() view returns(uint256)
func (_L2OutputOracle *L2OutputOracleCaller) L2BlockTime(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} err := _L2OutputOracle.contract.Call(opts, &out, "l2BlockTime") if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err }
func (_L1Block *L1BlockCaller) L1FeeOverhead(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} err := _L1Block.contract.Call(opts, &out, "l1FeeOverhead") if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err }
0.634378
ethereum-optimism/optimism
op-proposer/bindings/l2outputoracle.go
ethereum-optimism/optimism
op-e2e/bindings/l1block.go
MIT
go
runWithRetryOnAbortedOrFailedInlineBeginOrSessionNotFound executes the given function and retries it if it returns an Aborted, Session not found error or certain Internal errors. The retry is delayed if the error was Aborted or Internal error. The delay between retries is the delay returned by Cloud Spanner, or if none is returned, the calculated delay with a minimum of 10ms and maximum of 32s. There is no delay before the retry if the error was Session not found or failed inline begin transaction.
func runWithRetryOnAbortedOrFailedInlineBeginOrSessionNotFound(ctx context.Context, f func(context.Context) error) error { retryer := onCodes(DefaultRetryBackoff, codes.Aborted, codes.ResourceExhausted, codes.Internal) funcWithRetry := func(ctx context.Context) error { for { err := f(ctx) if err == nil { return nil } // Get Spanner or GRPC status error. // TODO(loite): Refactor to unwrap Status error instead of Spanner // error when statusError implements the (errors|xerrors).Wrapper // interface. var retryErr error var se *Error if errors.As(err, &se) { // It is a (wrapped) Spanner error. Use that to check whether // we should retry. retryErr = se } else { // It's not a Spanner error, check if it is a status error. _, ok := status.FromError(err) if !ok { return err } retryErr = err } if isSessionNotFoundError(retryErr) { trace.TracePrintf(ctx, nil, "Retrying after Session not found") continue } if isFailedInlineBeginTransaction(retryErr) { trace.TracePrintf(ctx, nil, "Retrying after failed inline begin transaction") continue } delay, shouldRetry := retryer.Retry(retryErr) if !shouldRetry { return err } trace.TracePrintf(ctx, nil, "Backing off after ABORTED for %s, then retrying", delay) if err := gax.Sleep(ctx, delay); err != nil { return err } } } return funcWithRetry(ctx) }
func Retry(retryFunc RetryFunc, opts ...Option) error { config := &RetryConfig{ retryTimes: DefaultRetryTimes, context: context.TODO(), } for _, opt := range opts { opt(config) } if config.backoffStrategy == nil { config.backoffStrategy = &linear{ interval: DefaultRetryLinearInterval, } } var i uint for i < config.retryTimes { err := retryFunc() if err != nil { select { case <-time.After(config.backoffStrategy.CalculateInterval()): case <-config.context.Done(): return errors.New("retry is cancelled") } } else { return nil } i++ } funcPath := runtime.FuncForPC(reflect.ValueOf(retryFunc).Pointer()).Name() lastSlash := strings.LastIndex(funcPath, "/") funcName := funcPath[lastSlash+1:] return fmt.Errorf("function %s run failed after %d times retry", funcName, i) }
0.630383
googleapis/google-cloud-go
spanner/retry.go
duke-git/lancet
retry/retry.go
MIT
go
runWithRetryOnAbortedOrFailedInlineBeginOrSessionNotFound executes the given function and retries it if it returns an Aborted, Session not found error or certain Internal errors. The retry is delayed if the error was Aborted or Internal error. The delay between retries is the delay returned by Cloud Spanner, or if none is returned, the calculated delay with a minimum of 10ms and maximum of 32s. There is no delay before the retry if the error was Session not found or failed inline begin transaction.
func runWithRetryOnAbortedOrFailedInlineBeginOrSessionNotFound(ctx context.Context, f func(context.Context) error) error { retryer := onCodes(DefaultRetryBackoff, codes.Aborted, codes.ResourceExhausted, codes.Internal) funcWithRetry := func(ctx context.Context) error { for { err := f(ctx) if err == nil { return nil } // Get Spanner or GRPC status error. // TODO(loite): Refactor to unwrap Status error instead of Spanner // error when statusError implements the (errors|xerrors).Wrapper // interface. var retryErr error var se *Error if errors.As(err, &se) { // It is a (wrapped) Spanner error. Use that to check whether // we should retry. retryErr = se } else { // It's not a Spanner error, check if it is a status error. _, ok := status.FromError(err) if !ok { return err } retryErr = err } if isSessionNotFoundError(retryErr) { trace.TracePrintf(ctx, nil, "Retrying after Session not found") continue } if isFailedInlineBeginTransaction(retryErr) { trace.TracePrintf(ctx, nil, "Retrying after failed inline begin transaction") continue } delay, shouldRetry := retryer.Retry(retryErr) if !shouldRetry { return err } trace.TracePrintf(ctx, nil, "Backing off after ABORTED for %s, then retrying", delay) if err := gax.Sleep(ctx, delay); err != nil { return err } } } return funcWithRetry(ctx) }
func (ca *clusterAdmin) retryOnError(retryable func(error) bool, fn func() error) error { for attemptsRemaining := ca.conf.Admin.Retry.Max + 1; ; { err := fn() attemptsRemaining-- if err == nil || attemptsRemaining <= 0 || !retryable(err) { return err } Logger.Printf( "admin/request retrying after %dms... (%d attempts remaining)\n", ca.conf.Admin.Retry.Backoff/time.Millisecond, attemptsRemaining) time.Sleep(ca.conf.Admin.Retry.Backoff) } }
0.58377
googleapis/google-cloud-go
spanner/retry.go
tektoncd/cli
vendor/github.com/IBM/sarama/admin.go
Apache-2.0
go
runWithRetryOnAbortedOrFailedInlineBeginOrSessionNotFound executes the given function and retries it if it returns an Aborted, Session not found error or certain Internal errors. The retry is delayed if the error was Aborted or Internal error. The delay between retries is the delay returned by Cloud Spanner, or if none is returned, the calculated delay with a minimum of 10ms and maximum of 32s. There is no delay before the retry if the error was Session not found or failed inline begin transaction.
func runWithRetryOnAbortedOrFailedInlineBeginOrSessionNotFound(ctx context.Context, f func(context.Context) error) error { retryer := onCodes(DefaultRetryBackoff, codes.Aborted, codes.ResourceExhausted, codes.Internal) funcWithRetry := func(ctx context.Context) error { for { err := f(ctx) if err == nil { return nil } // Get Spanner or GRPC status error. // TODO(loite): Refactor to unwrap Status error instead of Spanner // error when statusError implements the (errors|xerrors).Wrapper // interface. var retryErr error var se *Error if errors.As(err, &se) { // It is a (wrapped) Spanner error. Use that to check whether // we should retry. retryErr = se } else { // It's not a Spanner error, check if it is a status error. _, ok := status.FromError(err) if !ok { return err } retryErr = err } if isSessionNotFoundError(retryErr) { trace.TracePrintf(ctx, nil, "Retrying after Session not found") continue } if isFailedInlineBeginTransaction(retryErr) { trace.TracePrintf(ctx, nil, "Retrying after failed inline begin transaction") continue } delay, shouldRetry := retryer.Retry(retryErr) if !shouldRetry { return err } trace.TracePrintf(ctx, nil, "Backing off after ABORTED for %s, then retrying", delay) if err := gax.Sleep(ctx, delay); err != nil { return err } } } return funcWithRetry(ctx) }
func (d *namespacedResourcesDeleter) retryOnConflictError(ctx context.Context, namespace *v1.Namespace, fn updateNamespaceFunc) (result *v1.Namespace, err error) { latestNamespace := namespace for { result, err = fn(ctx, latestNamespace) if err == nil { return result, nil } if !errors.IsConflict(err) { return nil, err } prevNamespace := latestNamespace latestNamespace, err = d.nsClient.Get(ctx, latestNamespace.Name, metav1.GetOptions{}) if err != nil { return nil, err } if prevNamespace.UID != latestNamespace.UID { return nil, fmt.Errorf("namespace uid has changed across retries") } } }
0.583707
googleapis/google-cloud-go
spanner/retry.go
onexstack/onex
internal/controller/namespace/controller.go
MIT
go
runWithRetryOnAbortedOrFailedInlineBeginOrSessionNotFound executes the given function and retries it if it returns an Aborted, Session not found error or certain Internal errors. The retry is delayed if the error was Aborted or Internal error. The delay between retries is the delay returned by Cloud Spanner, or if none is returned, the calculated delay with a minimum of 10ms and maximum of 32s. There is no delay before the retry if the error was Session not found or failed inline begin transaction.
func runWithRetryOnAbortedOrFailedInlineBeginOrSessionNotFound(ctx context.Context, f func(context.Context) error) error { retryer := onCodes(DefaultRetryBackoff, codes.Aborted, codes.ResourceExhausted, codes.Internal) funcWithRetry := func(ctx context.Context) error { for { err := f(ctx) if err == nil { return nil } // Get Spanner or GRPC status error. // TODO(loite): Refactor to unwrap Status error instead of Spanner // error when statusError implements the (errors|xerrors).Wrapper // interface. var retryErr error var se *Error if errors.As(err, &se) { // It is a (wrapped) Spanner error. Use that to check whether // we should retry. retryErr = se } else { // It's not a Spanner error, check if it is a status error. _, ok := status.FromError(err) if !ok { return err } retryErr = err } if isSessionNotFoundError(retryErr) { trace.TracePrintf(ctx, nil, "Retrying after Session not found") continue } if isFailedInlineBeginTransaction(retryErr) { trace.TracePrintf(ctx, nil, "Retrying after failed inline begin transaction") continue } delay, shouldRetry := retryer.Retry(retryErr) if !shouldRetry { return err } trace.TracePrintf(ctx, nil, "Backing off after ABORTED for %s, then retrying", delay) if err := gax.Sleep(ctx, delay); err != nil { return err } } } return funcWithRetry(ctx) }
func retry(ctx context.Context, call func() error, check func() error) error { timeout := time.After(60 * time.Second) var err error for { select { case <-timeout: return err default: } err = call() if err == nil { if check == nil || check() == nil { return nil } err = check() } time.Sleep(200 * time.Millisecond) } }
0.570632
googleapis/google-cloud-go
spanner/retry.go
googleapis/google-cloud-go
storage/integration_test.go
Apache-2.0
go
runWithRetryOnAbortedOrFailedInlineBeginOrSessionNotFound executes the given function and retries it if it returns an Aborted, Session not found error or certain Internal errors. The retry is delayed if the error was Aborted or Internal error. The delay between retries is the delay returned by Cloud Spanner, or if none is returned, the calculated delay with a minimum of 10ms and maximum of 32s. There is no delay before the retry if the error was Session not found or failed inline begin transaction.
func runWithRetryOnAbortedOrFailedInlineBeginOrSessionNotFound(ctx context.Context, f func(context.Context) error) error { retryer := onCodes(DefaultRetryBackoff, codes.Aborted, codes.ResourceExhausted, codes.Internal) funcWithRetry := func(ctx context.Context) error { for { err := f(ctx) if err == nil { return nil } // Get Spanner or GRPC status error. // TODO(loite): Refactor to unwrap Status error instead of Spanner // error when statusError implements the (errors|xerrors).Wrapper // interface. var retryErr error var se *Error if errors.As(err, &se) { // It is a (wrapped) Spanner error. Use that to check whether // we should retry. retryErr = se } else { // It's not a Spanner error, check if it is a status error. _, ok := status.FromError(err) if !ok { return err } retryErr = err } if isSessionNotFoundError(retryErr) { trace.TracePrintf(ctx, nil, "Retrying after Session not found") continue } if isFailedInlineBeginTransaction(retryErr) { trace.TracePrintf(ctx, nil, "Retrying after failed inline begin transaction") continue } delay, shouldRetry := retryer.Retry(retryErr) if !shouldRetry { return err } trace.TracePrintf(ctx, nil, "Backing off after ABORTED for %s, then retrying", delay) if err := gax.Sleep(ctx, delay); err != nil { return err } } } return funcWithRetry(ctx) }
func Retry(f func() error, p Predicate, backoff wait.Backoff) (err error) { if f == nil { return fmt.Errorf("nil f passed to retry") } if p == nil { return fmt.Errorf("nil p passed to retry") } condition := func() (bool, error) { err = f() if p(err) { return false, nil } return true, err } wait.ExponentialBackoff(backoff, condition) return }
0.568989
googleapis/google-cloud-go
spanner/retry.go
tektoncd/cli
vendor/github.com/google/go-containerregistry/internal/retry/retry.go
Apache-2.0
go
UpdateInstance updates an instance, and begins allocating or releasing resources as requested. The returned long-running operation can be used to track the progress of updating the instance. If the named instance does not exist, returns NOT_FOUND. Immediately upon completion of this request: For resource types for which a decrease in the instance’s allocation has been requested, billing is based on the newly-requested level. Until completion of the returned operation: Cancelling the operation sets its metadata’s cancel_time, and begins restoring resources to their pre-request values. The operation is guaranteed to succeed at undoing all resource changes, after which point it terminates with a CANCELLED status. All other attempts to modify the instance are rejected. Reading the instance via the API continues to give the pre-request resource levels. Upon completion of the returned operation: Billing begins for all successfully-allocated resources (some types may have lower than the requested levels). All newly-reserved resources are available for serving the instance’s tables. The instance’s new resource levels are readable via the API. The returned long-running operation will have a name of the format <instance_name>/operations/<operation_id> and can be used to track the instance modification. The metadata field type is UpdateInstanceMetadata. The response field type is Instance, if successful. Authorization requires spanner.instances.update permission on the resource [name][google.spanner.admin.instance.v1.Instance.name (at http://google.spanner.admin.instance.v1.Instance.name)].
func (c *InstanceAdminClient) UpdateInstance(ctx context.Context, req *instancepb.UpdateInstanceRequest, opts ...gax.CallOption) (*UpdateInstanceOperation, error) { return c.internalClient.UpdateInstance(ctx, req, opts...) }
func (c *InstanceAdminClient) UpdateInstancePartition(ctx context.Context, req *instancepb.UpdateInstancePartitionRequest, opts ...gax.CallOption) (*UpdateInstancePartitionOperation, error) { return c.internalClient.UpdateInstancePartition(ctx, req, opts...) }
0.836452
googleapis/google-cloud-go
spanner/admin/instance/apiv1/instance_admin_client.go
googleapis/google-cloud-go
spanner/admin/instance/apiv1/instance_admin_client.go
Apache-2.0
go
UpdateInstance updates an instance, and begins allocating or releasing resources as requested. The returned long-running operation can be used to track the progress of updating the instance. If the named instance does not exist, returns NOT_FOUND. Immediately upon completion of this request: For resource types for which a decrease in the instance’s allocation has been requested, billing is based on the newly-requested level. Until completion of the returned operation: Cancelling the operation sets its metadata’s cancel_time, and begins restoring resources to their pre-request values. The operation is guaranteed to succeed at undoing all resource changes, after which point it terminates with a CANCELLED status. All other attempts to modify the instance are rejected. Reading the instance via the API continues to give the pre-request resource levels. Upon completion of the returned operation: Billing begins for all successfully-allocated resources (some types may have lower than the requested levels). All newly-reserved resources are available for serving the instance’s tables. The instance’s new resource levels are readable via the API. The returned long-running operation will have a name of the format <instance_name>/operations/<operation_id> and can be used to track the instance modification. The metadata field type is UpdateInstanceMetadata. The response field type is Instance, if successful. Authorization requires spanner.instances.update permission on the resource [name][google.spanner.admin.instance.v1.Instance.name (at http://google.spanner.admin.instance.v1.Instance.name)].
func (c *InstanceAdminClient) UpdateInstance(ctx context.Context, req *instancepb.UpdateInstanceRequest, opts ...gax.CallOption) (*UpdateInstanceOperation, error) { return c.internalClient.UpdateInstance(ctx, req, opts...) }
func (c *InstanceAdminClient) UpdateInstanceConfig(ctx context.Context, req *instancepb.UpdateInstanceConfigRequest, opts ...gax.CallOption) (*UpdateInstanceConfigOperation, error) { return c.internalClient.UpdateInstanceConfig(ctx, req, opts...) }
0.817487
googleapis/google-cloud-go
spanner/admin/instance/apiv1/instance_admin_client.go
googleapis/google-cloud-go
spanner/admin/instance/apiv1/instance_admin_client.go
Apache-2.0
go
UpdateInstance updates an instance, and begins allocating or releasing resources as requested. The returned long-running operation can be used to track the progress of updating the instance. If the named instance does not exist, returns NOT_FOUND. Immediately upon completion of this request: For resource types for which a decrease in the instance’s allocation has been requested, billing is based on the newly-requested level. Until completion of the returned operation: Cancelling the operation sets its metadata’s cancel_time, and begins restoring resources to their pre-request values. The operation is guaranteed to succeed at undoing all resource changes, after which point it terminates with a CANCELLED status. All other attempts to modify the instance are rejected. Reading the instance via the API continues to give the pre-request resource levels. Upon completion of the returned operation: Billing begins for all successfully-allocated resources (some types may have lower than the requested levels). All newly-reserved resources are available for serving the instance’s tables. The instance’s new resource levels are readable via the API. The returned long-running operation will have a name of the format <instance_name>/operations/<operation_id> and can be used to track the instance modification. The metadata field type is UpdateInstanceMetadata. The response field type is Instance, if successful. Authorization requires spanner.instances.update permission on the resource [name][google.spanner.admin.instance.v1.Instance.name (at http://google.spanner.admin.instance.v1.Instance.name)].
func (c *InstanceAdminClient) UpdateInstance(ctx context.Context, req *instancepb.UpdateInstanceRequest, opts ...gax.CallOption) (*UpdateInstanceOperation, error) { return c.internalClient.UpdateInstance(ctx, req, opts...) }
func (c *SSOAdmin) UpdateInstance(input *UpdateInstanceInput) (*UpdateInstanceOutput, error) { req, out := c.UpdateInstanceRequest(input) return out, req.Send() }
0.729192
googleapis/google-cloud-go
spanner/admin/instance/apiv1/instance_admin_client.go
aws/aws-sdk-go
service/ssoadmin/api.go
Apache-2.0
go
UpdateInstance updates an instance, and begins allocating or releasing resources as requested. The returned long-running operation can be used to track the progress of updating the instance. If the named instance does not exist, returns NOT_FOUND. Immediately upon completion of this request: For resource types for which a decrease in the instance’s allocation has been requested, billing is based on the newly-requested level. Until completion of the returned operation: Cancelling the operation sets its metadata’s cancel_time, and begins restoring resources to their pre-request values. The operation is guaranteed to succeed at undoing all resource changes, after which point it terminates with a CANCELLED status. All other attempts to modify the instance are rejected. Reading the instance via the API continues to give the pre-request resource levels. Upon completion of the returned operation: Billing begins for all successfully-allocated resources (some types may have lower than the requested levels). All newly-reserved resources are available for serving the instance’s tables. The instance’s new resource levels are readable via the API. The returned long-running operation will have a name of the format <instance_name>/operations/<operation_id> and can be used to track the instance modification. The metadata field type is UpdateInstanceMetadata. The response field type is Instance, if successful. Authorization requires spanner.instances.update permission on the resource [name][google.spanner.admin.instance.v1.Instance.name (at http://google.spanner.admin.instance.v1.Instance.name)].
func (c *InstanceAdminClient) UpdateInstance(ctx context.Context, req *instancepb.UpdateInstanceRequest, opts ...gax.CallOption) (*UpdateInstanceOperation, error) { return c.internalClient.UpdateInstance(ctx, req, opts...) }
func (c *InstanceAdminClient) CreateInstance(ctx context.Context, req *instancepb.CreateInstanceRequest, opts ...gax.CallOption) (*CreateInstanceOperation, error) { return c.internalClient.CreateInstance(ctx, req, opts...) }
0.709084
googleapis/google-cloud-go
spanner/admin/instance/apiv1/instance_admin_client.go
googleapis/google-cloud-go
spanner/admin/instance/apiv1/instance_admin_client.go
Apache-2.0
go
UpdateInstance updates an instance, and begins allocating or releasing resources as requested. The returned long-running operation can be used to track the progress of updating the instance. If the named instance does not exist, returns NOT_FOUND. Immediately upon completion of this request: For resource types for which a decrease in the instance’s allocation has been requested, billing is based on the newly-requested level. Until completion of the returned operation: Cancelling the operation sets its metadata’s cancel_time, and begins restoring resources to their pre-request values. The operation is guaranteed to succeed at undoing all resource changes, after which point it terminates with a CANCELLED status. All other attempts to modify the instance are rejected. Reading the instance via the API continues to give the pre-request resource levels. Upon completion of the returned operation: Billing begins for all successfully-allocated resources (some types may have lower than the requested levels). All newly-reserved resources are available for serving the instance’s tables. The instance’s new resource levels are readable via the API. The returned long-running operation will have a name of the format <instance_name>/operations/<operation_id> and can be used to track the instance modification. The metadata field type is UpdateInstanceMetadata. The response field type is Instance, if successful. Authorization requires spanner.instances.update permission on the resource [name][google.spanner.admin.instance.v1.Instance.name (at http://google.spanner.admin.instance.v1.Instance.name)].
func (c *InstanceAdminClient) UpdateInstance(ctx context.Context, req *instancepb.UpdateInstanceRequest, opts ...gax.CallOption) (*UpdateInstanceOperation, error) { return c.internalClient.UpdateInstance(ctx, req, opts...) }
func (c *InstanceAdminClient) MoveInstance(ctx context.Context, req *instancepb.MoveInstanceRequest, opts ...gax.CallOption) (*MoveInstanceOperation, error) { return c.internalClient.MoveInstance(ctx, req, opts...) }
0.702374
googleapis/google-cloud-go
spanner/admin/instance/apiv1/instance_admin_client.go
googleapis/google-cloud-go
spanner/admin/instance/apiv1/instance_admin_client.go
Apache-2.0
go
GetResource returns a resource so that it's either created or updated in the cluster, it also returns the runtime state of the resource. Indicating whether the resource variables are resolved or not, and whether the resource readiness conditions are met or not.
func (rt *ResourceGraphDefinitionRuntime) GetResource(id string) (*unstructured.Unstructured, ResourceState) { // Did the user set the resource? r, ok := rt.resolvedResources[id] if ok { return r, ResourceStateResolved } // If not, can we process the resource? resolved := rt.canProcessResource(id) if resolved { return rt.resources[id].Unstructured(), ResourceStateResolved } return nil, ResourceStateWaitingOnDependencies }
func (c *CloudControlApi) GetResource(input *GetResourceInput) (*GetResourceOutput, error) { req, out := c.GetResourceRequest(input) return out, req.Send() }
0.703886
kro-run/kro
pkg/runtime/runtime.go
aws/aws-sdk-go
service/cloudcontrolapi/api.go
Apache-2.0
go
GetResource returns a resource so that it's either created or updated in the cluster, it also returns the runtime state of the resource. Indicating whether the resource variables are resolved or not, and whether the resource readiness conditions are met or not.
func (rt *ResourceGraphDefinitionRuntime) GetResource(id string) (*unstructured.Unstructured, ResourceState) { // Did the user set the resource? r, ok := rt.resolvedResources[id] if ok { return r, ResourceStateResolved } // If not, can we process the resource? resolved := rt.canProcessResource(id) if resolved { return rt.resources[id].Unstructured(), ResourceStateResolved } return nil, ResourceStateWaitingOnDependencies }
func (c *APIGateway) GetResource(input *GetResourceInput) (*Resource, error) { req, out := c.GetResourceRequest(input) return out, req.Send() }
0.597304
kro-run/kro
pkg/runtime/runtime.go
aws/aws-sdk-go
service/apigateway/api.go
Apache-2.0
go
GetResource returns a resource so that it's either created or updated in the cluster, it also returns the runtime state of the resource. Indicating whether the resource variables are resolved or not, and whether the resource readiness conditions are met or not.
func (rt *ResourceGraphDefinitionRuntime) GetResource(id string) (*unstructured.Unstructured, ResourceState) { // Did the user set the resource? r, ok := rt.resolvedResources[id] if ok { return r, ResourceStateResolved } // If not, can we process the resource? resolved := rt.canProcessResource(id) if resolved { return rt.resources[id].Unstructured(), ResourceStateResolved } return nil, ResourceStateWaitingOnDependencies }
func GetResourceLocation(resp *http.Response) (string, error) { jsonBody, err := GetJSON(resp) if err != nil { return "", err } v, ok := jsonBody["resourceLocation"] if !ok { // it might be ok if the field doesn't exist, the caller must make that determination return "", nil } vv, ok := v.(string) if !ok { return "", fmt.Errorf("the resourceLocation value %v was not in string format", v) } return vv, nil }
0.590566
kro-run/kro
pkg/runtime/runtime.go
moby/buildkit
vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/poller/util.go
Apache-2.0
go
GetResource returns a resource so that it's either created or updated in the cluster, it also returns the runtime state of the resource. Indicating whether the resource variables are resolved or not, and whether the resource readiness conditions are met or not.
func (rt *ResourceGraphDefinitionRuntime) GetResource(id string) (*unstructured.Unstructured, ResourceState) { // Did the user set the resource? r, ok := rt.resolvedResources[id] if ok { return r, ResourceStateResolved } // If not, can we process the resource? resolved := rt.canProcessResource(id) if resolved { return rt.resources[id].Unstructured(), ResourceStateResolved } return nil, ResourceStateWaitingOnDependencies }
func (c *CloudControlApi) GetResourceWithContext(ctx aws.Context, input *GetResourceInput, opts ...request.Option) (*GetResourceOutput, error) { req, out := c.GetResourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.58993
kro-run/kro
pkg/runtime/runtime.go
aws/aws-sdk-go
service/cloudcontrolapi/api.go
Apache-2.0
go
GetResource returns a resource so that it's either created or updated in the cluster, it also returns the runtime state of the resource. Indicating whether the resource variables are resolved or not, and whether the resource readiness conditions are met or not.
func (rt *ResourceGraphDefinitionRuntime) GetResource(id string) (*unstructured.Unstructured, ResourceState) { // Did the user set the resource? r, ok := rt.resolvedResources[id] if ok { return r, ResourceStateResolved } // If not, can we process the resource? resolved := rt.canProcessResource(id) if resolved { return rt.resources[id].Unstructured(), ResourceStateResolved } return nil, ResourceStateWaitingOnDependencies }
func (c *Route53RecoveryReadiness) GetResourceSet(input *GetResourceSetInput) (*GetResourceSetOutput, error) { req, out := c.GetResourceSetRequest(input) return out, req.Send() }
0.565153
kro-run/kro
pkg/runtime/runtime.go
aws/aws-sdk-go
service/route53recoveryreadiness/api.go
Apache-2.0
go
SearchImageSets API operation for AWS Health Imaging. Search image sets based on defined input attributes. SearchImageSets accepts a single search query parameter and returns a paginated response of all image sets that have the matching criteria. All date range queries must be input as (lowerBound, upperBound). By default, SearchImageSets uses the updatedAt field for sorting in descending order from newest to oldest. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for AWS Health Imaging's API operation SearchImageSets for usage and error information. Returned Error Types: - ThrottlingException The request was denied due to throttling. - ConflictException Updating or deleting a resource can cause an inconsistent state. - AccessDeniedException The user does not have sufficient access to perform this action. - ValidationException The input fails to satisfy the constraints set by the service. - InternalServerException An unexpected error occurred during processing of the request. - ResourceNotFoundException The request references a resource which does not exist. See also, https://docs.aws.amazon.com/goto/WebAPI/medical-imaging-2023-07-19/SearchImageSets
func (c *MedicalImaging) SearchImageSets(input *SearchImageSetsInput) (*SearchImageSetsOutput, error) { req, out := c.SearchImageSetsRequest(input) return out, req.Send() }
func (c *MedicalImaging) SearchImageSetsRequest(input *SearchImageSetsInput) (req *request.Request, output *SearchImageSetsOutput) { op := &request.Operation{ Name: opSearchImageSets, HTTPMethod: "POST", HTTPPath: "/datastore/{datastoreId}/searchImageSets", Paginator: &request.Paginator{ InputTokens: []string{"nextToken"}, OutputTokens: []string{"nextToken"}, LimitToken: "maxResults", TruncationToken: "", }, } if input == nil { input = &SearchImageSetsInput{} } output = &SearchImageSetsOutput{} req = c.newRequest(op, input, output) req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("runtime-", nil)) req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler) return }
0.769526
aws/aws-sdk-go
service/medicalimaging/api.go
aws/aws-sdk-go
service/medicalimaging/api.go
Apache-2.0
go
SearchImageSets API operation for AWS Health Imaging. Search image sets based on defined input attributes. SearchImageSets accepts a single search query parameter and returns a paginated response of all image sets that have the matching criteria. All date range queries must be input as (lowerBound, upperBound). By default, SearchImageSets uses the updatedAt field for sorting in descending order from newest to oldest. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for AWS Health Imaging's API operation SearchImageSets for usage and error information. Returned Error Types: - ThrottlingException The request was denied due to throttling. - ConflictException Updating or deleting a resource can cause an inconsistent state. - AccessDeniedException The user does not have sufficient access to perform this action. - ValidationException The input fails to satisfy the constraints set by the service. - InternalServerException An unexpected error occurred during processing of the request. - ResourceNotFoundException The request references a resource which does not exist. See also, https://docs.aws.amazon.com/goto/WebAPI/medical-imaging-2023-07-19/SearchImageSets
func (c *MedicalImaging) SearchImageSets(input *SearchImageSetsInput) (*SearchImageSetsOutput, error) { req, out := c.SearchImageSetsRequest(input) return out, req.Send() }
func (c *MedicalImaging) SearchImageSetsPages(input *SearchImageSetsInput, fn func(*SearchImageSetsOutput, bool) bool) error { return c.SearchImageSetsPagesWithContext(aws.BackgroundContext(), input, fn) }
0.694981
aws/aws-sdk-go
service/medicalimaging/api.go
aws/aws-sdk-go
service/medicalimaging/api.go
Apache-2.0
go
SearchImageSets API operation for AWS Health Imaging. Search image sets based on defined input attributes. SearchImageSets accepts a single search query parameter and returns a paginated response of all image sets that have the matching criteria. All date range queries must be input as (lowerBound, upperBound). By default, SearchImageSets uses the updatedAt field for sorting in descending order from newest to oldest. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for AWS Health Imaging's API operation SearchImageSets for usage and error information. Returned Error Types: - ThrottlingException The request was denied due to throttling. - ConflictException Updating or deleting a resource can cause an inconsistent state. - AccessDeniedException The user does not have sufficient access to perform this action. - ValidationException The input fails to satisfy the constraints set by the service. - InternalServerException An unexpected error occurred during processing of the request. - ResourceNotFoundException The request references a resource which does not exist. See also, https://docs.aws.amazon.com/goto/WebAPI/medical-imaging-2023-07-19/SearchImageSets
func (c *MedicalImaging) SearchImageSets(input *SearchImageSetsInput) (*SearchImageSetsOutput, error) { req, out := c.SearchImageSetsRequest(input) return out, req.Send() }
func (c *MedicalImaging) SearchImageSetsWithContext(ctx aws.Context, input *SearchImageSetsInput, opts ...request.Option) (*SearchImageSetsOutput, error) { req, out := c.SearchImageSetsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.69442
aws/aws-sdk-go
service/medicalimaging/api.go
aws/aws-sdk-go
service/medicalimaging/api.go
Apache-2.0
go
SearchImageSets API operation for AWS Health Imaging. Search image sets based on defined input attributes. SearchImageSets accepts a single search query parameter and returns a paginated response of all image sets that have the matching criteria. All date range queries must be input as (lowerBound, upperBound). By default, SearchImageSets uses the updatedAt field for sorting in descending order from newest to oldest. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for AWS Health Imaging's API operation SearchImageSets for usage and error information. Returned Error Types: - ThrottlingException The request was denied due to throttling. - ConflictException Updating or deleting a resource can cause an inconsistent state. - AccessDeniedException The user does not have sufficient access to perform this action. - ValidationException The input fails to satisfy the constraints set by the service. - InternalServerException An unexpected error occurred during processing of the request. - ResourceNotFoundException The request references a resource which does not exist. See also, https://docs.aws.amazon.com/goto/WebAPI/medical-imaging-2023-07-19/SearchImageSets
func (c *MedicalImaging) SearchImageSets(input *SearchImageSetsInput) (*SearchImageSetsOutput, error) { req, out := c.SearchImageSetsRequest(input) return out, req.Send() }
func (c *MedicalImaging) SearchImageSetsPagesWithContext(ctx aws.Context, input *SearchImageSetsInput, fn func(*SearchImageSetsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *SearchImageSetsInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.SearchImageSetsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*SearchImageSetsOutput), !p.HasNextPage()) { break } } return p.Err() }
0.648256
aws/aws-sdk-go
service/medicalimaging/api.go
aws/aws-sdk-go
service/medicalimaging/api.go
Apache-2.0
go
SearchImageSets API operation for AWS Health Imaging. Search image sets based on defined input attributes. SearchImageSets accepts a single search query parameter and returns a paginated response of all image sets that have the matching criteria. All date range queries must be input as (lowerBound, upperBound). By default, SearchImageSets uses the updatedAt field for sorting in descending order from newest to oldest. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for AWS Health Imaging's API operation SearchImageSets for usage and error information. Returned Error Types: - ThrottlingException The request was denied due to throttling. - ConflictException Updating or deleting a resource can cause an inconsistent state. - AccessDeniedException The user does not have sufficient access to perform this action. - ValidationException The input fails to satisfy the constraints set by the service. - InternalServerException An unexpected error occurred during processing of the request. - ResourceNotFoundException The request references a resource which does not exist. See also, https://docs.aws.amazon.com/goto/WebAPI/medical-imaging-2023-07-19/SearchImageSets
func (c *MedicalImaging) SearchImageSets(input *SearchImageSetsInput) (*SearchImageSetsOutput, error) { req, out := c.SearchImageSetsRequest(input) return out, req.Send() }
func (c *MedicalImaging) GetImageSet(input *GetImageSetInput) (*GetImageSetOutput, error) { req, out := c.GetImageSetRequest(input) return out, req.Send() }
0.63403
aws/aws-sdk-go
service/medicalimaging/api.go
aws/aws-sdk-go
service/medicalimaging/api.go
Apache-2.0
go
AttachVpnGateway API operation for Amazon Elastic Compute Cloud. Attaches a virtual private gateway to a VPC. You can attach one virtual private gateway to one VPC at a time. For more information, see Amazon Web Services Site-to-Site VPN (https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html) in the Amazon Web Services Site-to-Site VPN User Guide. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for Amazon Elastic Compute Cloud's API operation AttachVpnGateway for usage and error information. See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVpnGateway
func (c *EC2) AttachVpnGateway(input *AttachVpnGatewayInput) (*AttachVpnGatewayOutput, error) { req, out := c.AttachVpnGatewayRequest(input) return out, req.Send() }
func (c *EC2) DetachVpnGateway(input *DetachVpnGatewayInput) (*DetachVpnGatewayOutput, error) { req, out := c.DetachVpnGatewayRequest(input) return out, req.Send() }
0.886392
aws/aws-sdk-go
service/ec2/api.go
aws/aws-sdk-go
service/ec2/api.go
Apache-2.0
go
AttachVpnGateway API operation for Amazon Elastic Compute Cloud. Attaches a virtual private gateway to a VPC. You can attach one virtual private gateway to one VPC at a time. For more information, see Amazon Web Services Site-to-Site VPN (https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html) in the Amazon Web Services Site-to-Site VPN User Guide. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for Amazon Elastic Compute Cloud's API operation AttachVpnGateway for usage and error information. See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVpnGateway
func (c *EC2) AttachVpnGateway(input *AttachVpnGatewayInput) (*AttachVpnGatewayOutput, error) { req, out := c.AttachVpnGatewayRequest(input) return out, req.Send() }
func (c *EC2) AttachVpnGatewayRequest(input *AttachVpnGatewayInput) (req *request.Request, output *AttachVpnGatewayOutput) { op := &request.Operation{ Name: opAttachVpnGateway, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &AttachVpnGatewayInput{} } output = &AttachVpnGatewayOutput{} req = c.newRequest(op, input, output) return }
0.875358
aws/aws-sdk-go
service/ec2/api.go
aws/aws-sdk-go
service/ec2/api.go
Apache-2.0
go
AttachVpnGateway API operation for Amazon Elastic Compute Cloud. Attaches a virtual private gateway to a VPC. You can attach one virtual private gateway to one VPC at a time. For more information, see Amazon Web Services Site-to-Site VPN (https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html) in the Amazon Web Services Site-to-Site VPN User Guide. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for Amazon Elastic Compute Cloud's API operation AttachVpnGateway for usage and error information. See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVpnGateway
func (c *EC2) AttachVpnGateway(input *AttachVpnGatewayInput) (*AttachVpnGatewayOutput, error) { req, out := c.AttachVpnGatewayRequest(input) return out, req.Send() }
func (c *EC2) CreateVpnGateway(input *CreateVpnGatewayInput) (*CreateVpnGatewayOutput, error) { req, out := c.CreateVpnGatewayRequest(input) return out, req.Send() }
0.874049
aws/aws-sdk-go
service/ec2/api.go
aws/aws-sdk-go
service/ec2/api.go
Apache-2.0
go
AttachVpnGateway API operation for Amazon Elastic Compute Cloud. Attaches a virtual private gateway to a VPC. You can attach one virtual private gateway to one VPC at a time. For more information, see Amazon Web Services Site-to-Site VPN (https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html) in the Amazon Web Services Site-to-Site VPN User Guide. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for Amazon Elastic Compute Cloud's API operation AttachVpnGateway for usage and error information. See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVpnGateway
func (c *EC2) AttachVpnGateway(input *AttachVpnGatewayInput) (*AttachVpnGatewayOutput, error) { req, out := c.AttachVpnGatewayRequest(input) return out, req.Send() }
func (c *EC2) AttachInternetGateway(input *AttachInternetGatewayInput) (*AttachInternetGatewayOutput, error) { req, out := c.AttachInternetGatewayRequest(input) return out, req.Send() }
0.862756
aws/aws-sdk-go
service/ec2/api.go
aws/aws-sdk-go
service/ec2/api.go
Apache-2.0
go
AttachVpnGateway API operation for Amazon Elastic Compute Cloud. Attaches a virtual private gateway to a VPC. You can attach one virtual private gateway to one VPC at a time. For more information, see Amazon Web Services Site-to-Site VPN (https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html) in the Amazon Web Services Site-to-Site VPN User Guide. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for Amazon Elastic Compute Cloud's API operation AttachVpnGateway for usage and error information. See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVpnGateway
func (c *EC2) AttachVpnGateway(input *AttachVpnGatewayInput) (*AttachVpnGatewayOutput, error) { req, out := c.AttachVpnGatewayRequest(input) return out, req.Send() }
func (c *EC2) AttachVpnGatewayWithContext(ctx aws.Context, input *AttachVpnGatewayInput, opts ...request.Option) (*AttachVpnGatewayOutput, error) { req, out := c.AttachVpnGatewayRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.831213
aws/aws-sdk-go
service/ec2/api.go
aws/aws-sdk-go
service/ec2/api.go
Apache-2.0
go
AdminGetUserRequest generates a "aws/request.Request" representing the client's request for the AdminGetUser operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See AdminGetUser for more information on using the AdminGetUser API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the AdminGetUserRequest method. req, resp := client.AdminGetUserRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminGetUser
func (c *CognitoIdentityProvider) AdminGetUserRequest(input *AdminGetUserInput) (req *request.Request, output *AdminGetUserOutput) { op := &request.Operation{ Name: opAdminGetUser, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &AdminGetUserInput{} } output = &AdminGetUserOutput{} req = c.newRequest(op, input, output) return }
func (c *CognitoIdentityProvider) GetUserRequest(input *GetUserInput) (req *request.Request, output *GetUserOutput) { op := &request.Operation{ Name: opGetUser, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetUserInput{} } output = &GetUserOutput{} req = c.newRequest(op, input, output) req.Config.Credentials = credentials.AnonymousCredentials return }
0.846785
aws/aws-sdk-go
service/cognitoidentityprovider/api.go
aws/aws-sdk-go
service/cognitoidentityprovider/api.go
Apache-2.0
go
AdminGetUserRequest generates a "aws/request.Request" representing the client's request for the AdminGetUser operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See AdminGetUser for more information on using the AdminGetUser API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the AdminGetUserRequest method. req, resp := client.AdminGetUserRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminGetUser
func (c *CognitoIdentityProvider) AdminGetUserRequest(input *AdminGetUserInput) (req *request.Request, output *AdminGetUserOutput) { op := &request.Operation{ Name: opAdminGetUser, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &AdminGetUserInput{} } output = &AdminGetUserOutput{} req = c.newRequest(op, input, output) return }
func (c *QBusiness) GetUserRequest(input *GetUserInput) (req *request.Request, output *GetUserOutput) { op := &request.Operation{ Name: opGetUser, HTTPMethod: "GET", HTTPPath: "/applications/{applicationId}/users/{userId}", } if input == nil { input = &GetUserInput{} } output = &GetUserOutput{} req = c.newRequest(op, input, output) return }
0.804852
aws/aws-sdk-go
service/cognitoidentityprovider/api.go
aws/aws-sdk-go
service/qbusiness/api.go
Apache-2.0
go
AdminGetUserRequest generates a "aws/request.Request" representing the client's request for the AdminGetUser operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See AdminGetUser for more information on using the AdminGetUser API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the AdminGetUserRequest method. req, resp := client.AdminGetUserRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminGetUser
func (c *CognitoIdentityProvider) AdminGetUserRequest(input *AdminGetUserInput) (req *request.Request, output *AdminGetUserOutput) { op := &request.Operation{ Name: opAdminGetUser, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &AdminGetUserInput{} } output = &AdminGetUserOutput{} req = c.newRequest(op, input, output) return }
func (c *FinSpaceData) GetUserRequest(input *GetUserInput) (req *request.Request, output *GetUserOutput) { if c.Client.Config.Logger != nil { c.Client.Config.Logger.Log("This operation, GetUser, has been deprecated") } op := &request.Operation{ Name: opGetUser, HTTPMethod: "GET", HTTPPath: "/user/{userId}", } if input == nil { input = &GetUserInput{} } output = &GetUserOutput{} req = c.newRequest(op, input, output) return }
0.802673
aws/aws-sdk-go
service/cognitoidentityprovider/api.go
aws/aws-sdk-go
service/finspacedata/api.go
Apache-2.0
go
AdminGetUserRequest generates a "aws/request.Request" representing the client's request for the AdminGetUser operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See AdminGetUser for more information on using the AdminGetUser API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the AdminGetUserRequest method. req, resp := client.AdminGetUserRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminGetUser
func (c *CognitoIdentityProvider) AdminGetUserRequest(input *AdminGetUserInput) (req *request.Request, output *AdminGetUserOutput) { op := &request.Operation{ Name: opAdminGetUser, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &AdminGetUserInput{} } output = &AdminGetUserOutput{} req = c.newRequest(op, input, output) return }
func (c *IAM) GetUserRequest(input *GetUserInput) (req *request.Request, output *GetUserOutput) { op := &request.Operation{ Name: opGetUser, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetUserInput{} } output = &GetUserOutput{} req = c.newRequest(op, input, output) return }
0.791283
aws/aws-sdk-go
service/cognitoidentityprovider/api.go
aws/aws-sdk-go
service/iam/api.go
Apache-2.0
go
AdminGetUserRequest generates a "aws/request.Request" representing the client's request for the AdminGetUser operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See AdminGetUser for more information on using the AdminGetUser API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the AdminGetUserRequest method. req, resp := client.AdminGetUserRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminGetUser
func (c *CognitoIdentityProvider) AdminGetUserRequest(input *AdminGetUserInput) (req *request.Request, output *AdminGetUserOutput) { op := &request.Operation{ Name: opAdminGetUser, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &AdminGetUserInput{} } output = &AdminGetUserOutput{} req = c.newRequest(op, input, output) return }
func (c *CognitoIdentityProvider) AdminGetUser(input *AdminGetUserInput) (*AdminGetUserOutput, error) { req, out := c.AdminGetUserRequest(input) return out, req.Send() }
0.751298
aws/aws-sdk-go
service/cognitoidentityprovider/api.go
aws/aws-sdk-go
service/cognitoidentityprovider/api.go
Apache-2.0
go
DeleteVpcPeeringConnectionWithContext is the same as DeleteVpcPeeringConnection with the addition of the ability to pass a context and additional request options. See DeleteVpcPeeringConnection for details on how to use this API operation. The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (c *EC2) DeleteVpcPeeringConnectionWithContext(ctx aws.Context, input *DeleteVpcPeeringConnectionInput, opts ...request.Option) (*DeleteVpcPeeringConnectionOutput, error) { req, out := c.DeleteVpcPeeringConnectionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *EC2) CreateVpcPeeringConnectionWithContext(ctx aws.Context, input *CreateVpcPeeringConnectionInput, opts ...request.Option) (*CreateVpcPeeringConnectionOutput, error) { req, out := c.CreateVpcPeeringConnectionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.896662
aws/aws-sdk-go
service/ec2/api.go
aws/aws-sdk-go
service/ec2/api.go
Apache-2.0
go
DeleteVpcPeeringConnectionWithContext is the same as DeleteVpcPeeringConnection with the addition of the ability to pass a context and additional request options. See DeleteVpcPeeringConnection for details on how to use this API operation. The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (c *EC2) DeleteVpcPeeringConnectionWithContext(ctx aws.Context, input *DeleteVpcPeeringConnectionInput, opts ...request.Option) (*DeleteVpcPeeringConnectionOutput, error) { req, out := c.DeleteVpcPeeringConnectionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *EC2) AcceptVpcPeeringConnectionWithContext(ctx aws.Context, input *AcceptVpcPeeringConnectionInput, opts ...request.Option) (*AcceptVpcPeeringConnectionOutput, error) { req, out := c.AcceptVpcPeeringConnectionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.868309
aws/aws-sdk-go
service/ec2/api.go
aws/aws-sdk-go
service/ec2/api.go
Apache-2.0
go
DeleteVpcPeeringConnectionWithContext is the same as DeleteVpcPeeringConnection with the addition of the ability to pass a context and additional request options. See DeleteVpcPeeringConnection for details on how to use this API operation. The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (c *EC2) DeleteVpcPeeringConnectionWithContext(ctx aws.Context, input *DeleteVpcPeeringConnectionInput, opts ...request.Option) (*DeleteVpcPeeringConnectionOutput, error) { req, out := c.DeleteVpcPeeringConnectionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *EC2) DeleteVpcPeeringConnectionRequest(input *DeleteVpcPeeringConnectionInput) (req *request.Request, output *DeleteVpcPeeringConnectionOutput) { op := &request.Operation{ Name: opDeleteVpcPeeringConnection, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteVpcPeeringConnectionInput{} } output = &DeleteVpcPeeringConnectionOutput{} req = c.newRequest(op, input, output) return }
0.851323
aws/aws-sdk-go
service/ec2/api.go
aws/aws-sdk-go
service/ec2/api.go
Apache-2.0
go
DeleteVpcPeeringConnectionWithContext is the same as DeleteVpcPeeringConnection with the addition of the ability to pass a context and additional request options. See DeleteVpcPeeringConnection for details on how to use this API operation. The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (c *EC2) DeleteVpcPeeringConnectionWithContext(ctx aws.Context, input *DeleteVpcPeeringConnectionInput, opts ...request.Option) (*DeleteVpcPeeringConnectionOutput, error) { req, out := c.DeleteVpcPeeringConnectionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *GameLift) DeleteVpcPeeringConnectionRequest(input *DeleteVpcPeeringConnectionInput) (req *request.Request, output *DeleteVpcPeeringConnectionOutput) { op := &request.Operation{ Name: opDeleteVpcPeeringConnection, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteVpcPeeringConnectionInput{} } output = &DeleteVpcPeeringConnectionOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return }
0.848666
aws/aws-sdk-go
service/ec2/api.go
aws/aws-sdk-go
service/gamelift/api.go
Apache-2.0
go
DeleteVpcPeeringConnectionWithContext is the same as DeleteVpcPeeringConnection with the addition of the ability to pass a context and additional request options. See DeleteVpcPeeringConnection for details on how to use this API operation. The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (c *EC2) DeleteVpcPeeringConnectionWithContext(ctx aws.Context, input *DeleteVpcPeeringConnectionInput, opts ...request.Option) (*DeleteVpcPeeringConnectionOutput, error) { req, out := c.DeleteVpcPeeringConnectionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *EC2) ModifyVpcPeeringConnectionOptionsWithContext(ctx aws.Context, input *ModifyVpcPeeringConnectionOptionsInput, opts ...request.Option) (*ModifyVpcPeeringConnectionOptionsOutput, error) { req, out := c.ModifyVpcPeeringConnectionOptionsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.843734
aws/aws-sdk-go
service/ec2/api.go
aws/aws-sdk-go
service/ec2/api.go
Apache-2.0
go
DescribeTopicPermissionsRequest generates a "aws/request.Request" representing the client's request for the DescribeTopicPermissions operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See DescribeTopicPermissions for more information on using the DescribeTopicPermissions API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the DescribeTopicPermissionsRequest method. req, resp := client.DescribeTopicPermissionsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/quicksight-2018-04-01/DescribeTopicPermissions
func (c *QuickSight) DescribeTopicPermissionsRequest(input *DescribeTopicPermissionsInput) (req *request.Request, output *DescribeTopicPermissionsOutput) { op := &request.Operation{ Name: opDescribeTopicPermissions, HTTPMethod: "GET", HTTPPath: "/accounts/{AwsAccountId}/topics/{TopicId}/permissions", } if input == nil { input = &DescribeTopicPermissionsInput{} } output = &DescribeTopicPermissionsOutput{} req = c.newRequest(op, input, output) return }
func (c *QuickSight) UpdateTopicPermissionsRequest(input *UpdateTopicPermissionsInput) (req *request.Request, output *UpdateTopicPermissionsOutput) { op := &request.Operation{ Name: opUpdateTopicPermissions, HTTPMethod: "PUT", HTTPPath: "/accounts/{AwsAccountId}/topics/{TopicId}/permissions", } if input == nil { input = &UpdateTopicPermissionsInput{} } output = &UpdateTopicPermissionsOutput{} req = c.newRequest(op, input, output) return }
0.855663
aws/aws-sdk-go
service/quicksight/api.go
aws/aws-sdk-go
service/quicksight/api.go
Apache-2.0
go
DescribeTopicPermissionsRequest generates a "aws/request.Request" representing the client's request for the DescribeTopicPermissions operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See DescribeTopicPermissions for more information on using the DescribeTopicPermissions API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the DescribeTopicPermissionsRequest method. req, resp := client.DescribeTopicPermissionsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/quicksight-2018-04-01/DescribeTopicPermissions
func (c *QuickSight) DescribeTopicPermissionsRequest(input *DescribeTopicPermissionsInput) (req *request.Request, output *DescribeTopicPermissionsOutput) { op := &request.Operation{ Name: opDescribeTopicPermissions, HTTPMethod: "GET", HTTPPath: "/accounts/{AwsAccountId}/topics/{TopicId}/permissions", } if input == nil { input = &DescribeTopicPermissionsInput{} } output = &DescribeTopicPermissionsOutput{} req = c.newRequest(op, input, output) return }
func (c *QuickSight) DescribeTopicRequest(input *DescribeTopicInput) (req *request.Request, output *DescribeTopicOutput) { op := &request.Operation{ Name: opDescribeTopic, HTTPMethod: "GET", HTTPPath: "/accounts/{AwsAccountId}/topics/{TopicId}", } if input == nil { input = &DescribeTopicInput{} } output = &DescribeTopicOutput{} req = c.newRequest(op, input, output) return }
0.814522
aws/aws-sdk-go
service/quicksight/api.go
aws/aws-sdk-go
service/quicksight/api.go
Apache-2.0
go
DescribeTopicPermissionsRequest generates a "aws/request.Request" representing the client's request for the DescribeTopicPermissions operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See DescribeTopicPermissions for more information on using the DescribeTopicPermissions API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the DescribeTopicPermissionsRequest method. req, resp := client.DescribeTopicPermissionsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/quicksight-2018-04-01/DescribeTopicPermissions
func (c *QuickSight) DescribeTopicPermissionsRequest(input *DescribeTopicPermissionsInput) (req *request.Request, output *DescribeTopicPermissionsOutput) { op := &request.Operation{ Name: opDescribeTopicPermissions, HTTPMethod: "GET", HTTPPath: "/accounts/{AwsAccountId}/topics/{TopicId}/permissions", } if input == nil { input = &DescribeTopicPermissionsInput{} } output = &DescribeTopicPermissionsOutput{} req = c.newRequest(op, input, output) return }
func (c *QuickSight) DescribeTopicPermissionsWithContext(ctx aws.Context, input *DescribeTopicPermissionsInput, opts ...request.Option) (*DescribeTopicPermissionsOutput, error) { req, out := c.DescribeTopicPermissionsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.807073
aws/aws-sdk-go
service/quicksight/api.go
aws/aws-sdk-go
service/quicksight/api.go
Apache-2.0
go
DescribeTopicPermissionsRequest generates a "aws/request.Request" representing the client's request for the DescribeTopicPermissions operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See DescribeTopicPermissions for more information on using the DescribeTopicPermissions API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the DescribeTopicPermissionsRequest method. req, resp := client.DescribeTopicPermissionsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/quicksight-2018-04-01/DescribeTopicPermissions
func (c *QuickSight) DescribeTopicPermissionsRequest(input *DescribeTopicPermissionsInput) (req *request.Request, output *DescribeTopicPermissionsOutput) { op := &request.Operation{ Name: opDescribeTopicPermissions, HTTPMethod: "GET", HTTPPath: "/accounts/{AwsAccountId}/topics/{TopicId}/permissions", } if input == nil { input = &DescribeTopicPermissionsInput{} } output = &DescribeTopicPermissionsOutput{} req = c.newRequest(op, input, output) return }
func (c *OpsWorks) DescribePermissionsRequest(input *DescribePermissionsInput) (req *request.Request, output *DescribePermissionsOutput) { op := &request.Operation{ Name: opDescribePermissions, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribePermissionsInput{} } output = &DescribePermissionsOutput{} req = c.newRequest(op, input, output) return }
0.765279
aws/aws-sdk-go
service/quicksight/api.go
aws/aws-sdk-go
service/opsworks/api.go
Apache-2.0
go
DescribeTopicPermissionsRequest generates a "aws/request.Request" representing the client's request for the DescribeTopicPermissions operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See DescribeTopicPermissions for more information on using the DescribeTopicPermissions API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the DescribeTopicPermissionsRequest method. req, resp := client.DescribeTopicPermissionsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/quicksight-2018-04-01/DescribeTopicPermissions
func (c *QuickSight) DescribeTopicPermissionsRequest(input *DescribeTopicPermissionsInput) (req *request.Request, output *DescribeTopicPermissionsOutput) { op := &request.Operation{ Name: opDescribeTopicPermissions, HTTPMethod: "GET", HTTPPath: "/accounts/{AwsAccountId}/topics/{TopicId}/permissions", } if input == nil { input = &DescribeTopicPermissionsInput{} } output = &DescribeTopicPermissionsOutput{} req = c.newRequest(op, input, output) return }
func (c *QuickSight) DescribeTopicPermissions(input *DescribeTopicPermissionsInput) (*DescribeTopicPermissionsOutput, error) { req, out := c.DescribeTopicPermissionsRequest(input) return out, req.Send() }
0.748563
aws/aws-sdk-go
service/quicksight/api.go
aws/aws-sdk-go
service/quicksight/api.go
Apache-2.0
go
CreateMediaStreamPipeline API operation for Amazon Chime SDK Media Pipelines. Creates a streaming media pipeline. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for Amazon Chime SDK Media Pipelines's API operation CreateMediaStreamPipeline for usage and error information. Returned Error Types: - BadRequestException The input parameters don't match the service's restrictions. - ForbiddenException The client is permanently forbidden from making the request. - NotFoundException One or more of the resources in the request does not exist in the system. - UnauthorizedClientException The client is not currently authorized to make the request. - ThrottledClientException The client exceeded its request rate limit. - ResourceLimitExceededException The request exceeds the resource limit. - ServiceUnavailableException The service is currently unavailable. - ServiceFailureException The service encountered an unexpected error. See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-media-pipelines-2021-07-15/CreateMediaStreamPipeline
func (c *ChimeSDKMediaPipelines) CreateMediaStreamPipeline(input *CreateMediaStreamPipelineInput) (*CreateMediaStreamPipelineOutput, error) { req, out := c.CreateMediaStreamPipelineRequest(input) return out, req.Send() }
func (c *ChimeSDKMediaPipelines) CreateMediaCapturePipeline(input *CreateMediaCapturePipelineInput) (*CreateMediaCapturePipelineOutput, error) { req, out := c.CreateMediaCapturePipelineRequest(input) return out, req.Send() }
0.884343
aws/aws-sdk-go
service/chimesdkmediapipelines/api.go
aws/aws-sdk-go
service/chimesdkmediapipelines/api.go
Apache-2.0
go
CreateMediaStreamPipeline API operation for Amazon Chime SDK Media Pipelines. Creates a streaming media pipeline. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for Amazon Chime SDK Media Pipelines's API operation CreateMediaStreamPipeline for usage and error information. Returned Error Types: - BadRequestException The input parameters don't match the service's restrictions. - ForbiddenException The client is permanently forbidden from making the request. - NotFoundException One or more of the resources in the request does not exist in the system. - UnauthorizedClientException The client is not currently authorized to make the request. - ThrottledClientException The client exceeded its request rate limit. - ResourceLimitExceededException The request exceeds the resource limit. - ServiceUnavailableException The service is currently unavailable. - ServiceFailureException The service encountered an unexpected error. See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-media-pipelines-2021-07-15/CreateMediaStreamPipeline
func (c *ChimeSDKMediaPipelines) CreateMediaStreamPipeline(input *CreateMediaStreamPipelineInput) (*CreateMediaStreamPipelineOutput, error) { req, out := c.CreateMediaStreamPipelineRequest(input) return out, req.Send() }
func (c *Chime) CreateMediaCapturePipeline(input *CreateMediaCapturePipelineInput) (*CreateMediaCapturePipelineOutput, error) { req, out := c.CreateMediaCapturePipelineRequest(input) return out, req.Send() }
0.866545
aws/aws-sdk-go
service/chimesdkmediapipelines/api.go
aws/aws-sdk-go
service/chime/api.go
Apache-2.0
go
CreateMediaStreamPipeline API operation for Amazon Chime SDK Media Pipelines. Creates a streaming media pipeline. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for Amazon Chime SDK Media Pipelines's API operation CreateMediaStreamPipeline for usage and error information. Returned Error Types: - BadRequestException The input parameters don't match the service's restrictions. - ForbiddenException The client is permanently forbidden from making the request. - NotFoundException One or more of the resources in the request does not exist in the system. - UnauthorizedClientException The client is not currently authorized to make the request. - ThrottledClientException The client exceeded its request rate limit. - ResourceLimitExceededException The request exceeds the resource limit. - ServiceUnavailableException The service is currently unavailable. - ServiceFailureException The service encountered an unexpected error. See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-media-pipelines-2021-07-15/CreateMediaStreamPipeline
func (c *ChimeSDKMediaPipelines) CreateMediaStreamPipeline(input *CreateMediaStreamPipelineInput) (*CreateMediaStreamPipelineOutput, error) { req, out := c.CreateMediaStreamPipelineRequest(input) return out, req.Send() }
func (c *ChimeSDKMediaPipelines) CreateMediaLiveConnectorPipeline(input *CreateMediaLiveConnectorPipelineInput) (*CreateMediaLiveConnectorPipelineOutput, error) { req, out := c.CreateMediaLiveConnectorPipelineRequest(input) return out, req.Send() }
0.862826
aws/aws-sdk-go
service/chimesdkmediapipelines/api.go
aws/aws-sdk-go
service/chimesdkmediapipelines/api.go
Apache-2.0
go
CreateMediaStreamPipeline API operation for Amazon Chime SDK Media Pipelines. Creates a streaming media pipeline. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for Amazon Chime SDK Media Pipelines's API operation CreateMediaStreamPipeline for usage and error information. Returned Error Types: - BadRequestException The input parameters don't match the service's restrictions. - ForbiddenException The client is permanently forbidden from making the request. - NotFoundException One or more of the resources in the request does not exist in the system. - UnauthorizedClientException The client is not currently authorized to make the request. - ThrottledClientException The client exceeded its request rate limit. - ResourceLimitExceededException The request exceeds the resource limit. - ServiceUnavailableException The service is currently unavailable. - ServiceFailureException The service encountered an unexpected error. See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-media-pipelines-2021-07-15/CreateMediaStreamPipeline
func (c *ChimeSDKMediaPipelines) CreateMediaStreamPipeline(input *CreateMediaStreamPipelineInput) (*CreateMediaStreamPipelineOutput, error) { req, out := c.CreateMediaStreamPipelineRequest(input) return out, req.Send() }
func (c *ChimeSDKMediaPipelines) CreateMediaConcatenationPipeline(input *CreateMediaConcatenationPipelineInput) (*CreateMediaConcatenationPipelineOutput, error) { req, out := c.CreateMediaConcatenationPipelineRequest(input) return out, req.Send() }
0.842609
aws/aws-sdk-go
service/chimesdkmediapipelines/api.go
aws/aws-sdk-go
service/chimesdkmediapipelines/api.go
Apache-2.0
go
CreateMediaStreamPipeline API operation for Amazon Chime SDK Media Pipelines. Creates a streaming media pipeline. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for Amazon Chime SDK Media Pipelines's API operation CreateMediaStreamPipeline for usage and error information. Returned Error Types: - BadRequestException The input parameters don't match the service's restrictions. - ForbiddenException The client is permanently forbidden from making the request. - NotFoundException One or more of the resources in the request does not exist in the system. - UnauthorizedClientException The client is not currently authorized to make the request. - ThrottledClientException The client exceeded its request rate limit. - ResourceLimitExceededException The request exceeds the resource limit. - ServiceUnavailableException The service is currently unavailable. - ServiceFailureException The service encountered an unexpected error. See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-media-pipelines-2021-07-15/CreateMediaStreamPipeline
func (c *ChimeSDKMediaPipelines) CreateMediaStreamPipeline(input *CreateMediaStreamPipelineInput) (*CreateMediaStreamPipelineOutput, error) { req, out := c.CreateMediaStreamPipelineRequest(input) return out, req.Send() }
func (c *ChimeSDKMediaPipelines) CreateMediaInsightsPipeline(input *CreateMediaInsightsPipelineInput) (*CreateMediaInsightsPipelineOutput, error) { req, out := c.CreateMediaInsightsPipelineRequest(input) return out, req.Send() }
0.79269
aws/aws-sdk-go
service/chimesdkmediapipelines/api.go
aws/aws-sdk-go
service/chimesdkmediapipelines/api.go
Apache-2.0
go
CreateMedicalVocabulary API operation for Amazon Transcribe Service. Creates a new custom medical vocabulary. Before creating a new custom medical vocabulary, you must first upload a text file that contains your vocabulary table into an Amazon S3 bucket. Note that this differs from , where you can include a list of terms within your request using the Phrases flag; CreateMedicalVocabulary does not support the Phrases flag and only accepts vocabularies in table format. Each language has a character set that contains all allowed characters for that specific language. If you use unsupported characters, your custom vocabulary request fails. Refer to Character Sets for Custom Vocabularies (https://docs.aws.amazon.com/transcribe/latest/dg/charsets.html) to get the character set for your language. For more information, see Custom vocabularies (https://docs.aws.amazon.com/transcribe/latest/dg/custom-vocabulary.html). Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for Amazon Transcribe Service's API operation CreateMedicalVocabulary for usage and error information. Returned Error Types: - BadRequestException Your request didn't pass one or more validation tests. This can occur when the entity you're trying to delete doesn't exist or if it's in a non-terminal state (such as IN PROGRESS). See the exception message field for more information. - LimitExceededException You've either sent too many requests or your input file is too long. Wait before retrying your request, or use a smaller file and try your request again. - InternalFailureException There was an internal error. Check the error message, correct the issue, and try your request again. - ConflictException A resource already exists with this name. Resource names must be unique within an Amazon Web Services account. See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/CreateMedicalVocabulary
func (c *TranscribeService) CreateMedicalVocabulary(input *CreateMedicalVocabularyInput) (*CreateMedicalVocabularyOutput, error) { req, out := c.CreateMedicalVocabularyRequest(input) return out, req.Send() }
func (c *TranscribeService) CreateVocabulary(input *CreateVocabularyInput) (*CreateVocabularyOutput, error) { req, out := c.CreateVocabularyRequest(input) return out, req.Send() }
0.913018
aws/aws-sdk-go
service/transcribeservice/api.go
aws/aws-sdk-go
service/transcribeservice/api.go
Apache-2.0
go
CreateMedicalVocabulary API operation for Amazon Transcribe Service. Creates a new custom medical vocabulary. Before creating a new custom medical vocabulary, you must first upload a text file that contains your vocabulary table into an Amazon S3 bucket. Note that this differs from , where you can include a list of terms within your request using the Phrases flag; CreateMedicalVocabulary does not support the Phrases flag and only accepts vocabularies in table format. Each language has a character set that contains all allowed characters for that specific language. If you use unsupported characters, your custom vocabulary request fails. Refer to Character Sets for Custom Vocabularies (https://docs.aws.amazon.com/transcribe/latest/dg/charsets.html) to get the character set for your language. For more information, see Custom vocabularies (https://docs.aws.amazon.com/transcribe/latest/dg/custom-vocabulary.html). Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for Amazon Transcribe Service's API operation CreateMedicalVocabulary for usage and error information. Returned Error Types: - BadRequestException Your request didn't pass one or more validation tests. This can occur when the entity you're trying to delete doesn't exist or if it's in a non-terminal state (such as IN PROGRESS). See the exception message field for more information. - LimitExceededException You've either sent too many requests or your input file is too long. Wait before retrying your request, or use a smaller file and try your request again. - InternalFailureException There was an internal error. Check the error message, correct the issue, and try your request again. - ConflictException A resource already exists with this name. Resource names must be unique within an Amazon Web Services account. See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/CreateMedicalVocabulary
func (c *TranscribeService) CreateMedicalVocabulary(input *CreateMedicalVocabularyInput) (*CreateMedicalVocabularyOutput, error) { req, out := c.CreateMedicalVocabularyRequest(input) return out, req.Send() }
func (c *TranscribeService) GetMedicalVocabulary(input *GetMedicalVocabularyInput) (*GetMedicalVocabularyOutput, error) { req, out := c.GetMedicalVocabularyRequest(input) return out, req.Send() }
0.879018
aws/aws-sdk-go
service/transcribeservice/api.go
aws/aws-sdk-go
service/transcribeservice/api.go
Apache-2.0
go
CreateMedicalVocabulary API operation for Amazon Transcribe Service. Creates a new custom medical vocabulary. Before creating a new custom medical vocabulary, you must first upload a text file that contains your vocabulary table into an Amazon S3 bucket. Note that this differs from , where you can include a list of terms within your request using the Phrases flag; CreateMedicalVocabulary does not support the Phrases flag and only accepts vocabularies in table format. Each language has a character set that contains all allowed characters for that specific language. If you use unsupported characters, your custom vocabulary request fails. Refer to Character Sets for Custom Vocabularies (https://docs.aws.amazon.com/transcribe/latest/dg/charsets.html) to get the character set for your language. For more information, see Custom vocabularies (https://docs.aws.amazon.com/transcribe/latest/dg/custom-vocabulary.html). Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for Amazon Transcribe Service's API operation CreateMedicalVocabulary for usage and error information. Returned Error Types: - BadRequestException Your request didn't pass one or more validation tests. This can occur when the entity you're trying to delete doesn't exist or if it's in a non-terminal state (such as IN PROGRESS). See the exception message field for more information. - LimitExceededException You've either sent too many requests or your input file is too long. Wait before retrying your request, or use a smaller file and try your request again. - InternalFailureException There was an internal error. Check the error message, correct the issue, and try your request again. - ConflictException A resource already exists with this name. Resource names must be unique within an Amazon Web Services account. See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/CreateMedicalVocabulary
func (c *TranscribeService) CreateMedicalVocabulary(input *CreateMedicalVocabularyInput) (*CreateMedicalVocabularyOutput, error) { req, out := c.CreateMedicalVocabularyRequest(input) return out, req.Send() }
func (c *Connect) CreateVocabulary(input *CreateVocabularyInput) (*CreateVocabularyOutput, error) { req, out := c.CreateVocabularyRequest(input) return out, req.Send() }
0.857793
aws/aws-sdk-go
service/transcribeservice/api.go
aws/aws-sdk-go
service/connect/api.go
Apache-2.0
go
CreateMedicalVocabulary API operation for Amazon Transcribe Service. Creates a new custom medical vocabulary. Before creating a new custom medical vocabulary, you must first upload a text file that contains your vocabulary table into an Amazon S3 bucket. Note that this differs from , where you can include a list of terms within your request using the Phrases flag; CreateMedicalVocabulary does not support the Phrases flag and only accepts vocabularies in table format. Each language has a character set that contains all allowed characters for that specific language. If you use unsupported characters, your custom vocabulary request fails. Refer to Character Sets for Custom Vocabularies (https://docs.aws.amazon.com/transcribe/latest/dg/charsets.html) to get the character set for your language. For more information, see Custom vocabularies (https://docs.aws.amazon.com/transcribe/latest/dg/custom-vocabulary.html). Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for Amazon Transcribe Service's API operation CreateMedicalVocabulary for usage and error information. Returned Error Types: - BadRequestException Your request didn't pass one or more validation tests. This can occur when the entity you're trying to delete doesn't exist or if it's in a non-terminal state (such as IN PROGRESS). See the exception message field for more information. - LimitExceededException You've either sent too many requests or your input file is too long. Wait before retrying your request, or use a smaller file and try your request again. - InternalFailureException There was an internal error. Check the error message, correct the issue, and try your request again. - ConflictException A resource already exists with this name. Resource names must be unique within an Amazon Web Services account. See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/CreateMedicalVocabulary
func (c *TranscribeService) CreateMedicalVocabulary(input *CreateMedicalVocabularyInput) (*CreateMedicalVocabularyOutput, error) { req, out := c.CreateMedicalVocabularyRequest(input) return out, req.Send() }
func (c *TranscribeService) DeleteMedicalVocabulary(input *DeleteMedicalVocabularyInput) (*DeleteMedicalVocabularyOutput, error) { req, out := c.DeleteMedicalVocabularyRequest(input) return out, req.Send() }
0.856027
aws/aws-sdk-go
service/transcribeservice/api.go
aws/aws-sdk-go
service/transcribeservice/api.go
Apache-2.0
go
CreateMedicalVocabulary API operation for Amazon Transcribe Service. Creates a new custom medical vocabulary. Before creating a new custom medical vocabulary, you must first upload a text file that contains your vocabulary table into an Amazon S3 bucket. Note that this differs from , where you can include a list of terms within your request using the Phrases flag; CreateMedicalVocabulary does not support the Phrases flag and only accepts vocabularies in table format. Each language has a character set that contains all allowed characters for that specific language. If you use unsupported characters, your custom vocabulary request fails. Refer to Character Sets for Custom Vocabularies (https://docs.aws.amazon.com/transcribe/latest/dg/charsets.html) to get the character set for your language. For more information, see Custom vocabularies (https://docs.aws.amazon.com/transcribe/latest/dg/custom-vocabulary.html). Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for Amazon Transcribe Service's API operation CreateMedicalVocabulary for usage and error information. Returned Error Types: - BadRequestException Your request didn't pass one or more validation tests. This can occur when the entity you're trying to delete doesn't exist or if it's in a non-terminal state (such as IN PROGRESS). See the exception message field for more information. - LimitExceededException You've either sent too many requests or your input file is too long. Wait before retrying your request, or use a smaller file and try your request again. - InternalFailureException There was an internal error. Check the error message, correct the issue, and try your request again. - ConflictException A resource already exists with this name. Resource names must be unique within an Amazon Web Services account. See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/CreateMedicalVocabulary
func (c *TranscribeService) CreateMedicalVocabulary(input *CreateMedicalVocabularyInput) (*CreateMedicalVocabularyOutput, error) { req, out := c.CreateMedicalVocabularyRequest(input) return out, req.Send() }
func (c *TranscribeService) UpdateMedicalVocabulary(input *UpdateMedicalVocabularyInput) (*UpdateMedicalVocabularyOutput, error) { req, out := c.UpdateMedicalVocabularyRequest(input) return out, req.Send() }
0.814555
aws/aws-sdk-go
service/transcribeservice/api.go
aws/aws-sdk-go
service/transcribeservice/api.go
Apache-2.0
go
ListIngestionDestinations API operation for AppFabric. Returns a list of all ingestion destinations configured for an ingestion. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for AppFabric's API operation ListIngestionDestinations for usage and error information. Returned Error Types: - InternalServerException The request processing has failed because of an unknown error, exception, or failure with an internal server. - ThrottlingException The request rate exceeds the limit. - ValidationException The request has invalid or missing parameters. - ResourceNotFoundException The specified resource does not exist. - AccessDeniedException You are not authorized to perform this operation. See also, https://docs.aws.amazon.com/goto/WebAPI/appfabric-2023-05-19/ListIngestionDestinations
func (c *AppFabric) ListIngestionDestinations(input *ListIngestionDestinationsInput) (*ListIngestionDestinationsOutput, error) { req, out := c.ListIngestionDestinationsRequest(input) return out, req.Send() }
func (c *AppFabric) GetIngestionDestination(input *GetIngestionDestinationInput) (*GetIngestionDestinationOutput, error) { req, out := c.GetIngestionDestinationRequest(input) return out, req.Send() }
0.793304
aws/aws-sdk-go
service/appfabric/api.go
aws/aws-sdk-go
service/appfabric/api.go
Apache-2.0
go
ListIngestionDestinations API operation for AppFabric. Returns a list of all ingestion destinations configured for an ingestion. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for AppFabric's API operation ListIngestionDestinations for usage and error information. Returned Error Types: - InternalServerException The request processing has failed because of an unknown error, exception, or failure with an internal server. - ThrottlingException The request rate exceeds the limit. - ValidationException The request has invalid or missing parameters. - ResourceNotFoundException The specified resource does not exist. - AccessDeniedException You are not authorized to perform this operation. See also, https://docs.aws.amazon.com/goto/WebAPI/appfabric-2023-05-19/ListIngestionDestinations
func (c *AppFabric) ListIngestionDestinations(input *ListIngestionDestinationsInput) (*ListIngestionDestinationsOutput, error) { req, out := c.ListIngestionDestinationsRequest(input) return out, req.Send() }
func (c *AppFabric) ListIngestionDestinationsRequest(input *ListIngestionDestinationsInput) (req *request.Request, output *ListIngestionDestinationsOutput) { op := &request.Operation{ Name: opListIngestionDestinations, HTTPMethod: "GET", HTTPPath: "/appbundles/{appBundleIdentifier}/ingestions/{ingestionIdentifier}/ingestiondestinations", Paginator: &request.Paginator{ InputTokens: []string{"nextToken"}, OutputTokens: []string{"nextToken"}, LimitToken: "maxResults", TruncationToken: "", }, } if input == nil { input = &ListIngestionDestinationsInput{} } output = &ListIngestionDestinationsOutput{} req = c.newRequest(op, input, output) return }
0.770972
aws/aws-sdk-go
service/appfabric/api.go
aws/aws-sdk-go
service/appfabric/api.go
Apache-2.0
go
ListIngestionDestinations API operation for AppFabric. Returns a list of all ingestion destinations configured for an ingestion. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for AppFabric's API operation ListIngestionDestinations for usage and error information. Returned Error Types: - InternalServerException The request processing has failed because of an unknown error, exception, or failure with an internal server. - ThrottlingException The request rate exceeds the limit. - ValidationException The request has invalid or missing parameters. - ResourceNotFoundException The specified resource does not exist. - AccessDeniedException You are not authorized to perform this operation. See also, https://docs.aws.amazon.com/goto/WebAPI/appfabric-2023-05-19/ListIngestionDestinations
func (c *AppFabric) ListIngestionDestinations(input *ListIngestionDestinationsInput) (*ListIngestionDestinationsOutput, error) { req, out := c.ListIngestionDestinationsRequest(input) return out, req.Send() }
func (c *IoTWireless) ListDestinations(input *ListDestinationsInput) (*ListDestinationsOutput, error) { req, out := c.ListDestinationsRequest(input) return out, req.Send() }
0.748777
aws/aws-sdk-go
service/appfabric/api.go
aws/aws-sdk-go
service/iotwireless/api.go
Apache-2.0
go
ListIngestionDestinations API operation for AppFabric. Returns a list of all ingestion destinations configured for an ingestion. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for AppFabric's API operation ListIngestionDestinations for usage and error information. Returned Error Types: - InternalServerException The request processing has failed because of an unknown error, exception, or failure with an internal server. - ThrottlingException The request rate exceeds the limit. - ValidationException The request has invalid or missing parameters. - ResourceNotFoundException The specified resource does not exist. - AccessDeniedException You are not authorized to perform this operation. See also, https://docs.aws.amazon.com/goto/WebAPI/appfabric-2023-05-19/ListIngestionDestinations
func (c *AppFabric) ListIngestionDestinations(input *ListIngestionDestinationsInput) (*ListIngestionDestinationsOutput, error) { req, out := c.ListIngestionDestinationsRequest(input) return out, req.Send() }
func (c *AppFabric) ListIngestionDestinationsPages(input *ListIngestionDestinationsInput, fn func(*ListIngestionDestinationsOutput, bool) bool) error { return c.ListIngestionDestinationsPagesWithContext(aws.BackgroundContext(), input, fn) }
0.729246
aws/aws-sdk-go
service/appfabric/api.go
aws/aws-sdk-go
service/appfabric/api.go
Apache-2.0
go
ListIngestionDestinations API operation for AppFabric. Returns a list of all ingestion destinations configured for an ingestion. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for AppFabric's API operation ListIngestionDestinations for usage and error information. Returned Error Types: - InternalServerException The request processing has failed because of an unknown error, exception, or failure with an internal server. - ThrottlingException The request rate exceeds the limit. - ValidationException The request has invalid or missing parameters. - ResourceNotFoundException The specified resource does not exist. - AccessDeniedException You are not authorized to perform this operation. See also, https://docs.aws.amazon.com/goto/WebAPI/appfabric-2023-05-19/ListIngestionDestinations
func (c *AppFabric) ListIngestionDestinations(input *ListIngestionDestinationsInput) (*ListIngestionDestinationsOutput, error) { req, out := c.ListIngestionDestinationsRequest(input) return out, req.Send() }
func (c *AppFabric) GetIngestion(input *GetIngestionInput) (*GetIngestionOutput, error) { req, out := c.GetIngestionRequest(input) return out, req.Send() }
0.72788
aws/aws-sdk-go
service/appfabric/api.go
aws/aws-sdk-go
service/appfabric/api.go
Apache-2.0
go
AssertionResponseTypesCode converts the given string to a cpb.AssertionResponseTypesCode_Value. If the string doesn't match exactly one of the supported values, AssertionResponseTypesCode returns INVALID_UNINITIALIZED.
func (c *Convertor) AssertionResponseTypesCode(s string) cpb.AssertionResponseTypesCode_Value { if c.AssertionResponseTypesCodeMap != nil { return c.AssertionResponseTypesCodeMap[strings.ToUpper(s)] } return DefaultAssertionResponseTypesCodeMap[strings.ToUpper(s)] }
func (c *Convertor) AssertionOperatorTypeCode(s string) cpb.AssertionOperatorTypeCode_Value { if c.AssertionOperatorTypeCodeMap != nil { return c.AssertionOperatorTypeCodeMap[strings.ToUpper(s)] } return DefaultAssertionOperatorTypeCodeMap[strings.ToUpper(s)] }
0.791313
google/simhospital
pkg/hl7tofhirmap/r4_codes_convertor.go
google/simhospital
pkg/hl7tofhirmap/r4_codes_convertor.go
Apache-2.0
go
AssertionResponseTypesCode converts the given string to a cpb.AssertionResponseTypesCode_Value. If the string doesn't match exactly one of the supported values, AssertionResponseTypesCode returns INVALID_UNINITIALIZED.
func (c *Convertor) AssertionResponseTypesCode(s string) cpb.AssertionResponseTypesCode_Value { if c.AssertionResponseTypesCodeMap != nil { return c.AssertionResponseTypesCodeMap[strings.ToUpper(s)] } return DefaultAssertionResponseTypesCodeMap[strings.ToUpper(s)] }
func (c *Convertor) ResponseTypeCode(s string) cpb.ResponseTypeCode_Value { if c.ResponseTypeCodeMap != nil { return c.ResponseTypeCodeMap[strings.ToUpper(s)] } return DefaultResponseTypeCodeMap[strings.ToUpper(s)] }
0.783689
google/simhospital
pkg/hl7tofhirmap/r4_codes_convertor.go
google/simhospital
pkg/hl7tofhirmap/r4_codes_convertor.go
Apache-2.0
go
AssertionResponseTypesCode converts the given string to a cpb.AssertionResponseTypesCode_Value. If the string doesn't match exactly one of the supported values, AssertionResponseTypesCode returns INVALID_UNINITIALIZED.
func (c *Convertor) AssertionResponseTypesCode(s string) cpb.AssertionResponseTypesCode_Value { if c.AssertionResponseTypesCodeMap != nil { return c.AssertionResponseTypesCodeMap[strings.ToUpper(s)] } return DefaultAssertionResponseTypesCodeMap[strings.ToUpper(s)] }
func (c *Convertor) AssertionDirectionTypeCode(s string) cpb.AssertionDirectionTypeCode_Value { if c.AssertionDirectionTypeCodeMap != nil { return c.AssertionDirectionTypeCodeMap[strings.ToUpper(s)] } return DefaultAssertionDirectionTypeCodeMap[strings.ToUpper(s)] }
0.782896
google/simhospital
pkg/hl7tofhirmap/r4_codes_convertor.go
google/simhospital
pkg/hl7tofhirmap/r4_codes_convertor.go
Apache-2.0
go
AssertionResponseTypesCode converts the given string to a cpb.AssertionResponseTypesCode_Value. If the string doesn't match exactly one of the supported values, AssertionResponseTypesCode returns INVALID_UNINITIALIZED.
func (c *Convertor) AssertionResponseTypesCode(s string) cpb.AssertionResponseTypesCode_Value { if c.AssertionResponseTypesCodeMap != nil { return c.AssertionResponseTypesCodeMap[strings.ToUpper(s)] } return DefaultAssertionResponseTypesCodeMap[strings.ToUpper(s)] }
func (c *Convertor) EligibilityResponsePurposeCode(s string) cpb.EligibilityResponsePurposeCode_Value { if c.EligibilityResponsePurposeCodeMap != nil { return c.EligibilityResponsePurposeCodeMap[strings.ToUpper(s)] } return DefaultEligibilityResponsePurposeCodeMap[strings.ToUpper(s)] }
0.707056
google/simhospital
pkg/hl7tofhirmap/r4_codes_convertor.go
google/simhospital
pkg/hl7tofhirmap/r4_codes_convertor.go
Apache-2.0
go
AssertionResponseTypesCode converts the given string to a cpb.AssertionResponseTypesCode_Value. If the string doesn't match exactly one of the supported values, AssertionResponseTypesCode returns INVALID_UNINITIALIZED.
func (c *Convertor) AssertionResponseTypesCode(s string) cpb.AssertionResponseTypesCode_Value { if c.AssertionResponseTypesCodeMap != nil { return c.AssertionResponseTypesCodeMap[strings.ToUpper(s)] } return DefaultAssertionResponseTypesCodeMap[strings.ToUpper(s)] }
func (c *Convertor) MessageheaderResponseRequestCode(s string) cpb.MessageheaderResponseRequestCode_Value { if c.MessageheaderResponseRequestCodeMap != nil { return c.MessageheaderResponseRequestCodeMap[strings.ToUpper(s)] } return DefaultMessageheaderResponseRequestCodeMap[strings.ToUpper(s)] }
0.701167
google/simhospital
pkg/hl7tofhirmap/r4_codes_convertor.go
google/simhospital
pkg/hl7tofhirmap/r4_codes_convertor.go
Apache-2.0
go
ListRules API operation for Amazon Recycle Bin. Lists the Recycle Bin retention rules in the Region. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for Amazon Recycle Bin's API operation ListRules for usage and error information. Returned Error Types: - ValidationException One or more of the parameters in the request is not valid. - InternalServerException The service could not respond to the request due to an internal problem. See also, https://docs.aws.amazon.com/goto/WebAPI/rbin-2021-06-15/ListRules
func (c *RecycleBin) ListRules(input *ListRulesInput) (*ListRulesOutput, error) { req, out := c.ListRulesRequest(input) return out, req.Send() }
func (c *Connect) ListRules(input *ListRulesInput) (*ListRulesOutput, error) { req, out := c.ListRulesRequest(input) return out, req.Send() }
0.816818
aws/aws-sdk-go
service/recyclebin/api.go
aws/aws-sdk-go
service/connect/api.go
Apache-2.0
go
ListRules API operation for Amazon Recycle Bin. Lists the Recycle Bin retention rules in the Region. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for Amazon Recycle Bin's API operation ListRules for usage and error information. Returned Error Types: - ValidationException One or more of the parameters in the request is not valid. - InternalServerException The service could not respond to the request due to an internal problem. See also, https://docs.aws.amazon.com/goto/WebAPI/rbin-2021-06-15/ListRules
func (c *RecycleBin) ListRules(input *ListRulesInput) (*ListRulesOutput, error) { req, out := c.ListRulesRequest(input) return out, req.Send() }
func (c *WAF) ListRules(input *ListRulesInput) (*ListRulesOutput, error) { req, out := c.ListRulesRequest(input) return out, req.Send() }
0.814643
aws/aws-sdk-go
service/recyclebin/api.go
aws/aws-sdk-go
service/waf/api.go
Apache-2.0
go
ListRules API operation for Amazon Recycle Bin. Lists the Recycle Bin retention rules in the Region. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for Amazon Recycle Bin's API operation ListRules for usage and error information. Returned Error Types: - ValidationException One or more of the parameters in the request is not valid. - InternalServerException The service could not respond to the request due to an internal problem. See also, https://docs.aws.amazon.com/goto/WebAPI/rbin-2021-06-15/ListRules
func (c *RecycleBin) ListRules(input *ListRulesInput) (*ListRulesOutput, error) { req, out := c.ListRulesRequest(input) return out, req.Send() }
func (c *WAFRegional) ListRules(input *waf.ListRulesInput) (*waf.ListRulesOutput, error) { req, out := c.ListRulesRequest(input) return out, req.Send() }
0.792029
aws/aws-sdk-go
service/recyclebin/api.go
aws/aws-sdk-go
service/wafregional/api.go
Apache-2.0
go
ListRules API operation for Amazon Recycle Bin. Lists the Recycle Bin retention rules in the Region. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for Amazon Recycle Bin's API operation ListRules for usage and error information. Returned Error Types: - ValidationException One or more of the parameters in the request is not valid. - InternalServerException The service could not respond to the request due to an internal problem. See also, https://docs.aws.amazon.com/goto/WebAPI/rbin-2021-06-15/ListRules
func (c *RecycleBin) ListRules(input *ListRulesInput) (*ListRulesOutput, error) { req, out := c.ListRulesRequest(input) return out, req.Send() }
func (c *CloudWatchEvents) ListRules(input *ListRulesInput) (*ListRulesOutput, error) { req, out := c.ListRulesRequest(input) return out, req.Send() }
0.779525
aws/aws-sdk-go
service/recyclebin/api.go
aws/aws-sdk-go
service/cloudwatchevents/api.go
Apache-2.0
go
ListRules API operation for Amazon Recycle Bin. Lists the Recycle Bin retention rules in the Region. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for Amazon Recycle Bin's API operation ListRules for usage and error information. Returned Error Types: - ValidationException One or more of the parameters in the request is not valid. - InternalServerException The service could not respond to the request due to an internal problem. See also, https://docs.aws.amazon.com/goto/WebAPI/rbin-2021-06-15/ListRules
func (c *RecycleBin) ListRules(input *ListRulesInput) (*ListRulesOutput, error) { req, out := c.ListRulesRequest(input) return out, req.Send() }
func (c *Route53RecoveryReadiness) ListRules(input *ListRulesInput) (*ListRulesOutput, error) { req, out := c.ListRulesRequest(input) return out, req.Send() }
0.779083
aws/aws-sdk-go
service/recyclebin/api.go
aws/aws-sdk-go
service/route53recoveryreadiness/api.go
Apache-2.0
go
NewStream begins a streaming RPC on the addrConn. If the addrConn is not ready, blocks until it is or ctx expires. Returns an error when the context expires or the addrConn is shut down.
func (acbw *acBalancerWrapper) NewStream(ctx context.Context, desc *StreamDesc, method string, opts ...CallOption) (ClientStream, error) { transport, err := acbw.ac.getTransport(ctx) if err != nil { return nil, err } return newNonRetryClientStream(ctx, desc, method, transport, acbw.ac, opts...) }
func (cc *ClientConn) NewStream(ctx context.Context, desc *StreamDesc, method string, opts ...CallOption) (ClientStream, error) { // allow interceptor to see all applicable call options, which means those // configured as defaults from dial option as well as per-call options opts = combine(cc.dopts.callOptions, opts) if cc.dopts.streamInt != nil { return cc.dopts.streamInt(ctx, desc, cc, method, newClientStream, opts...) } return newClientStream(ctx, desc, cc, method, opts...) }
0.761185
k8snetworkplumbingwg/multus-cni
vendor/google.golang.org/grpc/balancer_conn_wrappers.go
k8snetworkplumbingwg/multus-cni
vendor/google.golang.org/grpc/stream.go
Apache-2.0
go
NewStream begins a streaming RPC on the addrConn. If the addrConn is not ready, blocks until it is or ctx expires. Returns an error when the context expires or the addrConn is shut down.
func (acbw *acBalancerWrapper) NewStream(ctx context.Context, desc *StreamDesc, method string, opts ...CallOption) (ClientStream, error) { transport, err := acbw.ac.getTransport(ctx) if err != nil { return nil, err } return newNonRetryClientStream(ctx, desc, method, transport, acbw.ac, opts...) }
func newNonRetryClientStream(ctx context.Context, desc *StreamDesc, method string, t transport.ClientTransport, ac *addrConn, opts ...CallOption) (_ ClientStream, err error) { if t == nil { // TODO: return RPC error here? return nil, errors.New("transport provided is nil") } // defaultCallInfo contains unnecessary info(i.e. failfast, maxRetryRPCBufferSize), so we just initialize an empty struct. c := &callInfo{} // Possible context leak: // The cancel function for the child context we create will only be called // when RecvMsg returns a non-nil error, if the ClientConn is closed, or if // an error is generated by SendMsg. // https://github.com/grpc/grpc-go/issues/1818. ctx, cancel := context.WithCancel(ctx) defer func() { if err != nil { cancel() } }() for _, o := range opts { if err := o.before(c); err != nil { return nil, toRPCErr(err) } } c.maxReceiveMessageSize = getMaxSize(nil, c.maxReceiveMessageSize, defaultClientMaxReceiveMessageSize) c.maxSendMessageSize = getMaxSize(nil, c.maxSendMessageSize, defaultServerMaxSendMessageSize) if err := setCallInfoCodec(c); err != nil { return nil, err } callHdr := &transport.CallHdr{ Host: ac.cc.authority, Method: method, ContentSubtype: c.contentSubtype, } // Set our outgoing compression according to the UseCompressor CallOption, if // set. In that case, also find the compressor from the encoding package. // Otherwise, use the compressor configured by the WithCompressor DialOption, // if set. var cp Compressor var comp encoding.Compressor if ct := c.compressorType; ct != "" { callHdr.SendCompress = ct if ct != encoding.Identity { comp = encoding.GetCompressor(ct) if comp == nil { return nil, status.Errorf(codes.Internal, "grpc: Compressor is not installed for requested grpc-encoding %q", ct) } } } else if ac.cc.dopts.cp != nil { callHdr.SendCompress = ac.cc.dopts.cp.Type() cp = ac.cc.dopts.cp } if c.creds != nil { callHdr.Creds = c.creds } // Use a special addrConnStream to avoid retry. as := &addrConnStream{ callHdr: callHdr, ac: ac, ctx: ctx, cancel: cancel, opts: opts, callInfo: c, desc: desc, codec: c.codec, cp: cp, comp: comp, t: t, } s, err := as.t.NewStream(as.ctx, as.callHdr) if err != nil { err = toRPCErr(err) return nil, err } as.s = s as.p = &parser{r: s, recvBufferPool: ac.dopts.recvBufferPool} ac.incrCallsStarted() if desc != unaryStreamDesc { // Listen on stream context to cleanup when the stream context is // canceled. Also listen for the addrConn's context in case the // addrConn is closed or reconnects to a different address. In all // other cases, an error should already be injected into the recv // buffer by the transport, which the client will eventually receive, // and then we will cancel the stream's context in // addrConnStream.finish. go func() { ac.mu.Lock() acCtx := ac.ctx ac.mu.Unlock() select { case <-acCtx.Done(): as.finish(status.Error(codes.Canceled, "grpc: the SubConn is closing")) case <-ctx.Done(): as.finish(toRPCErr(ctx.Err())) } }() } return as, nil }
0.676702
k8snetworkplumbingwg/multus-cni
vendor/google.golang.org/grpc/balancer_conn_wrappers.go
k8snetworkplumbingwg/multus-cni
vendor/google.golang.org/grpc/stream.go
Apache-2.0
go
NewStream begins a streaming RPC on the addrConn. If the addrConn is not ready, blocks until it is or ctx expires. Returns an error when the context expires or the addrConn is shut down.
func (acbw *acBalancerWrapper) NewStream(ctx context.Context, desc *StreamDesc, method string, opts ...CallOption) (ClientStream, error) { transport, err := acbw.ac.getTransport(ctx) if err != nil { return nil, err } return newNonRetryClientStream(ctx, desc, method, transport, acbw.ac, opts...) }
func (s *gRPCBrokerServer) StartStream(stream plugin.GRPCBroker_StartStreamServer) error { doneCh := stream.Context().Done() defer s.Close() // Proccess send stream go func() { for { select { case <-doneCh: return case <-s.quit: return case se := <-s.send: err := stream.Send(se.i) se.ch <- err } } }() // Process receive stream for { i, err := stream.Recv() if err != nil { return err } select { case <-doneCh: return nil case <-s.quit: return nil case s.recv <- i: } } return nil }
0.675926
k8snetworkplumbingwg/multus-cni
vendor/google.golang.org/grpc/balancer_conn_wrappers.go
42wim/matterbridge
vendor/github.com/hashicorp/go-plugin/grpc_broker.go
Apache-2.0
go
NewStream begins a streaming RPC on the addrConn. If the addrConn is not ready, blocks until it is or ctx expires. Returns an error when the context expires or the addrConn is shut down.
func (acbw *acBalancerWrapper) NewStream(ctx context.Context, desc *StreamDesc, method string, opts ...CallOption) (ClientStream, error) { transport, err := acbw.ac.getTransport(ctx) if err != nil { return nil, err } return newNonRetryClientStream(ctx, desc, method, transport, acbw.ac, opts...) }
func (s *gRPCBrokerClientImpl) StartStream() error { ctx, cancelFunc := context.WithCancel(context.Background()) defer cancelFunc() defer s.Close() stream, err := s.client.StartStream(ctx) if err != nil { return err } doneCh := stream.Context().Done() go func() { for { select { case <-doneCh: return case <-s.quit: return case se := <-s.send: err := stream.Send(se.i) se.ch <- err } } }() for { i, err := stream.Recv() if err != nil { return err } select { case <-doneCh: return nil case <-s.quit: return nil case s.recv <- i: } } return nil }
0.6535
k8snetworkplumbingwg/multus-cni
vendor/google.golang.org/grpc/balancer_conn_wrappers.go
42wim/matterbridge
vendor/github.com/hashicorp/go-plugin/grpc_broker.go
Apache-2.0
go
NewStream begins a streaming RPC on the addrConn. If the addrConn is not ready, blocks until it is or ctx expires. Returns an error when the context expires or the addrConn is shut down.
func (acbw *acBalancerWrapper) NewStream(ctx context.Context, desc *StreamDesc, method string, opts ...CallOption) (ClientStream, error) { transport, err := acbw.ac.getTransport(ctx) if err != nil { return nil, err } return newNonRetryClientStream(ctx, desc, method, transport, acbw.ac, opts...) }
func NewStreamImpl(opts StreamOpts) *StreamImpl { lrs := &StreamImpl{ transport: opts.Transport, backoff: opts.Backoff, nodeProto: opts.NodeProto, lrsStore: load.NewStore(), } l := grpclog.Component("xds") lrs.logger = igrpclog.NewPrefixLogger(l, opts.LogPrefix+fmt.Sprintf("[lrs-stream %p] ", lrs)) return lrs }
0.648936
k8snetworkplumbingwg/multus-cni
vendor/google.golang.org/grpc/balancer_conn_wrappers.go
tektoncd/cli
vendor/google.golang.org/grpc/xds/internal/xdsclient/transport/lrs/lrs_stream.go
Apache-2.0
go
If the SSLKEYLOGFILE environment variable is set, then open it for appending and write TLS master secrets there in the "NSS Key Log Format". Use this for debugging TLS and HTTP problems with Wireshark.
func SetKeyLogFile(tconf *tls.Config) { if klf := os.Getenv("SSLKEYLOGFILE"); klf != "" { fmt.Fprintln(os.Stderr, "WARNING: SSLKEYLOGFILE is set! TLS master secrets will be logged.") f, err := os.OpenFile(klf, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0600) if err != nil { panic(err) } tconf.KeyLogWriter = f } }
func (cn *conn) setupSSLClientCertificates(tlsConf *tls.Config, o values) { var missingOk bool sslkey := o.Get("sslkey") sslcert := o.Get("sslcert") if sslkey != "" && sslcert != "" { // If the user has set an sslkey and sslcert, they *must* exist. missingOk = false } else { // Automatically load certificates from ~/.postgresql. user, err := user.Current() if err != nil { // user.Current() might fail when cross-compiling. We have to // ignore the error and continue without client certificates, since // we wouldn't know where to load them from. return } sslkey = filepath.Join(user.HomeDir, ".postgresql", "postgresql.key") sslcert = filepath.Join(user.HomeDir, ".postgresql", "postgresql.crt") missingOk = true } // Check that both files exist, and report the error or stop, depending on // which behaviour we want. Note that we don't do any more extensive // checks than this (such as checking that the paths aren't directories); // LoadX509KeyPair() will take care of the rest. keyfinfo, err := os.Stat(sslkey) if err != nil && missingOk { return } else if err != nil { panic(err) } _, err = os.Stat(sslcert) if err != nil && missingOk { return } else if err != nil { panic(err) } // If we got this far, the key file must also have the correct permissions kmode := keyfinfo.Mode() if kmode != kmode&0600 { panic(ErrSSLKeyHasWorldPermissions) } cert, err := tls.LoadX509KeyPair(sslcert, sslkey) if err != nil { panic(err) } tlsConf.Certificates = []tls.Certificate{cert} }
0.634813
tektoncd/cli
vendor/github.com/sassoftware/relic/lib/x509tools/keylogfile.go
goby-lang/goby
vendor/github.com/lib/pq/conn.go
MIT
go
If the SSLKEYLOGFILE environment variable is set, then open it for appending and write TLS master secrets there in the "NSS Key Log Format". Use this for debugging TLS and HTTP problems with Wireshark.
func SetKeyLogFile(tconf *tls.Config) { if klf := os.Getenv("SSLKEYLOGFILE"); klf != "" { fmt.Fprintln(os.Stderr, "WARNING: SSLKEYLOGFILE is set! TLS master secrets will be logged.") f, err := os.OpenFile(klf, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0600) if err != nil { panic(err) } tconf.KeyLogWriter = f } }
func sslClientCertificates(tlsConf *tls.Config, o values) { // user.Current() might fail when cross-compiling. We have to ignore the // error and continue without home directory defaults, since we wouldn't // know from where to load them. user, _ := user.Current() // In libpq, the client certificate is only loaded if the setting is not blank. // // https://github.com/postgres/postgres/blob/REL9_6_2/src/interfaces/libpq/fe-secure-openssl.c#L1036-L1037 sslcert := o["sslcert"] if len(sslcert) == 0 && user != nil { sslcert = filepath.Join(user.HomeDir, ".postgresql", "postgresql.crt") } // https://github.com/postgres/postgres/blob/REL9_6_2/src/interfaces/libpq/fe-secure-openssl.c#L1045 if len(sslcert) == 0 { return } // https://github.com/postgres/postgres/blob/REL9_6_2/src/interfaces/libpq/fe-secure-openssl.c#L1050:L1054 if _, err := os.Stat(sslcert); os.IsNotExist(err) { return } else if err != nil { panic(err) } // In libpq, the ssl key is only loaded if the setting is not blank. // // https://github.com/postgres/postgres/blob/REL9_6_2/src/interfaces/libpq/fe-secure-openssl.c#L1123-L1222 sslkey := o["sslkey"] if len(sslkey) == 0 && user != nil { sslkey = filepath.Join(user.HomeDir, ".postgresql", "postgresql.key") } if len(sslkey) > 0 { if err := sslKeyPermissions(sslkey); err != nil { panic(err) } } cert, err := tls.LoadX509KeyPair(sslcert, sslkey) if err != nil { panic(err) } tlsConf.Certificates = []tls.Certificate{cert} }
0.53676
tektoncd/cli
vendor/github.com/sassoftware/relic/lib/x509tools/keylogfile.go
qiniu/logkit
vendor/github.com/lib/pq/ssl.go
Apache-2.0
go
If the SSLKEYLOGFILE environment variable is set, then open it for appending and write TLS master secrets there in the "NSS Key Log Format". Use this for debugging TLS and HTTP problems with Wireshark.
func SetKeyLogFile(tconf *tls.Config) { if klf := os.Getenv("SSLKEYLOGFILE"); klf != "" { fmt.Fprintln(os.Stderr, "WARNING: SSLKEYLOGFILE is set! TLS master secrets will be logged.") f, err := os.OpenFile(klf, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0600) if err != nil { panic(err) } tconf.KeyLogWriter = f } }
func DefaultTLSKey() string { dir, err := PerkeepConfigDir() if err != nil { log.Fatalf("Could not compute DefaultTLSKey: %v", err) } return filepath.Join(dir, "tls.key") }
0.511074
tektoncd/cli
vendor/github.com/sassoftware/relic/lib/x509tools/keylogfile.go
perkeep/perkeep
internal/osutil/paths.go
Apache-2.0
go
If the SSLKEYLOGFILE environment variable is set, then open it for appending and write TLS master secrets there in the "NSS Key Log Format". Use this for debugging TLS and HTTP problems with Wireshark.
func SetKeyLogFile(tconf *tls.Config) { if klf := os.Getenv("SSLKEYLOGFILE"); klf != "" { fmt.Fprintln(os.Stderr, "WARNING: SSLKEYLOGFILE is set! TLS master secrets will be logged.") f, err := os.OpenFile(klf, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0600) if err != nil { panic(err) } tconf.KeyLogWriter = f } }
func GetTLSCertificateDataPath() string { if envPath := os.Getenv(common.EnvVarTLSDataPath); envPath != "" { return envPath } return common.DefaultPathTLSConfig }
0.504178
tektoncd/cli
vendor/github.com/sassoftware/relic/lib/x509tools/keylogfile.go
argoproj/argo-cd
util/cert/cert.go
Apache-2.0
go
If the SSLKEYLOGFILE environment variable is set, then open it for appending and write TLS master secrets there in the "NSS Key Log Format". Use this for debugging TLS and HTTP problems with Wireshark.
func SetKeyLogFile(tconf *tls.Config) { if klf := os.Getenv("SSLKEYLOGFILE"); klf != "" { fmt.Fprintln(os.Stderr, "WARNING: SSLKEYLOGFILE is set! TLS master secrets will be logged.") f, err := os.OpenFile(klf, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0600) if err != nil { panic(err) } tconf.KeyLogWriter = f } }
func WithTLSCredentials(creds credentials.TransportCredentials) Option { return wrappedOption{otlpconfig.NewGRPCOption(func(cfg otlpconfig.Config) otlpconfig.Config { cfg.Traces.GRPCCredentials = creds return cfg })} }
0.49852
tektoncd/cli
vendor/github.com/sassoftware/relic/lib/x509tools/keylogfile.go
Mirantis/cri-dockerd
vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/options.go
Apache-2.0
go
RegisterInterfaceDecoder registers an decoder for the provided interface type iface. This decoder will be called when unmarshaling into a type if the type implements iface or a pointer to the type implements iface. If the provided type is not an interface (i.e. iface.Kind() != reflect.Interface), this method will panic. RegisterInterfaceDecoder should not be called concurrently with any other Registry method.
func (r *Registry) RegisterInterfaceDecoder(iface reflect.Type, dec ValueDecoder) { if iface.Kind() != reflect.Interface { panicStr := fmt.Errorf("RegisterInterfaceDecoder expects a type with kind reflect.Interface, "+ "got type %s with kind %s", iface, iface.Kind()) panic(panicStr) } for idx, decoder := range r.interfaceDecoders { if decoder.i == iface { r.interfaceDecoders[idx].vd = dec return } } r.interfaceDecoders = append(r.interfaceDecoders, interfaceValueDecoder{i: iface, vd: dec}) }
func (r *Registry) RegisterInterfaceEncoder(iface reflect.Type, enc ValueEncoder) { if iface.Kind() != reflect.Interface { panicStr := fmt.Errorf("RegisterInterfaceEncoder expects a type with kind reflect.Interface, "+ "got type %s with kind %s", iface, iface.Kind()) panic(panicStr) } for idx, encoder := range r.interfaceEncoders { if encoder.i == iface { r.interfaceEncoders[idx].ve = enc return } } r.interfaceEncoders = append(r.interfaceEncoders, interfaceValueEncoder{i: iface, ve: enc}) }
0.883346
containers/podman-tui
vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/registry.go
containers/podman-tui
vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/registry.go
Apache-2.0
go
RegisterInterfaceDecoder registers an decoder for the provided interface type iface. This decoder will be called when unmarshaling into a type if the type implements iface or a pointer to the type implements iface. If the provided type is not an interface (i.e. iface.Kind() != reflect.Interface), this method will panic. RegisterInterfaceDecoder should not be called concurrently with any other Registry method.
func (r *Registry) RegisterInterfaceDecoder(iface reflect.Type, dec ValueDecoder) { if iface.Kind() != reflect.Interface { panicStr := fmt.Errorf("RegisterInterfaceDecoder expects a type with kind reflect.Interface, "+ "got type %s with kind %s", iface, iface.Kind()) panic(panicStr) } for idx, decoder := range r.interfaceDecoders { if decoder.i == iface { r.interfaceDecoders[idx].vd = dec return } } r.interfaceDecoders = append(r.interfaceDecoders, interfaceValueDecoder{i: iface, vd: dec}) }
func (rb *RegistryBuilder) RegisterHookDecoder(t reflect.Type, dec ValueDecoder) *RegistryBuilder { rb.registry.RegisterInterfaceDecoder(t, dec) return rb }
0.850124
containers/podman-tui
vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/registry.go
containers/podman-tui
vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/registry.go
Apache-2.0
go
RegisterInterfaceDecoder registers an decoder for the provided interface type iface. This decoder will be called when unmarshaling into a type if the type implements iface or a pointer to the type implements iface. If the provided type is not an interface (i.e. iface.Kind() != reflect.Interface), this method will panic. RegisterInterfaceDecoder should not be called concurrently with any other Registry method.
func (r *Registry) RegisterInterfaceDecoder(iface reflect.Type, dec ValueDecoder) { if iface.Kind() != reflect.Interface { panicStr := fmt.Errorf("RegisterInterfaceDecoder expects a type with kind reflect.Interface, "+ "got type %s with kind %s", iface, iface.Kind()) panic(panicStr) } for idx, decoder := range r.interfaceDecoders { if decoder.i == iface { r.interfaceDecoders[idx].vd = dec return } } r.interfaceDecoders = append(r.interfaceDecoders, interfaceValueDecoder{i: iface, vd: dec}) }
func (rb *RegistryBuilder) RegisterDecoder(t reflect.Type, dec ValueDecoder) *RegistryBuilder { if t == nil { rb.registry.RegisterTypeDecoder(t, dec) return rb } if t == tEmpty { rb.registry.RegisterTypeDecoder(t, dec) return rb } switch t.Kind() { case reflect.Interface: rb.registry.RegisterInterfaceDecoder(t, dec) default: rb.registry.RegisterTypeDecoder(t, dec) } return rb }
0.841691
containers/podman-tui
vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/registry.go
containers/podman-tui
vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/registry.go
Apache-2.0
go
RegisterInterfaceDecoder registers an decoder for the provided interface type iface. This decoder will be called when unmarshaling into a type if the type implements iface or a pointer to the type implements iface. If the provided type is not an interface (i.e. iface.Kind() != reflect.Interface), this method will panic. RegisterInterfaceDecoder should not be called concurrently with any other Registry method.
func (r *Registry) RegisterInterfaceDecoder(iface reflect.Type, dec ValueDecoder) { if iface.Kind() != reflect.Interface { panicStr := fmt.Errorf("RegisterInterfaceDecoder expects a type with kind reflect.Interface, "+ "got type %s with kind %s", iface, iface.Kind()) panic(panicStr) } for idx, decoder := range r.interfaceDecoders { if decoder.i == iface { r.interfaceDecoders[idx].vd = dec return } } r.interfaceDecoders = append(r.interfaceDecoders, interfaceValueDecoder{i: iface, vd: dec}) }
func (r *Registry) RegisterTypeDecoder(valueType reflect.Type, dec ValueDecoder) { r.typeDecoders.Store(valueType, dec) }
0.781701
containers/podman-tui
vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/registry.go
containers/podman-tui
vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/registry.go
Apache-2.0
go
RegisterInterfaceDecoder registers an decoder for the provided interface type iface. This decoder will be called when unmarshaling into a type if the type implements iface or a pointer to the type implements iface. If the provided type is not an interface (i.e. iface.Kind() != reflect.Interface), this method will panic. RegisterInterfaceDecoder should not be called concurrently with any other Registry method.
func (r *Registry) RegisterInterfaceDecoder(iface reflect.Type, dec ValueDecoder) { if iface.Kind() != reflect.Interface { panicStr := fmt.Errorf("RegisterInterfaceDecoder expects a type with kind reflect.Interface, "+ "got type %s with kind %s", iface, iface.Kind()) panic(panicStr) } for idx, decoder := range r.interfaceDecoders { if decoder.i == iface { r.interfaceDecoders[idx].vd = dec return } } r.interfaceDecoders = append(r.interfaceDecoders, interfaceValueDecoder{i: iface, vd: dec}) }
func (rb *RegistryBuilder) RegisterHookEncoder(t reflect.Type, enc ValueEncoder) *RegistryBuilder { rb.registry.RegisterInterfaceEncoder(t, enc) return rb }
0.746616
containers/podman-tui
vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/registry.go
containers/podman-tui
vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/registry.go
Apache-2.0
go