_id
stringlengths
2
7
title
stringlengths
1
118
partition
stringclasses
3 values
text
stringlengths
17
51.2k
language
stringclasses
1 value
meta_information
dict
c200
SetCloneUrlSsh
train
{ s.CloneUrlSsh = &v return s }
go
{ "resource": "" }
c201
SetDefaultBranch
train
string) *RepositoryMetadata { s.DefaultBranch = &v return s }
go
{ "resource": "" }
c202
SetCustomData
train
string) *RepositoryTrigger { s.CustomData = &v return s }
go
{ "resource": "" }
c203
SetIsMove
train
bool) *SourceFileSpecifier { s.IsMove = &v return s }
go
{ "resource": "" }
c204
SetFailedExecutions
train
*TestRepositoryTriggersOutput { s.FailedExecutions = v return s }
go
{ "resource": "" }
c205
SetSuccessfulExecutions
train
[]*string) *TestRepositoryTriggersOutput { s.SuccessfulExecutions = v return s }
go
{ "resource": "" }
c206
SetDefaultBranchName
train
{ s.DefaultBranchName = &v return s }
go
{ "resource": "" }
c207
SetNewName
train
string) *UpdateRepositoryNameInput { s.NewName = &v return s }
go
{ "resource": "" }
c208
SetOldName
train
string) *UpdateRepositoryNameInput { s.OldName = &v return s }
go
{ "resource": "" }
c209
SetCompany
train
s.Company = &v return s }
go
{ "resource": "" }
c210
SetIsRestricted
train
s.IsRestricted = &v return s }
go
{ "resource": "" }
c211
SetLandmark
train
s.Landmark = &v return s }
go
{ "resource": "" }
c212
SetPrefectureOrDistrict
train
s.PrefectureOrDistrict = &v return s }
go
{ "resource": "" }
c213
SetStateOrProvince
train
s.StateOrProvince = &v return s }
go
{ "resource": "" }
c214
SetStreet1
train
s.Street1 = &v return s }
go
{ "resource": "" }
c215
SetStreet2
train
s.Street2 = &v return s }
go
{ "resource": "" }
c216
SetStreet3
train
s.Street3 = &v return s }
go
{ "resource": "" }
c217
SetObjectsTransferred
train
s.ObjectsTransferred = &v return s }
go
{ "resource": "" }
c218
SetTotalBytes
train
s.TotalBytes = &v return s }
go
{ "resource": "" }
c219
SetTotalObjects
train
s.TotalObjects = &v return s }
go
{ "resource": "" }
c220
SetClusterMetadata
train
*ClusterMetadata) *DescribeClusterOutput { s.ClusterMetadata = v return s }
go
{ "resource": "" }
c221
SetJobMetadata
train
{ s.JobMetadata = v return s }
go
{ "resource": "" }
c222
SetSubJobMetadata
train
{ s.SubJobMetadata = v return s }
go
{ "resource": "" }
c223
SetSnowballAmiId
train
s.SnowballAmiId = &v return s }
go
{ "resource": "" }
c224
SetEventResourceARN
train
{ s.EventResourceARN = &v return s }
go
{ "resource": "" }
c225
SetManifestURI
train
{ s.ManifestURI = &v return s }
go
{ "resource": "" }
c226
SetUnlockCode
train
string) *GetJobUnlockCodeOutput { s.UnlockCode = &v return s }
go
{ "resource": "" }
c227
SetSnowballLimit
train
{ s.SnowballLimit = &v return s }
go
{ "resource": "" }
c228
SetSnowballsInUse
train
{ s.SnowballsInUse = &v return s }
go
{ "resource": "" }
c229
SetIsMaster
train
s.IsMaster = &v return s }
go
{ "resource": "" }
c230
SetJobCompletionReportURI
train
s.JobCompletionReportURI = &v return s }
go
{ "resource": "" }
c231
SetJobFailureLogURI
train
s.JobFailureLogURI = &v return s }
go
{ "resource": "" }
c232
SetJobSuccessLogURI
train
s.JobSuccessLogURI = &v return s }
go
{ "resource": "" }
c233
SetJobLogInfo
train
s.JobLogInfo = v return s }
go
{ "resource": "" }
c234
SetShippingDetails
train
*JobMetadata { s.ShippingDetails = v return s }
go
{ "resource": "" }
c235
SetEc2AmiResources
train
*JobResource { s.Ec2AmiResources = v return s }
go
{ "resource": "" }
c236
SetLambdaResources
train
*JobResource { s.LambdaResources = v return s }
go
{ "resource": "" }
c237
SetBeginMarker
train
s.BeginMarker = &v return s }
go
{ "resource": "" }
c238
SetEndMarker
train
s.EndMarker = &v return s }
go
{ "resource": "" }
c239
SetEventTriggers
train
*LambdaResource { s.EventTriggers = v return s }
go
{ "resource": "" }
c240
SetLambdaArn
train
s.LambdaArn = &v return s }
go
{ "resource": "" }
c241
SetClusterListEntries
train
*ListClustersOutput { s.ClusterListEntries = v return s }
go
{ "resource": "" }
c242
SetCompatibleImages
train
[]*CompatibleImage) *ListCompatibleImagesOutput { s.CompatibleImages = v return s }
go
{ "resource": "" }
c243
SetJobStatesToNotify
train
s.JobStatesToNotify = v return s }
go
{ "resource": "" }
c244
SetNotifyAll
train
s.NotifyAll = &v return s }
go
{ "resource": "" }
c245
SetBucketArn
train
s.BucketArn = &v return s }
go
{ "resource": "" }
c246
SetKeyRange
train
s.KeyRange = v return s }
go
{ "resource": "" }
c247
SetTrackingNumber
train
s.TrackingNumber = &v return s }
go
{ "resource": "" }
c248
SetInboundShipment
train
s.InboundShipment = v return s }
go
{ "resource": "" }
c249
SetOutboundShipment
train
s.OutboundShipment = v return s }
go
{ "resource": "" }
c250
WaitUntilSuccessfulSigningJob
train
c.WaitUntilSuccessfulSigningJobWithContext(aws.BackgroundContext(), input) }
go
{ "resource": "" }
c251
SetProposalDurationInHours
train
s.ProposalDurationInHours = &v return s }
go
{ "resource": "" }
c252
SetThresholdComparator
train
string) *ApprovalThresholdPolicy { s.ThresholdComparator = &v return s }
go
{ "resource": "" }
c253
SetNodeConfiguration
train
*CreateNodeInput { s.NodeConfiguration = v return s }
go
{ "resource": "" }
c254
SetMember
train
{ s.Member = v return s }
go
{ "resource": "" }
c255
SetNode
train
{ s.Node = v return s }
go
{ "resource": "" }
c256
SetProposal
train
*Proposal) *GetProposalOutput { s.Proposal = v return s }
go
{ "resource": "" }
c257
SetNetworkSummary
train
*Invitation { s.NetworkSummary = v return s }
go
{ "resource": "" }
c258
SetNetworks
train
*ListNetworksOutput { s.Networks = v return s }
go
{ "resource": "" }
c259
SetProposalVotes
train
[]*VoteSummary) *ListProposalVotesOutput { s.ProposalVotes = v return s }
go
{ "resource": "" }
c260
SetProposals
train
*ListProposalsOutput { s.Proposals = v return s }
go
{ "resource": "" }
c261
SetCaEndpoint
train
string) *MemberFabricAttributes { s.CaEndpoint = &v return s }
go
{ "resource": "" }
c262
SetAdminPassword
train
string) *MemberFabricConfiguration { s.AdminPassword = &v return s }
go
{ "resource": "" }
c263
SetVpcEndpointServiceName
train
s.VpcEndpointServiceName = &v return s }
go
{ "resource": "" }
c264
SetOrderingServiceEndpoint
train
s.OrderingServiceEndpoint = &v return s }
go
{ "resource": "" }
c265
SetPeerEndpoint
train
{ s.PeerEndpoint = &v return s }
go
{ "resource": "" }
c266
SetPeerEventEndpoint
train
s.PeerEventEndpoint = &v return s }
go
{ "resource": "" }
c267
SetNoVoteCount
train
s.NoVoteCount = &v return s }
go
{ "resource": "" }
c268
SetOutstandingVoteCount
train
s.OutstandingVoteCount = &v return s }
go
{ "resource": "" }
c269
SetYesVoteCount
train
s.YesVoteCount = &v return s }
go
{ "resource": "" }
c270
SetRemovals
train
*ProposalActions { s.Removals = v return s }
go
{ "resource": "" }
c271
SetVoterMemberId
train
string) *VoteOnProposalInput { s.VoterMemberId = &v return s }
go
{ "resource": "" }
c272
SetApprovalThresholdPolicy
train
*VotingPolicy { s.ApprovalThresholdPolicy = v return s }
go
{ "resource": "" }
c273
Error
train
return awserr.SprintError(m.Code(), m.Message(), extra, m.OrigErr()) }
go
{ "resource": "" }
c274
WithUploaderRequestOptions
train
{ return func(u *Uploader) { u.RequestOptions = append(u.RequestOptions, opts...) } }
go
{ "resource": "" }
c275
UploadWithContext
train
} i.cfg.RequestOptions = append(i.cfg.RequestOptions, request.WithAppendUserAgent("S3Manager")) return i.upload() }
go
{ "resource": "" }
c276
upload
train
u.singlePart(reader) } else if err != nil { return nil, awserr.New("ReadRequestBody", "read upload data failed", err) } mu := multiuploader{uploader: u} return mu.upload(reader, part) }
go
{ "resource": "" }
c277
init
train
= sync.Pool{ New: func() interface{} { return make([]byte, u.cfg.PartSize) }, } // Try to get the total size for some optimizations u.initSize() }
go
{ "resource": "" }
c278
initSize
train
// Add one to the part size to account for remainders // during the size calculation. e.g odd number of bytes. u.cfg.PartSize = (u.totalSize / int64(u.cfg.MaxUploadParts)) + 1 } } }
go
{ "resource": "" }
c279
nextReader
train
reader := io.NewSectionReader(r, u.readerPos, n) u.readerPos += n return reader, int(n), nil, err default: part := u.bufferPool.Get().([]byte) n, err := readFillBuf(r, part) u.readerPos += int64(n) return bytes.NewReader(part[0:n]), n, part, err } }
go
{ "resource": "" }
c280
singlePart
train
:= req.Send(); err != nil { return nil, err } url := req.HTTPRequest.URL.String() return &UploadOutput{ Location: url, VersionID: out.VersionId, }, nil }
go
{ "resource": "" }
c281
upload
train
// with empty single part would of been created and never // started multipart upload. break } ch <- chunk{buf: reader, part: part, num: num} } // Close the channel, wait for workers, and complete upload close(ch) u.wg.Wait() complete := u.complete() if err := u.geterr(); err != nil { return nil, &multiUploadError{ awsError: awserr.New( "MultipartUpload", "upload multipart failed", err), uploadID: u.uploadID, } } // Create a presigned URL of the S3 Get Object in order to have parity with // single part upload. getReq, _ := u.cfg.S3.GetObjectRequest(&s3.GetObjectInput{ Bucket: u.in.Bucket, Key: u.in.Key, }) getReq.Config.Credentials = credentials.AnonymousCredentials uploadLocation, _, _ := getReq.PresignRequest(1) return &UploadOutput{ Location: uploadLocation, VersionID: complete.VersionId, UploadID: u.uploadID, }, nil }
go
{ "resource": "" }
c282
send
train
back into the pool to conserve memory u.bufferPool.Put(c.part) if err != nil { return err } n := c.num completed := &s3.CompletedPart{ETag: resp.ETag, PartNumber: &n} u.m.Lock() u.parts = append(u.parts, completed) u.m.Unlock() return nil }
go
{ "resource": "" }
c283
geterr
train
defer u.m.Unlock() return u.err }
go
{ "resource": "" }
c284
seterr
train
defer u.m.Unlock() u.err = e }
go
{ "resource": "" }
c285
fail
train
:= u.cfg.S3.AbortMultipartUploadWithContext(u.ctx, params, u.cfg.RequestOptions...) if err != nil { logMessage(u.cfg.S3, aws.LogDebug, fmt.Sprintf("failed to abort multipart upload, %v", err)) } }
go
{ "resource": "" }
c286
complete
train
&u.uploadID, MultipartUpload: &s3.CompletedMultipartUpload{Parts: u.parts}, } resp, err := u.cfg.S3.CompleteMultipartUploadWithContext(u.ctx, params, u.cfg.RequestOptions...) if err != nil { u.seterr(err) u.fail() } return resp }
go
{ "resource": "" }
c287
InputTokensString
train
p.InputTokens.([]string) return fmt.Sprintf("%#v", str) }
go
{ "resource": "" }
c288
OutputTokensString
train
p.OutputTokens.([]string) return fmt.Sprintf("%#v", str) }
go
{ "resource": "" }
c289
setup
train
{ case string: paginator.OutputTokens = []string{t} case []interface{}: toks := []string{} for _, e := range t { s := e.(string) toks = append(toks, s) } paginator.OutputTokens = toks } if o, ok := p.Operations[n]; ok { o.Paginator = &paginator } else { panic("unknown operation for paginator " + n) } } }
go
{ "resource": "" }
c290
WaitUntilAuditReportCreated
train
c.WaitUntilAuditReportCreatedWithContext(aws.BackgroundContext(), input) }
go
{ "resource": "" }
c291
WaitUntilCertificateAuthorityCSRCreated
train
c.WaitUntilCertificateAuthorityCSRCreatedWithContext(aws.BackgroundContext(), input) }
go
{ "resource": "" }
c292
WaitUntilCertificateIssued
train
c.WaitUntilCertificateIssuedWithContext(aws.BackgroundContext(), input) }
go
{ "resource": "" }
c293
StringValue
train
stringValue(reflect.ValueOf(i), 0, &buf) return buf.String() }
go
{ "resource": "" }
c294
SetIntervalMillis
train
s.IntervalMillis = &v return s }
go
{ "resource": "" }
c295
SetTimeoutMillis
train
s.TimeoutMillis = &v return s }
go
{ "resource": "" }
c296
SetMatch
train
*HttpRoute { s.Match = v return s }
go
{ "resource": "" }
c297
SetMeshes
train
[]*MeshRef) *ListMeshesOutput { s.Meshes = v return s }
go
{ "resource": "" }
c298
SetVirtualNodes
train
[]*VirtualNodeRef) *ListVirtualNodesOutput { s.VirtualNodes = v return s }
go
{ "resource": "" }
c299
SetVirtualRouters
train
[]*VirtualRouterRef) *ListVirtualRoutersOutput { s.VirtualRouters = v return s }
go
{ "resource": "" }