anchor stringlengths 10 14.3k | positive stringlengths 10 14.9k |
|---|---|
An array of string values. If the operator is In or NotIn, the values array must be nonempty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a stra... | func (o QperfSpecClientConfigurationPodSchedulingAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchExpressionsOutput) Values() pulumi.StringArrayOutput {
return o.ApplyT(func(v QperfSpecClientConfigurationPodSchedulingAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecut... |
EncryptText does not decrypt, just sends the text back as plaintext | func (v nullVault) DecryptText(text string) (string, error) {
return text, nil
} |
Get sends a simple Get requests to specific endpoint | func (c *Client) Get(endpoint string, params map[string]string) *grequests.Response {
url := c.Endpoint + endpoint
resp, err := grequests.Get(url, &grequests.RequestOptions{
Params: params,
})
if err != nil {
utilities.CheckError(resp.Error, "Unable to make requests")
}
if resp.Ok != true {
log.Println("Re... |
ProcessAccountToUmodeChange processes Add/Remove/List operations for channel persistent usermodes. | func (channel *Channel) ProcessAccountToUmodeChange(client *Client, change modes.ModeChange) (results []modes.ModeChange, err error) {
changed := false
defer func() {
if changed {
channel.MarkDirty(IncludeLists)
}
}()
account := client.Account()
isOperChange := client.HasRoleCapabs("chanreg")
channel.sta... |
Save creates the App in the database. | func (ac *AppCreate) Save(ctx context.Context) (*App, error) {
if err := ac.preSave(); err != nil {
return nil, err
}
var (
err error
node *App
)
if len(ac.hooks) == 0 {
node, err = ac.sqlSave(ctx)
} else {
var mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {
mutation,... |
GetFirstInstance implement init mul level proxy, RealInstance and proxys make sure both implement the same interface return firstProxy | realInstance | func (this *ProxyFactory) GetFirstInstance(realName string, realInstance interface{}, proxys ...func() interface{}) interface{} {
var firstProxy interface{}
var proxyInses []interface{}
proxyInses = this.GetInstances(realName, proxys...)
proxyNum := len(proxyInses)
if proxyNum > 0 {
firstProxy = proxyInses[0]... |
Required. A pod affinity term, associated with the corresponding weight. | func (o IopingSpecPodConfigPodSchedulingAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionOutput) PodAffinityTerm() IopingSpecPodConfigPodSchedulingAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermOutput {
return o.ApplyT(func(v IopingSpecPodConfigPodSchedulingAffinityPo... |
updateHandleResponse handles the Update response. | func (client *DataCollectionEndpointsClient) updateHandleResponse(resp *http.Response) (DataCollectionEndpointsUpdateResponse, error) {
result := DataCollectionEndpointsUpdateResponse{RawResponse: resp}
if err := runtime.UnmarshalAsJSON(resp, &result.DataCollectionEndpointResource); err != nil {
return DataCollecti... |
String returns a text representation of this operation | func (o DelayTimerOp) String() string {
return fmt.Sprintf("DT = V%X", o.register)
} |
XXX_OneofFuncs is for the internal use of the proto package. | func (*ChannelPoint) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _ChannelPoint_OneofMarshaler, _ChannelPoint_OneofUnmarshaler, _ChannelPoint_OneofSizer, []interface{}{
... |
ByteCount returns the number of bytes required to serialize the object. | func (f *CreateBundleReply) ByteCount() int {
return 4
} |
IterateLocalData iterates over all record with specified prefix and calls handler with key and value of that record. The key will be returned without prefix (e.g. the remaining slice) and value will be returned as it was saved. | func (db *DB) IterateLocalData(ctx context.Context, pulse core.PulseNumber, prefix []byte, handler func(k, v []byte) error) error {
fullPrefix := bytes.Join([][]byte{{scopeIDLocal}, pulse.Bytes(), prefix}, nil)
return db.db.View(func(txn *badger.Txn) error {
it := txn.NewIterator(badger.DefaultIteratorOptions)
d... |
Debugln is Logln with DebugLevel | func (v *MultiLogger) Debugln(args ...interface{}) {
v.Self().Logln(logrus.DebugLevel, args...)
} |
newJobRunner returns a new job runner with the provided agent configuration. | func newJobRunner(cfg config.Config, back backend.Backend, updater jobrunner.CheckStateUpdater, logger log.Logger) (*jobrunner.Runner, error) {
// Build the aborted checks component that will be used to know if a check
// has been aborted or not before starting to execute it.
var (
err error
abortedChe... |
ClearDuty clears the value of the "duty" field. | func (m *OrgUnitPositionMutation) ClearDuty() {
m.duty = nil
m.clearedFields[orgunitposition.FieldDuty] = struct{}{}
} |
An array of string values. If the operator is In or NotIn, the values array must be nonempty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a stra... | func (o PgbenchSpecPodConfigPodSchedulingAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchExpressionsOutput) Values() pulumi.StringArrayOutput {
return o.ApplyT(func(v PgbenchSpecPodConfigPodSchedulingAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorT... |
Err returns the first error returned by a factory func or nil if there was none. | func (r *Registry) Err() error {
return r.err
} |
DurationOrDefault returns the default value (or 0) if input is nil, otherwise returns the referenced value. | func DurationOrDefault(input *time.Duration, defaultValue ...time.Duration) time.Duration {
if input == nil {
if len(defaultValue) > 0 {
return defaultValue[0]
}
return 0
}
return *input
} |
Next returns the node that follows this one | func (e *Node) Next() *Node {
return e.next
} |
Enables a rule. If the rule does not exist, the operation fails. Note: When you make a change with this action, incoming events might not immediately start matching to a newly enabled rule. Please allow a short period of time for changes to take effect. | func (c *CloudWatchEvents) EnableRule(input *EnableRuleInput) (*EnableRuleOutput, error) {
req, out := c.EnableRuleRequest(input)
err := req.Send()
return out, err
} |
HasIsRead returns a boolean if a field has been set. | func (o *InlineResponse200115) HasIsRead() bool {
if o != nil && o.IsRead != nil {
return true
}
return false
} |
An array of string values. If the operator is In or NotIn, the values array must be nonempty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a stra... | func (o IopingSpecPodConfigPodSchedulingAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchFieldsOutput) Values() pulumi.StringArrayOutput {
return o.ApplyT(func(v IopingSpecPodConfigPodSchedulingAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchFields) []... |
GetRbls returns all rbls from the config | func (c *Config) GetRbls(cfg *ini.File) []string {
return cfg.Section("rbl").Key("server").ValueWithShadows()
} |
Describes node affinity scheduling rules for the pod. | func (o SysbenchSpecPodSchedulingAffinityOutput) NodeAffinity() SysbenchSpecPodSchedulingAffinityNodeAffinityPtrOutput {
return o.ApplyT(func(v SysbenchSpecPodSchedulingAffinity) *SysbenchSpecPodSchedulingAffinityNodeAffinity {
return v.NodeAffinity
}).(SysbenchSpecPodSchedulingAffinityNodeAffinityPtrOutput)
} |
QueryGroups finds Groups in the DB that match parameters given in the 'query' map | func (stor *arrayGroupStorage) Query(query map[string]interface{}) (out []Group) {
stor.lock.RLock()
defer stor.lock.RUnlock()
// nil means get all - we copy the slice so modifications don't disturb the DB
if query == nil {
out = make([]Group, len(stor.db))
copy(out, stor.db)
return
}
for _, Group := range ... |
Add registers ric entry. | func (t *RicTable) Add(c *RicEntry) {
t.Mutex.Lock()
defer t.Mutex.Unlock()
t.Entries[c.Rt] = c
} |
NewSlackBot returns new Bot object | func NewSlackBot() *Bot {
c, err := config.New()
if err != nil {
logging.Logger.Fatal(fmt.Sprintf("Error in loading configuration. Error:%s", err.Error()))
}
return &Bot{
Token: c.Communications.Slack.Token,
AllowKubectl: c.Settings.AllowKubectl,
}
} |
Insert inserts keyvalue to the map | func (this *Map) Insert(key, value interface{}) {
node := this.tree.FindNode(key)
if node != nil {
node.SetValue(value)
return
}
this.tree.Insert(key, value)
} |
NewRedisQueueWithFunc returns new RedisStore with specified push and pop func | func NewRedisQueueWithFunc(
r *redis.Client,
push func(interface{}) (interface{}, error),
pop func(interface{}) (interface{}, error)) *RedisQueue {
return &RedisQueue{
key: fmt.Sprintf("queue:%v", time.Now().Nanosecond()),
r: r,
push: push,
pop: pop,
}
} |
GetStackTags mocks base method. | func (m *MockCfnClient) GetStackTags(stackName string) (map[string]string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetStackTags", stackName)
ret0, _ := ret[0].(map[string]string)
ret1, _ := ret[1].(error)
return ret0, ret1
} |
UnmarshalJSON supports json.Unmarshaler interface | func (v *EventPlayerEventsAdded) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia4(&r, v)
return r.Error()
} |
ChainStreamClient creates a single interceptor out of a chain of many interceptors. Execution is done in lefttoright order, including passing of context. For example ChainStreamClient(one, two, three) will execute one before two before three. | func ChainStreamClient(interceptors ...grpc.StreamClientInterceptor) grpc.StreamClientInterceptor {
n := len(interceptors)
// interceptors length more than 1.
if n > 1 {
// chain callback function.
var chain func(idx int, ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer g... |
/ need to store a map of which keys need to be nonrepeating | func PushKeyOnce(k string) bool {
if k != prevkey {
prevkey = k
return true
}
prevkey = k
return false
} |
return parameters of a buffer object | func GetBufferParameteri64v(target uint32, pname uint32, params *int64) {
C.glowGetBufferParameteri64v(gpGetBufferParameteri64v, (C.GLenum)(target), (C.GLenum)(pname), (*C.GLint64)(unsafe.Pointer(params)))
} |
ReadOnly here will force the NFS export to be mounted with readonly permissions. Defaults to false. More info: | func (o IopingSpecVolumeVolumeSourceNfsPtrOutput) ReadOnly() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *IopingSpecVolumeVolumeSourceNfs) *bool {
if v == nil {
return nil
}
return v.ReadOnly
}).(pulumi.BoolPtrOutput)
} |
ResetContagion reset all changes of the "Contagion" field. | func (m *DiseaseMutation) ResetContagion() {
m._Contagion = nil
} |
GenDefaultID uses "" and does a sha1 hash. | func (b *Base) GenDefaultID() string {
s := fmt.Sprintf("%s-%d", b.GetLastSource(), b.Time.UnixNano())
return Sha1HashString(s)
} |
ListByKind provides a mock function with given fields: kind | func (_m *VirtualMachine) ListByKind(kind vm.Kind) ([]vm.VirtualMachine, error) {
ret := _m.Called(kind)
var r0 []vm.VirtualMachine
if rf, ok := ret.Get(0).(func(vm.Kind) []vm.VirtualMachine); ok {
r0 = rf(kind)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]vm.VirtualMachine)
}
}
var r1 error
if ... |
RunJSONSerializationTestForHostNameMatchConditionParameters_STATUS runs a test to see if a specific instance of HostNameMatchConditionParameters_STATUS round trips to JSON and back losslessly | func RunJSONSerializationTestForHostNameMatchConditionParameters_STATUS(subject HostNameMatchConditionParameters_STATUS) string {
// Serialize to JSON
bin, err := json.Marshal(subject)
if err != nil {
return err.Error()
}
// Deserialize back into memory
var actual HostNameMatchConditionParameters_STATUS
err =... |
/ 1. verify(zkproof) 2, check tree root hash exist 3, check authorize pubkey hash in config or not 4. check authorize hash if exist in authorize pool 5. set authorize hash and authorize_spend hash | func (a *action) Authorize(authorize *mixTy.MixAuthorizeAction) (*types.Receipt, error) {
execer, symbol := mixTy.GetAssetExecSymbol(a.api.GetConfig(), authorize.AssetExec, authorize.AssetSymbol)
input, err := a.authorizePubInputs(execer, symbol, authorize.ProofInfo)
if err != nil {
return nil, err
}
//zk-proo... |
LoadProviders loads the configured external providers. | func (pv *Providers) LoadProviders(c *config.Config) error {
pv.mu.Lock()
defer pv.mu.Unlock()
pv.internal = c.Provider()
for name, v := range c.Providers {
err := pv.useProvider(name, v.ClientKey, v.Secret, v.CallbackURL, v.Scopes...)
if err != nil {
err = fmt.Errorf("load %s provider failed: %w", name, err... |
New returns an instance of docsy. | func New(hugoExe string, docsyDir string, docPath string) *docsy {
return &docsy{
hugoExe: hugoExe,
docsyDir: docsyDir,
docPath: docPath,
renderMetric: metrics2.GetFloat64SummaryMetric("docsyserver_docsy_render"),
}
} |
Modify adds a query modifier for attaching custom logic to queries. | func (ouq *OrgUnitQuery) Modify(modifiers ...func(s *sql.Selector)) *OrgUnitSelect {
ouq.modifiers = append(ouq.modifiers, modifiers...)
return ouq.Select()
} |
SpendOutput is a paid mutator transaction binding the contract method 0x57d61c0b. Solidity: function spendOutput(bytes32 _root, bytes32 _id) returns(uint256) | func (_OutboxEntry *OutboxEntrySession) SpendOutput(_root [32]byte, _id [32]byte) (*types.Transaction, error) {
return _OutboxEntry.Contract.SpendOutput(&_OutboxEntry.TransactOpts, _root, _id)
} |
NewEntityCollection return a collection of entity. | func (impl *Server) NewEntityCollection() interface{} {
return new([]entity.Server)
} |
GetAllPlants is a function used by our gRPC server to return plant by a given name | func (s *Server) GetAllPlants(ctx context.Context, e *Empty) (*Plants, error) {
plants, err := getAllPlantsFromDB()
if err != nil {
log.Fatalf("Failure fetching all the plants from the DB: %s\n", err)
}
return plants, nil
} |
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NopOperator. | func (in *NopOperator) DeepCopy() *NopOperator {
if in == nil {
return nil
}
out := new(NopOperator)
in.DeepCopyInto(out)
return out
} |
Reusable update batch function. Provide a query and an array of argument arrays to pass to that query. | func updateBatch(db *IndexerDb, updateQuery string, data [][]interface{}) error {
db.accountingLock.Lock()
defer db.accountingLock.Unlock()
tx, err := db.db.Begin()
if err != nil {
return err
}
defer tx.Rollback() // ignored if .Commit() first
update, err := tx.Prepare(updateQuery)
if err != nil {
return ... |
MaxKey returns the maximum key having the given searchPrefix, or the maximum key in the whole index if searchIndex is nil. Maximum means the last key in the lexicographic order. If keys are uint64 in BigEndian it is also the largest number. If ok is false the index is empty. For example, if we store temperature reading... | func (idx *Tree) MaxKey(searchPrefix []byte) (v uint64, ok bool) {
raw, _ := idx.partialSearch(searchPrefix)
if raw == 0 {
return 0, false
}
if isLeaf(raw) {
return getLeafValue(raw), true
}
// now find the max
searchLoop:
for {
_, node, count, prefixLen := explodeNode(raw)
block := int(node >> blockSlot... |
Parameters: DbName TblName PartVals MaxParts | func (p *ThriftHiveMetastoreClient) GetPartitionNamesPs(ctx context.Context, db_name string, tbl_name string, part_vals []string, max_parts int16) (r []string, err error) {
var _args94 ThriftHiveMetastoreGetPartitionNamesPsArgs
_args94.DbName = db_name
_args94.TblName = tbl_name
_args94.PartVals = part_vals
_... |
GetMarketDetail returns the ticker for the specified symbol | func (h *HUOBI) GetMarketDetail(ctx context.Context, symbol currency.Pair) (Detail, error) {
vals := url.Values{}
symbolValue, err := h.FormatSymbol(symbol, asset.Spot)
if err != nil {
return Detail{}, err
}
vals.Set("symbol", symbolValue)
type response struct {
Response
Tick Detail `json:"tick"`
}
var ... |
add Creator credentials Username, Password | func (t *SimpleChaincode) creatorCredentials(APIstub shim.ChaincodeStubInterface, args []string) pb.Response {
if len(args) != 2 {
return shim.Error("Incorrect number of arguments. Expecting 2")
}
if len(args[0]) <= 0 {
return shim.Error("1 argument must be a non-empty string")
}
if len(args[1]) <= 0 {
retu... |
NewOptions creates a new OptionsProvider. | func NewOptions(spec Spec) *OptionsProvider {
o := &OptionsProvider{spec, make(map[string]string), make(map[string]bool)}
v := reflect.ValueOf(spec)
if v.CanSet() {
panic(fmt.Sprintf("The spec passed in must be a pointer, got type %v",
v.Type().Name()))
}
v = v.Elem()
specType := v.Type()
for i := 0; i < sp... |
GetPeerByIdx is a compatibility function for getting a peer by its "peer id". | func (pm *PeerManager) GetPeerByIdx(id int32) *Peer {
if id < 0 || id >= int32(len(pm.peers)) {
return nil
}
return pm.peerMap[pm.peers[id]]
} |
GetLastUpdated returns the LastUpdated field value if set, zero value otherwise. | func (o *ArchivedAnalysis) GetLastUpdated() time.Time {
if o == nil || o.LastUpdated == nil {
var ret time.Time
return ret
}
return *o.LastUpdated
} |
logging a method calling information | func WithMethodCallingLoggerServerInterceptor(logger *logger.Logger) grpc.UnaryServerInterceptor {
return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) {
l := logger.WithServiceInfo(info.FullMethod)
requestID := GetRequestIDFromConte... |
Start initializes the server | func (s *Server) Start() error {
address := s.Address
if address == "" {
address = "0.0.0.0"
}
addr := fmt.Sprintf("%s:%d", address, s.Port)
s.httpServer = &http.Server{
Addr: addr,
Handler: s.Routes(),
}
return s.httpServer.ListenAndServe()
} |
IncStarted Increments perfunction instancestarted counter | func (cs *Stats) IncStarted(fID string) {
atomic.AddUint64(&cs.statMap[fID].started, 1)
} |
handleObject enqueues CHI which is owner of `obj` into reconcile loop | func (c *Controller) handleObject(obj interface{}) {
// TODO review
object, ok := obj.(metaV1.Object)
if !ok {
ts, ok := obj.(cache.DeletedFinalStateUnknown)
if !ok {
utilRuntime.HandleError(fmt.Errorf(messageUnableToDecode))
return
}
object, ok = ts.Obj.(metaV1.Object)
if !ok {
utilRuntime.Handle... |
New returns a new Bar | func New(fore, back color.Color, width, height int) *Bar {
c := xdom.Canvas()
c.Width = width
c.Height = height
r, g, b, _ := fore.RGBA()
foreground := "rgb(" + strconv.Itoa(int(r>>8)) + ", " + strconv.Itoa(int(g>>8)) + ", " + strconv.Itoa(int(b>>8)) + ")"
r, g, b, _ = back.RGBA()
background := "rgb(" + strconv.... |
Port number to connect to at the server host | func (o PgbenchSpecPostgresOutput) Port() pulumi.IntOutput {
return o.ApplyT(func(v PgbenchSpecPostgres) int { return v.Port }).(pulumi.IntOutput)
} |
Closed returns a channel that is closed when the multiplexer is closed (due to either internal failure or a manual call to Close). | func (m *Multiplexer) Closed() <-chan struct{} {
return m.closed
} |
Timeout per request to WooCommerce API | func (o *Basic) Timeout() int {
if 0 == o.Options.Timeout {
return timeout
}
return o.Options.Timeout
} |
Structs wrapping struct: cel.EvalDetails export cel_EvalDetails_CTor | func cel_EvalDetails_CTor() CGoHandle {
return CGoHandle(handleFromPtr_cel_EvalDetails(&cel.EvalDetails{}))
} |
SetIncludedFields adds the includedFields to the list n s groups params | func (o *ListNSGroupsParams) SetIncludedFields(includedFields *string) {
o.IncludedFields = includedFields
} |
UnmarshalSDTSlice unmarshals polymorphic slices of SDT | func UnmarshalSDTSlice(reader io.Reader, consumer runtime.Consumer) ([]SDT, error) {
var elements []json.RawMessage
if err := consumer.Consume(reader, &elements); err != nil {
return nil, err
}
var result []SDT
for _, element := range elements {
obj, err := unmarshalSDT(element, consumer)
if err != nil {
... |
String returns the string representation | func (s ListGlobalTablesInput) String() string {
return awsutil.Prettify(s)
} |
IsURL if the given string is an url | func IsURL(url string, strict bool) bool {
if strict {
return urlStrictReg.MatchString(url)
}
return urlReg.MatchString(url)
} |
OldDiagnosisDate returns the old DiagnosisDate value of the Diagnosis. If the Diagnosis object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails. | func (m *DiagnosisMutation) OldDiagnosisDate(ctx context.Context) (v string, err error) {
if !m.op.Is(OpUpdateOne) {
return v, fmt.Errorf("OldDiagnosisDate is allowed only on UpdateOne operations")
}
if m.id == nil || m.oldValue == nil {
return v, fmt.Errorf("OldDiagnosisDate requires an ID field in the mutation... |
If true, enables Kubernetes audit logs as a data source for [Kubernetes protection]( Defaults to `true`. | func (o DetectorDatasourcesKubernetesAuditLogsOutput) Enable() pulumi.BoolOutput {
return o.ApplyT(func(v DetectorDatasourcesKubernetesAuditLogs) bool { return v.Enable }).(pulumi.BoolOutput)
} |
AccountLevelsAddr is a free data retrieval call binding the contract method 0xf3412942. Solidity: function accountLevelsAddr() constant returns(address) | func (_EtherDelta *EtherDeltaSession) AccountLevelsAddr() (common.Address, error) {
return _EtherDelta.Contract.AccountLevelsAddr(&_EtherDelta.CallOpts)
} |
ignore secret and id since those are set by the server | func assertEqualWebhook(t *testing.T, a, b *linkedca.Webhook) {
assert.Equal(t, a.Name, b.Name)
assert.Equal(t, a.Url, b.Url)
assert.Equal(t, a.Kind, b.Kind)
assert.Equal(t, a.CertType, b.CertType)
assert.Equal(t, a.DisableTlsClientAuth, b.DisableTlsClientAuth)
assert.Equal(t, a.GetAuth(), b.GetAuth())
} |
SetSuggestedTipAmounts sets value of SuggestedTipAmounts conditional field. | func (i *Invoice) SetSuggestedTipAmounts(value []int64) {
i.Flags.Set(8)
i.SuggestedTipAmounts = value
} |
AddIndependentPropertyGeneratorsForDeepCreatedOriginGroup is a factory method for creating gopter generators | func AddIndependentPropertyGeneratorsForDeepCreatedOriginGroup(gens map[string]gopter.Gen) {
gens["Name"] = gen.PtrOf(gen.AlphaString())
gens["TrafficRestorationTimeToHealedOrNewEndpointsInMinutes"] = gen.PtrOf(gen.Int())
} |
HasName returns a boolean if a field has been set. | func (o *ResourceProperties) HasName() bool {
if o != nil && o.Name != nil {
return true
}
return false
} |
Equal returns true if both Connection Information have the same existing type and the values corresponding to this type are identical. | func (c ConnInfo) Equal(conn ConnInfo) bool {
if c.Type == conn.Type {
switch c.Type {
case TCP:
return c.TCPAddr.IP.Equal(conn.TCPAddr.IP) && c.TCPAddr.Port == conn.TCPAddr.Port && c.TCPAddr.Zone == conn.TCPAddr.Zone
default:
log.Warn("Not supported network address type")
}
}
return false
} |
/ AmsiApiService MEC011 Application Termination notification for self termination Terminates itself. | func (a *AmsiApiService) Mec011AppTerminationPOST(ctx context.Context, body AppTerminationNotification) (*http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Post")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
localVar... |
backup steps back one rune. Can only be called once per call of next. | func (l *lexer) backup() {
l.pos -= l.width
} |
FromJsonString It is highly NOT recommended to use this function because it has no param check, nor strict type check | func (r *DescribeCustomerInfoResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
} |
Handler creates http.Handler with routing matching OpenAPI spec. | func Handler(si ServerInterface) http.Handler {
return HandlerFromMux(si, chi.NewRouter())
} |
RunJSONSerializationTestForDeliveryRule_STATUS runs a test to see if a specific instance of DeliveryRule_STATUS round trips to JSON and back losslessly | func RunJSONSerializationTestForDeliveryRule_STATUS(subject DeliveryRule_STATUS) string {
// Serialize to JSON
bin, err := json.Marshal(subject)
if err != nil {
return err.Error()
}
// Deserialize back into memory
var actual DeliveryRule_STATUS
err = json.Unmarshal(bin, &actual)
if err != nil {
return err.... |
SetBackingStore sets the backingStore property value. Stores model information. | func (m *GovernancePolicy) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() {
m.backingStore = value
} |
The providerassigned unique ID for this managed resource. | func (o GetGroupResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetGroupResult) string { return v.Id }).(pulumi.StringOutput)
} |
NewParser create a new parser instance. | func NewParser(dir string) *Parser {
return &Parser{
dir: dir,
}
} |
The host address of the ScaleIO API Gateway. | func (o FioSpecVolumeVolumeSourceScaleIOPtrOutput) Gateway() pulumi.StringPtrOutput {
return o.ApplyT(func(v *FioSpecVolumeVolumeSourceScaleIO) *string {
if v == nil {
return nil
}
return &v.Gateway
}).(pulumi.StringPtrOutput)
} |
indicate modifications to a range of a mapped buffer | func FlushMappedBufferRange(target uint32, offset int, length int) {
C.glowFlushMappedBufferRange(gpFlushMappedBufferRange, (C.GLenum)(target), (C.GLintptr)(offset), (C.GLsizeiptr)(length))
} |
inputs should only contain one element, which is a JSON in string format. | func simpleEC(this js.Value, inputs []js.Value) interface{} {
var suite = suites.MustFind("Ed25519")
var args map[string]interface{}
json.Unmarshal([]byte(inputs[0].String()), &args)
scalar := suite.Scalar()
scalarB, _ := base64.StdEncoding.DecodeString(args["scalar"].(string))
scalar.UnmarshalBinary(scalarB)
va... |
Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared | func (o IopingSpecVolumeVolumeSourceAzureDiskPtrOutput) Kind() pulumi.StringPtrOutput {
return o.ApplyT(func(v *IopingSpecVolumeVolumeSourceAzureDisk) *string {
if v == nil {
return nil
}
return v.Kind
}).(pulumi.StringPtrOutput)
} |
GetName returns the device name / model. | func (d *cudaDevice) GetName() (string, error) {
name, r := cuda.Device(*d).GetName()
if r != cuda.SUCCESS {
return "", fmt.Errorf("failed to get device name: %v", r)
}
return name, nil
} |
WithHTTPClient adds the HTTPClient to the list n s groups params | func (o *ListNSGroupsParams) WithHTTPClient(client *http.Client) *ListNSGroupsParams {
o.SetHTTPClient(client)
return o
} |
HasVmId returns a boolean if a field has been set. | func (o *CreateRouteRequest) HasVmId() bool {
if o != nil && o.VmId != nil {
return true
}
return false
} |
Two's complement abs for ints to avoid conversion. Courtesy of | func abs(n int) int {
y := n >> 31
return (n ^ y) - y
} |
InspectSubnet returns information about the Subnet from AWS | func (s stack) InspectSubnet(id string) (_ *abstract.Subnet, xerr fail.Error) {
nullAS := abstract.NewSubnet()
if s.IsNull() {
return nil, fail.InvalidInstanceError()
}
if id == "" {
return nullAS, fail.InvalidParameterError("id", "cannot be empty string")
}
defer debug.NewTracer(nil, tracing.ShouldTrace("st... |
Retain filters inplace slice of HelpAppUpdateClass. | func (s HelpAppUpdateClassArray) Retain(keep func(x HelpAppUpdateClass) bool) HelpAppUpdateClassArray {
n := 0
for _, x := range s {
if keep(x) {
s[n] = x
n++
}
}
s = s[:n]
return s
} |
disconnect old addresses and close all | func CloseClients(clients []Client) {
for _, client := range clients {
if nil != client {
_ = client.Close()
}
}
} |
ChannelProvider mocks base method | func (m *MockClient) ChannelProvider() fab.ChannelProvider {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ChannelProvider")
ret0, _ := ret[0].(fab.ChannelProvider)
return ret0
} |
WithOffsetConsumerOption lets you set the kafka offset to read from | func WithOffsetConsumerOption(offset int64) ConsumerOption {
return func(c *Consumer) {
switch offset {
case LastOffset:
c.config.StartOffset = LastOffset
case FirstOffset:
c.config.StartOffset = FirstOffset
default:
c.config.StartOffset = FirstOffset
}
}
} |
DeliveryRuleServerPortCondition_STATUSGenerator returns a generator of DeliveryRuleServerPortCondition_STATUS instances for property testing. We first initialize deliveryRuleServerPortCondition_STATUSGenerator with a simplified generator based on the fields with primitive types then replacing it with a more complex one... | func DeliveryRuleServerPortCondition_STATUSGenerator() gopter.Gen {
if deliveryRuleServerPortCondition_STATUSGenerator != nil {
return deliveryRuleServerPortCondition_STATUSGenerator
}
generators := make(map[string]gopter.Gen)
AddIndependentPropertyGeneratorsForDeliveryRuleServerPortCondition_STATUS(generators)
... |
HasSubdivisionCode returns a boolean if a field has been set. | func (o *Workloadv1Location) HasSubdivisionCode() bool {
if o != nil && o.SubdivisionCode != nil {
return true
}
return false
} |
SetContext adds the context to the public remove trusted device v4 params | func (o *PublicRemoveTrustedDeviceV4Params) SetContext(ctx context.Context) {
o.Context = ctx
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.