_id stringlengths 2 7 | title stringlengths 1 118 | partition stringclasses 3
values | text stringlengths 52 85.5k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q166900 | SetTerminologyNames | train | func (s *TextInput) SetTerminologyNames(v []*string) *TextInput {
s.TerminologyNames = v
return s
} | go | {
"resource": ""
} |
q166901 | SetAppliedTerminologies | train | func (s *TextOutput) SetAppliedTerminologies(v []*AppliedTerminology) *TextOutput {
s.AppliedTerminologies = v
return s
} | go | {
"resource": ""
} |
q166902 | SetTranslatedText | train | func (s *TextOutput) SetTranslatedText(v string) *TextOutput {
s.TranslatedText = &v
return s
} | go | {
"resource": ""
} |
q166903 | ExportableName | train | func (a *API) ExportableName(name string) string {
if name == "" {
return name
}
return strings.ToUpper(name[0:1]) + name[1:]
} | go | {
"resource": ""
} |
q166904 | WaitUntilJobComplete | train | func (c *ElasticTranscoder) WaitUntilJobComplete(input *ReadJobInput) error {
return c.WaitUntilJobCompleteWithContext(aws.BackgroundContext(), input)
} | go | {
"resource": ""
} |
q166905 | New | train | func New(cfg aws.Config, clientInfo metadata.ClientInfo, handlers Handlers,
retryer Retryer, operation *Operation, params interface{}, data interface{}) *Request {
method := operation.HTTPMethod
if method == "" {
method = "POST"
}
httpReq, _ := http.NewRequest(method, "", nil)
var err error
httpReq.URL, err... | go | {
"resource": ""
} |
q166906 | ApplyOptions | train | func (r *Request) ApplyOptions(opts ...Option) {
for _, opt := range opts {
opt(r)
}
} | go | {
"resource": ""
} |
q166907 | Context | train | func (r *Request) Context() aws.Context {
if r.context != nil {
return r.context
}
return aws.BackgroundContext()
} | go | {
"resource": ""
} |
q166908 | WillRetry | train | func (r *Request) WillRetry() bool {
if !aws.IsReaderSeekable(r.Body) && r.HTTPRequest.Body != NoBody {
return false
}
return r.Error != nil && aws.BoolValue(r.Retryable) && r.RetryCount < r.MaxRetries()
} | go | {
"resource": ""
} |
q166909 | ParamsFilled | train | func (r *Request) ParamsFilled() bool {
return r.Params != nil && reflect.ValueOf(r.Params).Elem().IsValid()
} | go | {
"resource": ""
} |
q166910 | DataFilled | train | func (r *Request) DataFilled() bool {
return r.Data != nil && reflect.ValueOf(r.Data).Elem().IsValid()
} | go | {
"resource": ""
} |
q166911 | SetBufferBody | train | func (r *Request) SetBufferBody(buf []byte) {
r.SetReaderBody(bytes.NewReader(buf))
} | go | {
"resource": ""
} |
q166912 | SetStringBody | train | func (r *Request) SetStringBody(s string) {
r.SetReaderBody(strings.NewReader(s))
} | go | {
"resource": ""
} |
q166913 | SetReaderBody | train | func (r *Request) SetReaderBody(reader io.ReadSeeker) {
r.Body = reader
r.BodyStart, _ = reader.Seek(0, sdkio.SeekCurrent) // Get the Bodies current offset.
r.ResetBody()
} | go | {
"resource": ""
} |
q166914 | Presign | train | func (r *Request) Presign(expire time.Duration) (string, error) {
r = r.copy()
// Presign requires all headers be hoisted. There is no way to retrieve
// the signed headers not hoisted without this. Making the presigned URL
// useless.
r.NotHoist = false
u, _, err := getPresignedURL(r, expire)
return u, err
} | go | {
"resource": ""
} |
q166915 | PresignRequest | train | func (r *Request) PresignRequest(expire time.Duration) (string, http.Header, error) {
r = r.copy()
return getPresignedURL(r, expire)
} | go | {
"resource": ""
} |
q166916 | Build | train | func (r *Request) Build() error {
if !r.built {
r.Handlers.Validate.Run(r)
if r.Error != nil {
debugLogReqError(r, "Validate Request", false, r.Error)
return r.Error
}
r.Handlers.Build.Run(r)
if r.Error != nil {
debugLogReqError(r, "Build Request", false, r.Error)
return r.Error
}
r.built = t... | go | {
"resource": ""
} |
q166917 | Sign | train | func (r *Request) Sign() error {
r.Build()
if r.Error != nil {
debugLogReqError(r, "Build Request", false, r.Error)
return r.Error
}
r.Handlers.Sign.Run(r)
return r.Error
} | go | {
"resource": ""
} |
q166918 | copy | train | func (r *Request) copy() *Request {
req := &Request{}
*req = *r
req.Handlers = r.Handlers.Copy()
op := *r.Operation
req.Operation = &op
return req
} | go | {
"resource": ""
} |
q166919 | AddToUserAgent | train | func AddToUserAgent(r *Request, s string) {
curUA := r.HTTPRequest.Header.Get("User-Agent")
if len(curUA) > 0 {
s = curUA + " " + s
}
r.HTTPRequest.Header.Set("User-Agent", s)
} | go | {
"resource": ""
} |
q166920 | SanitizeHostForHeader | train | func SanitizeHostForHeader(r *http.Request) {
host := getHost(r)
port := portOnly(host)
if port != "" && isDefaultPort(r.URL.Scheme, port) {
r.Host = stripPort(host)
}
} | go | {
"resource": ""
} |
q166921 | getHost | train | func getHost(r *http.Request) string {
if r.Host != "" {
return r.Host
}
return r.URL.Host
} | go | {
"resource": ""
} |
q166922 | SetEgressIp | train | func (s *Flow) SetEgressIp(v string) *Flow {
s.EgressIp = &v
return s
} | go | {
"resource": ""
} |
q166923 | SetFlows | train | func (s *ListFlowsOutput) SetFlows(v []*ListedFlow) *ListFlowsOutput {
s.Flows = v
return s
} | go | {
"resource": ""
} |
q166924 | SetEntitlementName | train | func (s *ListedEntitlement) SetEntitlementName(v string) *ListedEntitlement {
s.EntitlementName = &v
return s
} | go | {
"resource": ""
} |
q166925 | SetMediaLiveInputArn | train | func (s *Output) SetMediaLiveInputArn(v string) *Output {
s.MediaLiveInputArn = &v
return s
} | go | {
"resource": ""
} |
q166926 | SetIngestIp | train | func (s *Source) SetIngestIp(v string) *Source {
s.IngestIp = &v
return s
} | go | {
"resource": ""
} |
q166927 | SetEntitlement | train | func (s *UpdateFlowEntitlementOutput) SetEntitlement(v *Entitlement) *UpdateFlowEntitlementOutput {
s.Entitlement = v
return s
} | go | {
"resource": ""
} |
q166928 | NewHostPrefixHandler | train | func NewHostPrefixHandler(prefix string, labelsFn func() map[string]string) request.NamedHandler {
builder := HostPrefixBuilder{
Prefix: prefix,
LabelsFn: labelsFn,
}
return request.NamedHandler{
Name: HostPrefixHandlerName,
Fn: builder.Build,
}
} | go | {
"resource": ""
} |
q166929 | Build | train | func (h HostPrefixBuilder) Build(r *request.Request) {
if aws.BoolValue(r.Config.DisableEndpointHostPrefix) {
return
}
var labels map[string]string
if h.LabelsFn != nil {
labels = h.LabelsFn()
}
prefix := h.Prefix
for name, value := range labels {
prefix = strings.Replace(prefix, "{"+name+"}", value, -1)... | go | {
"resource": ""
} |
q166930 | SetHeartbeatInSeconds | train | func (s *ActivityScheduledEventDetails) SetHeartbeatInSeconds(v int64) *ActivityScheduledEventDetails {
s.HeartbeatInSeconds = &v
return s
} | go | {
"resource": ""
} |
q166931 | SetActivityFailedEventDetails | train | func (s *HistoryEvent) SetActivityFailedEventDetails(v *ActivityFailedEventDetails) *HistoryEvent {
s.ActivityFailedEventDetails = v
return s
} | go | {
"resource": ""
} |
q166932 | SetActivityScheduleFailedEventDetails | train | func (s *HistoryEvent) SetActivityScheduleFailedEventDetails(v *ActivityScheduleFailedEventDetails) *HistoryEvent {
s.ActivityScheduleFailedEventDetails = v
return s
} | go | {
"resource": ""
} |
q166933 | SetActivityScheduledEventDetails | train | func (s *HistoryEvent) SetActivityScheduledEventDetails(v *ActivityScheduledEventDetails) *HistoryEvent {
s.ActivityScheduledEventDetails = v
return s
} | go | {
"resource": ""
} |
q166934 | SetActivityStartedEventDetails | train | func (s *HistoryEvent) SetActivityStartedEventDetails(v *ActivityStartedEventDetails) *HistoryEvent {
s.ActivityStartedEventDetails = v
return s
} | go | {
"resource": ""
} |
q166935 | SetActivitySucceededEventDetails | train | func (s *HistoryEvent) SetActivitySucceededEventDetails(v *ActivitySucceededEventDetails) *HistoryEvent {
s.ActivitySucceededEventDetails = v
return s
} | go | {
"resource": ""
} |
q166936 | SetActivityTimedOutEventDetails | train | func (s *HistoryEvent) SetActivityTimedOutEventDetails(v *ActivityTimedOutEventDetails) *HistoryEvent {
s.ActivityTimedOutEventDetails = v
return s
} | go | {
"resource": ""
} |
q166937 | SetExecutionAbortedEventDetails | train | func (s *HistoryEvent) SetExecutionAbortedEventDetails(v *ExecutionAbortedEventDetails) *HistoryEvent {
s.ExecutionAbortedEventDetails = v
return s
} | go | {
"resource": ""
} |
q166938 | SetExecutionFailedEventDetails | train | func (s *HistoryEvent) SetExecutionFailedEventDetails(v *ExecutionFailedEventDetails) *HistoryEvent {
s.ExecutionFailedEventDetails = v
return s
} | go | {
"resource": ""
} |
q166939 | SetExecutionStartedEventDetails | train | func (s *HistoryEvent) SetExecutionStartedEventDetails(v *ExecutionStartedEventDetails) *HistoryEvent {
s.ExecutionStartedEventDetails = v
return s
} | go | {
"resource": ""
} |
q166940 | SetExecutionSucceededEventDetails | train | func (s *HistoryEvent) SetExecutionSucceededEventDetails(v *ExecutionSucceededEventDetails) *HistoryEvent {
s.ExecutionSucceededEventDetails = v
return s
} | go | {
"resource": ""
} |
q166941 | SetExecutionTimedOutEventDetails | train | func (s *HistoryEvent) SetExecutionTimedOutEventDetails(v *ExecutionTimedOutEventDetails) *HistoryEvent {
s.ExecutionTimedOutEventDetails = v
return s
} | go | {
"resource": ""
} |
q166942 | SetLambdaFunctionFailedEventDetails | train | func (s *HistoryEvent) SetLambdaFunctionFailedEventDetails(v *LambdaFunctionFailedEventDetails) *HistoryEvent {
s.LambdaFunctionFailedEventDetails = v
return s
} | go | {
"resource": ""
} |
q166943 | SetLambdaFunctionScheduleFailedEventDetails | train | func (s *HistoryEvent) SetLambdaFunctionScheduleFailedEventDetails(v *LambdaFunctionScheduleFailedEventDetails) *HistoryEvent {
s.LambdaFunctionScheduleFailedEventDetails = v
return s
} | go | {
"resource": ""
} |
q166944 | SetLambdaFunctionScheduledEventDetails | train | func (s *HistoryEvent) SetLambdaFunctionScheduledEventDetails(v *LambdaFunctionScheduledEventDetails) *HistoryEvent {
s.LambdaFunctionScheduledEventDetails = v
return s
} | go | {
"resource": ""
} |
q166945 | SetLambdaFunctionStartFailedEventDetails | train | func (s *HistoryEvent) SetLambdaFunctionStartFailedEventDetails(v *LambdaFunctionStartFailedEventDetails) *HistoryEvent {
s.LambdaFunctionStartFailedEventDetails = v
return s
} | go | {
"resource": ""
} |
q166946 | SetLambdaFunctionSucceededEventDetails | train | func (s *HistoryEvent) SetLambdaFunctionSucceededEventDetails(v *LambdaFunctionSucceededEventDetails) *HistoryEvent {
s.LambdaFunctionSucceededEventDetails = v
return s
} | go | {
"resource": ""
} |
q166947 | SetLambdaFunctionTimedOutEventDetails | train | func (s *HistoryEvent) SetLambdaFunctionTimedOutEventDetails(v *LambdaFunctionTimedOutEventDetails) *HistoryEvent {
s.LambdaFunctionTimedOutEventDetails = v
return s
} | go | {
"resource": ""
} |
q166948 | SetPreviousEventId | train | func (s *HistoryEvent) SetPreviousEventId(v int64) *HistoryEvent {
s.PreviousEventId = &v
return s
} | go | {
"resource": ""
} |
q166949 | SetStateEnteredEventDetails | train | func (s *HistoryEvent) SetStateEnteredEventDetails(v *StateEnteredEventDetails) *HistoryEvent {
s.StateEnteredEventDetails = v
return s
} | go | {
"resource": ""
} |
q166950 | SetStateExitedEventDetails | train | func (s *HistoryEvent) SetStateExitedEventDetails(v *StateExitedEventDetails) *HistoryEvent {
s.StateExitedEventDetails = v
return s
} | go | {
"resource": ""
} |
q166951 | SetTaskFailedEventDetails | train | func (s *HistoryEvent) SetTaskFailedEventDetails(v *TaskFailedEventDetails) *HistoryEvent {
s.TaskFailedEventDetails = v
return s
} | go | {
"resource": ""
} |
q166952 | SetTaskScheduledEventDetails | train | func (s *HistoryEvent) SetTaskScheduledEventDetails(v *TaskScheduledEventDetails) *HistoryEvent {
s.TaskScheduledEventDetails = v
return s
} | go | {
"resource": ""
} |
q166953 | SetTaskStartFailedEventDetails | train | func (s *HistoryEvent) SetTaskStartFailedEventDetails(v *TaskStartFailedEventDetails) *HistoryEvent {
s.TaskStartFailedEventDetails = v
return s
} | go | {
"resource": ""
} |
q166954 | SetTaskStartedEventDetails | train | func (s *HistoryEvent) SetTaskStartedEventDetails(v *TaskStartedEventDetails) *HistoryEvent {
s.TaskStartedEventDetails = v
return s
} | go | {
"resource": ""
} |
q166955 | SetTaskSubmitFailedEventDetails | train | func (s *HistoryEvent) SetTaskSubmitFailedEventDetails(v *TaskSubmitFailedEventDetails) *HistoryEvent {
s.TaskSubmitFailedEventDetails = v
return s
} | go | {
"resource": ""
} |
q166956 | SetTaskSubmittedEventDetails | train | func (s *HistoryEvent) SetTaskSubmittedEventDetails(v *TaskSubmittedEventDetails) *HistoryEvent {
s.TaskSubmittedEventDetails = v
return s
} | go | {
"resource": ""
} |
q166957 | SetTaskSucceededEventDetails | train | func (s *HistoryEvent) SetTaskSucceededEventDetails(v *TaskSucceededEventDetails) *HistoryEvent {
s.TaskSucceededEventDetails = v
return s
} | go | {
"resource": ""
} |
q166958 | SetTaskTimedOutEventDetails | train | func (s *HistoryEvent) SetTaskTimedOutEventDetails(v *TaskTimedOutEventDetails) *HistoryEvent {
s.TaskTimedOutEventDetails = v
return s
} | go | {
"resource": ""
} |
q166959 | SetExecutions | train | func (s *ListExecutionsOutput) SetExecutions(v []*ExecutionListItem) *ListExecutionsOutput {
s.Executions = v
return s
} | go | {
"resource": ""
} |
q166960 | SetStateMachines | train | func (s *ListStateMachinesOutput) SetStateMachines(v []*StateMachineListItem) *ListStateMachinesOutput {
s.StateMachines = v
return s
} | go | {
"resource": ""
} |
q166961 | updateTopLevelShapeReferences | train | func (a *API) updateTopLevelShapeReferences() {
for _, o := range a.Operations {
// these are for REST-XML services
if o.InputRef.LocationName != "" {
o.InputRef.Shape.LocationName = o.InputRef.LocationName
}
if o.InputRef.Location != "" {
o.InputRef.Shape.Location = o.InputRef.Location
}
if o.InputR... | go | {
"resource": ""
} |
q166962 | writeShapeNames | train | func (a *API) writeShapeNames() {
for n, s := range a.Shapes {
s.API = a
s.ShapeName = n
}
} | go | {
"resource": ""
} |
q166963 | resolveReference | train | func (r *referenceResolver) resolveReference(ref *ShapeRef) {
if ref.ShapeName == "" {
return
}
shape, ok := r.API.Shapes[ref.ShapeName]
if !ok {
panic(fmt.Sprintf("unable resolve reference, %s", ref.ShapeName))
}
if ref.JSONValue {
ref.ShapeName = "JSONValue"
if _, ok := r.API.Shapes[ref.ShapeName]; !o... | go | {
"resource": ""
} |
q166964 | resolveShape | train | func (r *referenceResolver) resolveShape(shape *Shape) {
r.resolveReference(&shape.MemberRef)
r.resolveReference(&shape.KeyRef)
r.resolveReference(&shape.ValueRef)
for _, m := range shape.MemberRefs {
r.resolveReference(m)
}
} | go | {
"resource": ""
} |
q166965 | renameExportable | train | func (a *API) renameExportable() {
for name, op := range a.Operations {
newName := a.ExportableName(name)
if newName != name {
delete(a.Operations, name)
a.Operations[newName] = op
}
op.ExportedName = newName
}
for k, s := range a.Shapes {
// FIXME SNS has lower and uppercased shape names with the s... | go | {
"resource": ""
} |
q166966 | renameCollidingFields | train | func (a *API) renameCollidingFields() {
for _, v := range a.Shapes {
namesWithSet := map[string]struct{}{}
for k, field := range v.MemberRefs {
if _, ok := v.MemberRefs["Set"+k]; ok {
namesWithSet["Set"+k] = struct{}{}
}
if collides(k) || (v.Exception && exceptionCollides(k)) {
renameCollidingFie... | go | {
"resource": ""
} |
q166967 | makeIOShape | train | func (a *API) makeIOShape(name string) *Shape {
shape := &Shape{
API: a, ShapeName: name, Type: "structure",
MemberRefs: map[string]*ShapeRef{},
}
a.Shapes[name] = shape
return shape
} | go | {
"resource": ""
} |
q166968 | removeUnusedShapes | train | func (a *API) removeUnusedShapes() {
for _, s := range a.Shapes {
if len(s.refs) == 0 {
a.removeShape(s)
}
}
} | go | {
"resource": ""
} |
q166969 | setMetadataEndpointsKey | train | func (a *API) setMetadataEndpointsKey() {
if len(a.Metadata.EndpointsID) != 0 {
return
}
if v, ok := custEndpointsKey[a.PackageName()]; ok {
a.Metadata.EndpointsID = v
} else {
a.Metadata.EndpointsID = a.Metadata.EndpointPrefix
}
} | go | {
"resource": ""
} |
q166970 | SetHapgSerial | train | func (s *DescribeHapgOutput) SetHapgSerial(v string) *DescribeHapgOutput {
s.HapgSerial = &v
return s
} | go | {
"resource": ""
} |
q166971 | SetHsmsLastActionFailed | train | func (s *DescribeHapgOutput) SetHsmsLastActionFailed(v []*string) *DescribeHapgOutput {
s.HsmsLastActionFailed = v
return s
} | go | {
"resource": ""
} |
q166972 | SetHsmsPendingDeletion | train | func (s *DescribeHapgOutput) SetHsmsPendingDeletion(v []*string) *DescribeHapgOutput {
s.HsmsPendingDeletion = v
return s
} | go | {
"resource": ""
} |
q166973 | SetHsmsPendingRegistration | train | func (s *DescribeHapgOutput) SetHsmsPendingRegistration(v []*string) *DescribeHapgOutput {
s.HsmsPendingRegistration = v
return s
} | go | {
"resource": ""
} |
q166974 | SetHsmSerialNumber | train | func (s *DescribeHsmInput) SetHsmSerialNumber(v string) *DescribeHsmInput {
s.HsmSerialNumber = &v
return s
} | go | {
"resource": ""
} |
q166975 | SetServerCertLastUpdated | train | func (s *DescribeHsmOutput) SetServerCertLastUpdated(v string) *DescribeHsmOutput {
s.ServerCertLastUpdated = &v
return s
} | go | {
"resource": ""
} |
q166976 | SetServerCertUri | train | func (s *DescribeHsmOutput) SetServerCertUri(v string) *DescribeHsmOutput {
s.ServerCertUri = &v
return s
} | go | {
"resource": ""
} |
q166977 | SetSshKeyLastUpdated | train | func (s *DescribeHsmOutput) SetSshKeyLastUpdated(v string) *DescribeHsmOutput {
s.SshKeyLastUpdated = &v
return s
} | go | {
"resource": ""
} |
q166978 | SetSubscriptionEndDate | train | func (s *DescribeHsmOutput) SetSubscriptionEndDate(v string) *DescribeHsmOutput {
s.SubscriptionEndDate = &v
return s
} | go | {
"resource": ""
} |
q166979 | SetSubscriptionStartDate | train | func (s *DescribeHsmOutput) SetSubscriptionStartDate(v string) *DescribeHsmOutput {
s.SubscriptionStartDate = &v
return s
} | go | {
"resource": ""
} |
q166980 | SetVendorName | train | func (s *DescribeHsmOutput) SetVendorName(v string) *DescribeHsmOutput {
s.VendorName = &v
return s
} | go | {
"resource": ""
} |
q166981 | SetClientVersion | train | func (s *GetConfigInput) SetClientVersion(v string) *GetConfigInput {
s.ClientVersion = &v
return s
} | go | {
"resource": ""
} |
q166982 | SetConfigCred | train | func (s *GetConfigOutput) SetConfigCred(v string) *GetConfigOutput {
s.ConfigCred = &v
return s
} | go | {
"resource": ""
} |
q166983 | SetConfigFile | train | func (s *GetConfigOutput) SetConfigFile(v string) *GetConfigOutput {
s.ConfigFile = &v
return s
} | go | {
"resource": ""
} |
q166984 | SetConfigType | train | func (s *GetConfigOutput) SetConfigType(v string) *GetConfigOutput {
s.ConfigType = &v
return s
} | go | {
"resource": ""
} |
q166985 | SetAZList | train | func (s *ListAvailableZonesOutput) SetAZList(v []*string) *ListAvailableZonesOutput {
s.AZList = v
return s
} | go | {
"resource": ""
} |
q166986 | SetHsmList | train | func (s *ListHsmsOutput) SetHsmList(v []*string) *ListHsmsOutput {
s.HsmList = v
return s
} | go | {
"resource": ""
} |
q166987 | EndpointFor | train | func (fn ResolverFunc) EndpointFor(service, region string, opts ...func(*Options)) (ResolvedEndpoint, error) {
return fn(service, region, opts...)
} | go | {
"resource": ""
} |
q166988 | AddScheme | train | func AddScheme(endpoint string, disableSSL bool) string {
if !schemeRE.MatchString(endpoint) {
scheme := "https"
if disableSSL {
scheme = "http"
}
endpoint = fmt.Sprintf("%s://%s", scheme, endpoint)
}
return endpoint
} | go | {
"resource": ""
} |
q166989 | PartitionForRegion | train | func PartitionForRegion(ps []Partition, regionID string) (Partition, bool) {
for _, p := range ps {
if _, ok := p.p.Regions[regionID]; ok || p.p.RegionRegex.MatchString(regionID) {
return p, true
}
}
return Partition{}, false
} | go | {
"resource": ""
} |
q166990 | Regions | train | func (p Partition) Regions() map[string]Region {
rs := map[string]Region{}
for id, r := range p.p.Regions {
rs[id] = Region{
id: id,
desc: r.Description,
p: p.p,
}
}
return rs
} | go | {
"resource": ""
} |
q166991 | Services | train | func (p Partition) Services() map[string]Service {
ss := map[string]Service{}
for id := range p.p.Services {
ss[id] = Service{
id: id,
p: p.p,
}
}
return ss
} | go | {
"resource": ""
} |
q166992 | ResolveEndpoint | train | func (r Region) ResolveEndpoint(service string, opts ...func(*Options)) (ResolvedEndpoint, error) {
return r.p.EndpointFor(service, r.id, opts...)
} | go | {
"resource": ""
} |
q166993 | Services | train | func (r Region) Services() map[string]Service {
ss := map[string]Service{}
for id, s := range r.p.Services {
if _, ok := s.Endpoints[r.id]; ok {
ss[id] = Service{
id: id,
p: r.p,
}
}
}
return ss
} | go | {
"resource": ""
} |
q166994 | ResolveEndpoint | train | func (s Service) ResolveEndpoint(region string, opts ...func(*Options)) (ResolvedEndpoint, error) {
return s.p.EndpointFor(s.id, region, opts...)
} | go | {
"resource": ""
} |
q166995 | Regions | train | func (s Service) Regions() map[string]Region {
rs := map[string]Region{}
for id := range s.p.Services[s.id].Endpoints {
if r, ok := s.p.Regions[id]; ok {
rs[id] = Region{
id: id,
desc: r.Description,
p: s.p,
}
}
}
return rs
} | go | {
"resource": ""
} |
q166996 | Endpoints | train | func (s Service) Endpoints() map[string]Endpoint {
es := map[string]Endpoint{}
for id := range s.p.Services[s.id].Endpoints {
es[id] = Endpoint{
id: id,
serviceID: s.id,
p: s.p,
}
}
return es
} | go | {
"resource": ""
} |
q166997 | ResolveEndpoint | train | func (e Endpoint) ResolveEndpoint(opts ...func(*Options)) (ResolvedEndpoint, error) {
return e.p.EndpointFor(e.serviceID, e.id, opts...)
} | go | {
"resource": ""
} |
q166998 | NewUnknownServiceError | train | func NewUnknownServiceError(p, s string, known []string) UnknownServiceError {
return UnknownServiceError{
awsError: awserr.New("UnknownServiceError",
"could not resolve endpoint for unknown service", nil),
Partition: p,
Service: s,
Known: known,
}
} | go | {
"resource": ""
} |
q166999 | Error | train | func (e UnknownServiceError) Error() string {
extra := fmt.Sprintf("partition: %q, service: %q",
e.Partition, e.Service)
if len(e.Known) > 0 {
extra += fmt.Sprintf(", known: %v", e.Known)
}
return awserr.SprintError(e.Code(), e.Message(), extra, e.OrigErr())
} | go | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.