_id stringlengths 2 7 | title stringlengths 1 118 | partition stringclasses 3
values | text stringlengths 52 85.5k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q166700 | SetConsumers | train | func (s *ListStreamConsumersOutput) SetConsumers(v []*Consumer) *ListStreamConsumersOutput {
s.Consumers = v
return s
} | go | {
"resource": ""
} |
q166701 | SetExclusiveStartStreamName | train | func (s *ListStreamsInput) SetExclusiveStartStreamName(v string) *ListStreamsInput {
s.ExclusiveStartStreamName = &v
return s
} | go | {
"resource": ""
} |
q166702 | SetHasMoreStreams | train | func (s *ListStreamsOutput) SetHasMoreStreams(v bool) *ListStreamsOutput {
s.HasMoreStreams = &v
return s
} | go | {
"resource": ""
} |
q166703 | SetStreamNames | train | func (s *ListStreamsOutput) SetStreamNames(v []*string) *ListStreamsOutput {
s.StreamNames = v
return s
} | go | {
"resource": ""
} |
q166704 | SetAdjacentShardToMerge | train | func (s *MergeShardsInput) SetAdjacentShardToMerge(v string) *MergeShardsInput {
s.AdjacentShardToMerge = &v
return s
} | go | {
"resource": ""
} |
q166705 | SetShardToMerge | train | func (s *MergeShardsInput) SetShardToMerge(v string) *MergeShardsInput {
s.ShardToMerge = &v
return s
} | go | {
"resource": ""
} |
q166706 | SetSequenceNumberForOrdering | train | func (s *PutRecordInput) SetSequenceNumberForOrdering(v string) *PutRecordInput {
s.SequenceNumberForOrdering = &v
return s
} | go | {
"resource": ""
} |
q166707 | SetFailedRecordCount | train | func (s *PutRecordsOutput) SetFailedRecordCount(v int64) *PutRecordsOutput {
s.FailedRecordCount = &v
return s
} | go | {
"resource": ""
} |
q166708 | SetApproximateArrivalTimestamp | train | func (s *Record) SetApproximateArrivalTimestamp(v time.Time) *Record {
s.ApproximateArrivalTimestamp = &v
return s
} | go | {
"resource": ""
} |
q166709 | SetConsumer | train | func (s *RegisterStreamConsumerOutput) SetConsumer(v *Consumer) *RegisterStreamConsumerOutput {
s.Consumer = v
return s
} | go | {
"resource": ""
} |
q166710 | UnmarshalEvent | train | func (s *ResourceNotFoundException) UnmarshalEvent(
payloadUnmarshaler protocol.PayloadUnmarshaler,
msg eventstream.Message,
) error {
if err := payloadUnmarshaler.UnmarshalPayload(
bytes.NewReader(msg.Payload), s,
); err != nil {
return err
}
return nil
} | go | {
"resource": ""
} |
q166711 | SetAdjacentParentShardId | train | func (s *Shard) SetAdjacentParentShardId(v string) *Shard {
s.AdjacentParentShardId = &v
return s
} | go | {
"resource": ""
} |
q166712 | SetHashKeyRange | train | func (s *Shard) SetHashKeyRange(v *HashKeyRange) *Shard {
s.HashKeyRange = v
return s
} | go | {
"resource": ""
} |
q166713 | SetNewStartingHashKey | train | func (s *SplitShardInput) SetNewStartingHashKey(v string) *SplitShardInput {
s.NewStartingHashKey = &v
return s
} | go | {
"resource": ""
} |
q166714 | SetShardToSplit | train | func (s *SplitShardInput) SetShardToSplit(v string) *SplitShardInput {
s.ShardToSplit = &v
return s
} | go | {
"resource": ""
} |
q166715 | SetHasMoreShards | train | func (s *StreamDescription) SetHasMoreShards(v bool) *StreamDescription {
s.HasMoreShards = &v
return s
} | go | {
"resource": ""
} |
q166716 | SetConsumerCount | train | func (s *StreamDescriptionSummary) SetConsumerCount(v int64) *StreamDescriptionSummary {
s.ConsumerCount = &v
return s
} | go | {
"resource": ""
} |
q166717 | SetContinuationSequenceNumber | train | func (s *SubscribeToShardEvent) SetContinuationSequenceNumber(v string) *SubscribeToShardEvent {
s.ContinuationSequenceNumber = &v
return s
} | go | {
"resource": ""
} |
q166718 | Err | train | func (es *SubscribeToShardEventStream) Err() error {
if err := es.Reader.Err(); err != nil {
return err
}
es.StreamCloser.Close()
return nil
} | go | {
"resource": ""
} |
q166719 | SetCurrentShardCount | train | func (s *UpdateShardCountOutput) SetCurrentShardCount(v int64) *UpdateShardCountOutput {
s.CurrentShardCount = &v
return s
} | go | {
"resource": ""
} |
q166720 | SetBlockType | train | func (s *Block) SetBlockType(v string) *Block {
s.BlockType = &v
return s
} | go | {
"resource": ""
} |
q166721 | SetColumnIndex | train | func (s *Block) SetColumnIndex(v int64) *Block {
s.ColumnIndex = &v
return s
} | go | {
"resource": ""
} |
q166722 | SetColumnSpan | train | func (s *Block) SetColumnSpan(v int64) *Block {
s.ColumnSpan = &v
return s
} | go | {
"resource": ""
} |
q166723 | SetPage | train | func (s *Block) SetPage(v int64) *Block {
s.Page = &v
return s
} | go | {
"resource": ""
} |
q166724 | SetRowIndex | train | func (s *Block) SetRowIndex(v int64) *Block {
s.RowIndex = &v
return s
} | go | {
"resource": ""
} |
q166725 | SetRowSpan | train | func (s *Block) SetRowSpan(v int64) *Block {
s.RowSpan = &v
return s
} | go | {
"resource": ""
} |
q166726 | SetSelectionStatus | train | func (s *Block) SetSelectionStatus(v string) *Block {
s.SelectionStatus = &v
return s
} | go | {
"resource": ""
} |
q166727 | ServiceName | train | func ServiceName(a *API) string {
if oldName, ok := oldServiceNames[a.PackageName()]; ok {
return oldName
}
return ServiceID(a)
} | go | {
"resource": ""
} |
q166728 | loadSharedConfig | train | func loadSharedConfig(profile string, filenames []string) (sharedConfig, error) {
if len(profile) == 0 {
profile = DefaultSharedConfigProfile
}
files, err := loadSharedConfigIniFiles(filenames)
if err != nil {
return sharedConfig{}, err
}
cfg := sharedConfig{}
if err = cfg.setFromIniFiles(profile, files); ... | go | {
"resource": ""
} |
q166729 | setFromIniFile | train | func (cfg *sharedConfig) setFromIniFile(profile string, file sharedConfigFile) error {
section, ok := file.IniData.GetSection(profile)
if !ok {
// Fallback to to alternate profile name: profile <name>
section, ok = file.IniData.GetSection(fmt.Sprintf("profile %s", profile))
if !ok {
return SharedConfigProfil... | go | {
"resource": ""
} |
q166730 | Pad | train | func (padder pkcs7Padder) Pad(buf []byte, n int) ([]byte, error) {
if padder.blockSize < 1 || padder.blockSize > pkcs7MaxPaddingSize {
return nil, awserr.New("InvalidBlockSize", "block size must be between 1 and 255", nil)
}
size := padder.blockSize - (n % padder.blockSize)
pad := bytes.Repeat([]byte{byte(size)},... | go | {
"resource": ""
} |
q166731 | Unpad | train | func (padder pkcs7Padder) Unpad(buf []byte) ([]byte, error) {
if len(buf) == 0 {
return nil, errPKCS7Padding
}
// Here be dragons. We're attempting to check the padding in constant
// time. The only piece of information here which is public is len(buf).
// This code is modeled loosely after tls1_cbc_remove_padd... | go | {
"resource": ""
} |
q166732 | UnmarshalMap | train | func UnmarshalMap(m map[string]*dynamodb.AttributeValue, out interface{}) error {
return NewDecoder().Decode(&dynamodb.AttributeValue{M: m}, out)
} | go | {
"resource": ""
} |
q166733 | UnmarshalList | train | func UnmarshalList(l []*dynamodb.AttributeValue, out interface{}) error {
return NewDecoder().Decode(&dynamodb.AttributeValue{L: l}, out)
} | go | {
"resource": ""
} |
q166734 | UnmarshalListOfMaps | train | func UnmarshalListOfMaps(l []map[string]*dynamodb.AttributeValue, out interface{}) error {
items := make([]*dynamodb.AttributeValue, len(l))
for i, m := range l {
items[i] = &dynamodb.AttributeValue{M: m}
}
return UnmarshalList(items, out)
} | go | {
"resource": ""
} |
q166735 | NewDecoder | train | func NewDecoder(opts ...func(*Decoder)) *Decoder {
d := &Decoder{
MarshalOptions: MarshalOptions{
SupportJSONTags: true,
},
}
for _, o := range opts {
o(d)
}
return d
} | go | {
"resource": ""
} |
q166736 | Decode | train | func (d *Decoder) Decode(av *dynamodb.AttributeValue, out interface{}, opts ...func(*Decoder)) error {
v := reflect.ValueOf(out)
if v.Kind() != reflect.Ptr || v.IsNil() || !v.IsValid() {
return &InvalidUnmarshalError{Type: reflect.TypeOf(out)}
}
return d.decode(av, v, tag{})
} | go | {
"resource": ""
} |
q166737 | Error | train | func (e *UnmarshalError) Error() string {
return fmt.Sprintf("%s: %s\ncaused by: %v", e.Code(), e.Message(), e.Err)
} | go | {
"resource": ""
} |
q166738 | Message | train | func (e *UnmarshalError) Message() string {
return fmt.Sprintf("cannot unmarshal %q into %s.",
e.Value, e.Type.String())
} | go | {
"resource": ""
} |
q166739 | SetActiveNodes | train | func (s *Cluster) SetActiveNodes(v int64) *Cluster {
s.ActiveNodes = &v
return s
} | go | {
"resource": ""
} |
q166740 | SetClusterDiscoveryEndpoint | train | func (s *Cluster) SetClusterDiscoveryEndpoint(v *Endpoint) *Cluster {
s.ClusterDiscoveryEndpoint = v
return s
} | go | {
"resource": ""
} |
q166741 | SetTotalNodes | train | func (s *Cluster) SetTotalNodes(v int64) *Cluster {
s.TotalNodes = &v
return s
} | go | {
"resource": ""
} |
q166742 | SetReplicationFactor | train | func (s *CreateClusterInput) SetReplicationFactor(v int64) *CreateClusterInput {
s.ReplicationFactor = &v
return s
} | go | {
"resource": ""
} |
q166743 | SetClusterNames | train | func (s *DescribeClustersInput) SetClusterNames(v []*string) *DescribeClustersInput {
s.ClusterNames = v
return s
} | go | {
"resource": ""
} |
q166744 | SetParameterGroupNames | train | func (s *DescribeParameterGroupsInput) SetParameterGroupNames(v []*string) *DescribeParameterGroupsInput {
s.ParameterGroupNames = v
return s
} | go | {
"resource": ""
} |
q166745 | SetSubnetGroupNames | train | func (s *DescribeSubnetGroupsInput) SetSubnetGroupNames(v []*string) *DescribeSubnetGroupsInput {
s.SubnetGroupNames = v
return s
} | go | {
"resource": ""
} |
q166746 | SetSubnetGroups | train | func (s *DescribeSubnetGroupsOutput) SetSubnetGroups(v []*SubnetGroup) *DescribeSubnetGroupsOutput {
s.SubnetGroups = v
return s
} | go | {
"resource": ""
} |
q166747 | SetNodeCreateTime | train | func (s *Node) SetNodeCreateTime(v time.Time) *Node {
s.NodeCreateTime = &v
return s
} | go | {
"resource": ""
} |
q166748 | SetNodeStatus | train | func (s *Node) SetNodeStatus(v string) *Node {
s.NodeStatus = &v
return s
} | go | {
"resource": ""
} |
q166749 | SetTopicStatus | train | func (s *NotificationConfiguration) SetTopicStatus(v string) *NotificationConfiguration {
s.TopicStatus = &v
return s
} | go | {
"resource": ""
} |
q166750 | SetNodeTypeSpecificValues | train | func (s *Parameter) SetNodeTypeSpecificValues(v []*NodeTypeSpecificValue) *Parameter {
s.NodeTypeSpecificValues = v
return s
} | go | {
"resource": ""
} |
q166751 | SetNodeIdsToReboot | train | func (s *ParameterGroupStatus) SetNodeIdsToReboot(v []*string) *ParameterGroupStatus {
s.NodeIdsToReboot = v
return s
} | go | {
"resource": ""
} |
q166752 | SetSecurityGroupIdentifier | train | func (s *SecurityGroupMembership) SetSecurityGroupIdentifier(v string) *SecurityGroupMembership {
s.SecurityGroupIdentifier = &v
return s
} | go | {
"resource": ""
} |
q166753 | NewSharedCredentials | train | func NewSharedCredentials(filename, profile string) *Credentials {
return NewCredentials(&SharedCredentialsProvider{
Filename: filename,
Profile: profile,
})
} | go | {
"resource": ""
} |
q166754 | filename | train | func (p *SharedCredentialsProvider) filename() (string, error) {
if len(p.Filename) != 0 {
return p.Filename, nil
}
if p.Filename = os.Getenv("AWS_SHARED_CREDENTIALS_FILE"); len(p.Filename) != 0 {
return p.Filename, nil
}
if home := shareddefaults.UserHomeDir(); len(home) == 0 {
// Backwards compatibility ... | go | {
"resource": ""
} |
q166755 | profile | train | func (p *SharedCredentialsProvider) profile() string {
if p.Profile == "" {
p.Profile = os.Getenv("AWS_PROFILE")
}
if p.Profile == "" {
p.Profile = "default"
}
return p.Profile
} | go | {
"resource": ""
} |
q166756 | Decode | train | func (d *Decoder) Decode(payloadBuf []byte) (m Message, err error) {
reader := d.r
if d.logger != nil {
debugMsgBuf := bytes.NewBuffer(nil)
reader = io.TeeReader(reader, debugMsgBuf)
defer func() {
logMessageDecode(d.logger, debugMsgBuf, m, err)
}()
}
crc := crc32.New(crc32IEEETable)
hashReader := io.T... | go | {
"resource": ""
} |
q166757 | SetIsOptedOut | train | func (s *CheckIfPhoneNumberIsOptedOutOutput) SetIsOptedOut(v bool) *CheckIfPhoneNumberIsOptedOutOutput {
s.IsOptedOut = &v
return s
} | go | {
"resource": ""
} |
q166758 | SetAuthenticateOnUnsubscribe | train | func (s *ConfirmSubscriptionInput) SetAuthenticateOnUnsubscribe(v string) *ConfirmSubscriptionInput {
s.AuthenticateOnUnsubscribe = &v
return s
} | go | {
"resource": ""
} |
q166759 | SetCustomUserData | train | func (s *CreatePlatformEndpointInput) SetCustomUserData(v string) *CreatePlatformEndpointInput {
s.CustomUserData = &v
return s
} | go | {
"resource": ""
} |
q166760 | SetPlatformApplications | train | func (s *ListPlatformApplicationsOutput) SetPlatformApplications(v []*PlatformApplication) *ListPlatformApplicationsOutput {
s.PlatformApplications = v
return s
} | go | {
"resource": ""
} |
q166761 | SetMessageStructure | train | func (s *PublishInput) SetMessageStructure(v string) *PublishInput {
s.MessageStructure = &v
return s
} | go | {
"resource": ""
} |
q166762 | SetReturnSubscriptionArn | train | func (s *SubscribeInput) SetReturnSubscriptionArn(v bool) *SubscribeInput {
s.ReturnSubscriptionArn = &v
return s
} | go | {
"resource": ""
} |
q166763 | SetStreamingStatus | train | func (s *CognitoStreams) SetStreamingStatus(v string) *CognitoStreams {
s.StreamingStatus = &v
return s
} | go | {
"resource": ""
} |
q166764 | SetNumRecords | train | func (s *Dataset) SetNumRecords(v int64) *Dataset {
s.NumRecords = &v
return s
} | go | {
"resource": ""
} |
q166765 | SetIdentityPoolUsage | train | func (s *DescribeIdentityPoolUsageOutput) SetIdentityPoolUsage(v *IdentityPoolUsage) *DescribeIdentityPoolUsageOutput {
s.IdentityPoolUsage = v
return s
} | go | {
"resource": ""
} |
q166766 | SetIdentityUsage | train | func (s *DescribeIdentityUsageOutput) SetIdentityUsage(v *IdentityUsage) *DescribeIdentityUsageOutput {
s.IdentityUsage = v
return s
} | go | {
"resource": ""
} |
q166767 | SetBulkPublishCompleteTime | train | func (s *GetBulkPublishDetailsOutput) SetBulkPublishCompleteTime(v time.Time) *GetBulkPublishDetailsOutput {
s.BulkPublishCompleteTime = &v
return s
} | go | {
"resource": ""
} |
q166768 | SetBulkPublishStartTime | train | func (s *GetBulkPublishDetailsOutput) SetBulkPublishStartTime(v time.Time) *GetBulkPublishDetailsOutput {
s.BulkPublishStartTime = &v
return s
} | go | {
"resource": ""
} |
q166769 | SetBulkPublishStatus | train | func (s *GetBulkPublishDetailsOutput) SetBulkPublishStatus(v string) *GetBulkPublishDetailsOutput {
s.BulkPublishStatus = &v
return s
} | go | {
"resource": ""
} |
q166770 | SetSyncSessionsCount | train | func (s *IdentityPoolUsage) SetSyncSessionsCount(v int64) *IdentityPoolUsage {
s.SyncSessionsCount = &v
return s
} | go | {
"resource": ""
} |
q166771 | SetDatasetCount | train | func (s *IdentityUsage) SetDatasetCount(v int64) *IdentityUsage {
s.DatasetCount = &v
return s
} | go | {
"resource": ""
} |
q166772 | SetDatasets | train | func (s *ListDatasetsOutput) SetDatasets(v []*Dataset) *ListDatasetsOutput {
s.Datasets = v
return s
} | go | {
"resource": ""
} |
q166773 | SetIdentityPoolUsages | train | func (s *ListIdentityPoolUsageOutput) SetIdentityPoolUsages(v []*IdentityPoolUsage) *ListIdentityPoolUsageOutput {
s.IdentityPoolUsages = v
return s
} | go | {
"resource": ""
} |
q166774 | SetLastSyncCount | train | func (s *ListRecordsInput) SetLastSyncCount(v int64) *ListRecordsInput {
s.LastSyncCount = &v
return s
} | go | {
"resource": ""
} |
q166775 | SetDatasetDeletedAfterRequestedSyncCount | train | func (s *ListRecordsOutput) SetDatasetDeletedAfterRequestedSyncCount(v bool) *ListRecordsOutput {
s.DatasetDeletedAfterRequestedSyncCount = &v
return s
} | go | {
"resource": ""
} |
q166776 | SetDatasetExists | train | func (s *ListRecordsOutput) SetDatasetExists(v bool) *ListRecordsOutput {
s.DatasetExists = &v
return s
} | go | {
"resource": ""
} |
q166777 | SetDatasetSyncCount | train | func (s *ListRecordsOutput) SetDatasetSyncCount(v int64) *ListRecordsOutput {
s.DatasetSyncCount = &v
return s
} | go | {
"resource": ""
} |
q166778 | SetMergedDatasetNames | train | func (s *ListRecordsOutput) SetMergedDatasetNames(v []*string) *ListRecordsOutput {
s.MergedDatasetNames = v
return s
} | go | {
"resource": ""
} |
q166779 | SetApplicationArns | train | func (s *PushSync) SetApplicationArns(v []*string) *PushSync {
s.ApplicationArns = v
return s
} | go | {
"resource": ""
} |
q166780 | SetRecordPatches | train | func (s *UpdateRecordsInput) SetRecordPatches(v []*RecordPatch) *UpdateRecordsInput {
s.RecordPatches = v
return s
} | go | {
"resource": ""
} |
q166781 | SetB | train | func (s *AttributeValue) SetB(v []byte) *AttributeValue {
s.B = v
return s
} | go | {
"resource": ""
} |
q166782 | SetBOOL | train | func (s *AttributeValue) SetBOOL(v bool) *AttributeValue {
s.BOOL = &v
return s
} | go | {
"resource": ""
} |
q166783 | SetBS | train | func (s *AttributeValue) SetBS(v [][]byte) *AttributeValue {
s.BS = v
return s
} | go | {
"resource": ""
} |
q166784 | SetL | train | func (s *AttributeValue) SetL(v []*AttributeValue) *AttributeValue {
s.L = v
return s
} | go | {
"resource": ""
} |
q166785 | SetM | train | func (s *AttributeValue) SetM(v map[string]*AttributeValue) *AttributeValue {
s.M = v
return s
} | go | {
"resource": ""
} |
q166786 | SetNS | train | func (s *AttributeValue) SetNS(v []*string) *AttributeValue {
s.NS = v
return s
} | go | {
"resource": ""
} |
q166787 | SetNULL | train | func (s *AttributeValue) SetNULL(v bool) *AttributeValue {
s.NULL = &v
return s
} | go | {
"resource": ""
} |
q166788 | SetS | train | func (s *AttributeValue) SetS(v string) *AttributeValue {
s.S = &v
return s
} | go | {
"resource": ""
} |
q166789 | SetSS | train | func (s *AttributeValue) SetSS(v []*string) *AttributeValue {
s.SS = v
return s
} | go | {
"resource": ""
} |
q166790 | SetScalingPolicyUpdate | train | func (s *AutoScalingSettingsUpdate) SetScalingPolicyUpdate(v *AutoScalingPolicyUpdate) *AutoScalingSettingsUpdate {
s.ScalingPolicyUpdate = v
return s
} | go | {
"resource": ""
} |
q166791 | SetSourceTableDetails | train | func (s *BackupDescription) SetSourceTableDetails(v *SourceTableDetails) *BackupDescription {
s.SourceTableDetails = v
return s
} | go | {
"resource": ""
} |
q166792 | SetSourceTableFeatureDetails | train | func (s *BackupDescription) SetSourceTableFeatureDetails(v *SourceTableFeatureDetails) *BackupDescription {
s.SourceTableFeatureDetails = v
return s
} | go | {
"resource": ""
} |
q166793 | SetUnprocessedItems | train | func (s *BatchWriteItemOutput) SetUnprocessedItems(v map[string][]*WriteRequest) *BatchWriteItemOutput {
s.UnprocessedItems = v
return s
} | go | {
"resource": ""
} |
q166794 | SetLastUpdateToPayPerRequestDateTime | train | func (s *BillingModeSummary) SetLastUpdateToPayPerRequestDateTime(v time.Time) *BillingModeSummary {
s.LastUpdateToPayPerRequestDateTime = &v
return s
} | go | {
"resource": ""
} |
q166795 | SetContinuousBackupsStatus | train | func (s *ContinuousBackupsDescription) SetContinuousBackupsStatus(v string) *ContinuousBackupsDescription {
s.ContinuousBackupsStatus = &v
return s
} | go | {
"resource": ""
} |
q166796 | SetPointInTimeRecoveryDescription | train | func (s *ContinuousBackupsDescription) SetPointInTimeRecoveryDescription(v *PointInTimeRecoveryDescription) *ContinuousBackupsDescription {
s.PointInTimeRecoveryDescription = v
return s
} | go | {
"resource": ""
} |
q166797 | SetAccountMaxReadCapacityUnits | train | func (s *DescribeLimitsOutput) SetAccountMaxReadCapacityUnits(v int64) *DescribeLimitsOutput {
s.AccountMaxReadCapacityUnits = &v
return s
} | go | {
"resource": ""
} |
q166798 | SetAccountMaxWriteCapacityUnits | train | func (s *DescribeLimitsOutput) SetAccountMaxWriteCapacityUnits(v int64) *DescribeLimitsOutput {
s.AccountMaxWriteCapacityUnits = &v
return s
} | go | {
"resource": ""
} |
q166799 | SetTableMaxReadCapacityUnits | train | func (s *DescribeLimitsOutput) SetTableMaxReadCapacityUnits(v int64) *DescribeLimitsOutput {
s.TableMaxReadCapacityUnits = &v
return s
} | go | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.