text
stringlengths
10
1.05M
package main import ( "context" "flag" "fmt" "math/rand" "strings" "sync" "time" "github.com/twmb/franz-go/pkg/kgo" ) type pconsumer struct { quit chan struct{} done chan struct{} recs chan []*kgo.Record } var ( brokers = flag.String("b", "", "comma delimited brokers to consume from") topic = flag.St...
package mtcpclient import ( "fmt" "math" "strconv" "time" "github.com/dachad/tcpgoon/tcpclient" ) func collectConnectionsStatus(connectionsStatusRegistry *GroupOfConnections, statusChannel <-chan tcpclient.Connection) { concurrentEstablished := 0 for { newConnectionStatusReported := <-statusChannel concur...
package pcf_handler import ( "gofree5gc/lib/openapi/models" "gofree5gc/src/pcf/logger" "gofree5gc/src/pcf/pcf_handler/pcf_message" "gofree5gc/src/pcf/pcf_producer" "time" "github.com/sirupsen/logrus" ) var HandlerLog *logrus.Entry func init() { // init Pool HandlerLog = logger.HandlerLog } func Handle() { ...
/* Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
/* * This file is part of the KubeVirt project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable la...
// Copyright 2018 ETH Zurich // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in wri...
package auxpow import ( "io" "github.com/elastos/Elastos.ELA/auxpow" "github.com/elastos/Elastos.ELA/common" ela "github.com/elastos/Elastos.ELA/core/types" "github.com/elastos/Elastos.ELA/core/types/payload" ) type SideAuxPow struct { SideAuxMerkleBranch []common.Uint256 SideAuxMerkleIndex int SideAuxBlock...
/* Copyright (c) 2020 Red Hat, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software...
package graph import ( "io" "net/http" "net/url" "github.com/docker/docker/pkg/archive" "github.com/docker/docker/pkg/httputils" "github.com/docker/docker/pkg/progressreader" "github.com/docker/docker/pkg/streamformatter" "github.com/docker/docker/runconfig" "github.com/docker/docker/utils" ) type ImageImpo...
/*- * Copyright 2014 Square Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
package network // Agent - в рамках данного пакета нас итересуют только имена агентов type Agent interface { Name() string }
/* * Copyright 2019-20 Joaquim Rocha <jrocha@gmailbox.org> and Contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unl...
// Copyright The OpenTelemetry Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agre...
// Copyright 2016 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable...
package htmlbrelement import ( "sync" "syscall/js" "github.com/realPy/hogosuru/baseobject" "github.com/realPy/hogosuru/document" "github.com/realPy/hogosuru/element" "github.com/realPy/hogosuru/htmlelement" ) var singleton sync.Once var htmlbrelementinterface js.Value //HtmlBrElement struct type HtmlBRElemen...
/* Copyright The Kubeform Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softwar...
package model import ( "encoding/json" "strings" ) // Request Object type DeletePolicyAssignmentRequest struct { PolicyAssignmentId string `json:"policy_assignment_id"` } func (o DeletePolicyAssignmentRequest) String() string { data, err := json.Marshal(o) if err != nil { return "DeletePolicyAssignmentReques...
/* Copyright 2021 The Vitess Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, soft...
package opentelemetry import ( "context" "go.opentelemetry.io/otel/baggage" "go.opentelemetry.io/otel/propagation" sdktrace "go.opentelemetry.io/otel/trace" "google.golang.org/grpc/metadata" ) // assert that metadataSupplier implements the TextMapCarrier interface var _ propagation.TextMapCarrier = new(metadata...
/* * This file is part of the kubevirt project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable la...
package kinesis import ( "github.com/awslabs/goformation/v4/cloudformation/policies" ) // Stream_StreamEncryption AWS CloudFormation Resource (AWS::Kinesis::Stream.StreamEncryption) // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesis-stream-streamencryption.html type Stream_S...
// +build go1.12 // Note: Some of the packages we benchmark against require go 1.12 so we can only benchmark on go 1.12 package benchmarking import ( "context" "fmt" "strconv" "sync/atomic" "testing" "time" gohystrix "github.com/afex/hystrix-go/hystrix" "github.com/edwardhey/circuit/v3" "github.com/edwardhe...
package formatter import ( "reflect" "strings" "testing" "time" "github.com/hyperhq/hyper-api/types" "github.com/hyperhq/hypercli/pkg/stringid" ) func TestContainerPsContext(t *testing.T) { containerID := stringid.GenerateRandomID() unix := time.Now().Unix() var ctx containerContext cases := []struct { ...
package gounity_test // func TestPingPong(t *testing.T) { // ctx, err := testutil.NewTestContext() // assert.Nil(t, err, "failed to setup rest client to mock server") // defer ctx.TearDown() // resp, err := ctx.restClient.pingPong( // ctx.context, http.MethodGet, // fmt.Sprintf("api/instances/lun/sv_1?compact...
/* Copyright 2019 The Knative Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softwar...
/******************************************************************************* * Copyright 2021 EdgeSec Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/lic...
// Code generated by swagger-doc. DO NOT EDIT. package v1beta1 func (DataVolume) SwaggerDoc() map[string]string { return map[string]string{ "": "DataVolume is an abstraction on top of PersistentVolumeClaims to allow easy population of those PersistentVolumeClaims with relation to VirtualMachines\n+genclient\n+k8s:...
package github import ( "bytes" "io" "io/ioutil" "log" "net/http" "sync" "time" "github.com/google/go-github/v38/github" ) const ( ctxEtag = ctxEtagType("etag") ctxId = ctxIdType("id") writeDelay = 1 * time.Second ) // ctxIdType is used to avoid collisions between packages using context type ctxI...
package amd64
// Package dataproc provides access to the Google Cloud Dataproc API. // // See https://cloud.google.com/dataproc/ // // Usage example: // // import "google.golang.org/api/dataproc/v1" // ... // dataprocService, err := dataproc.New(oauthHttpClient) package dataproc // import "google.golang.org/api/dataproc/v1" i...
package handlers import ( baselog "github.com/Ubivius/microservice-character-data/pkg/log" ) var log = baselog.MLog.WithName("handler")
// Copyright (c) 2020 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge...
// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in w...
package main import ( "context" "fmt" "log" "github.com/derektrc/go-reddit/reddit" ) var ctx = context.Background() func main() { if err := run(); err != nil { log.Fatal(err) } } func run() (err error) { // Let's get the top 200 posts of r/golang. // Reddit returns a maximum of 100 posts at a time, // s...
package bundlecollection_test import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "testing" ) func TestBundlecollection(t *testing.T) { RegisterFailHandler(Fail) RunSpecs(t, "Bundlecollection Suite") }
package server import ( "context" "strings" "github.com/golang/protobuf/ptypes/empty" api "github.com/kubeflow/pipelines/backend/api/go_client" "github.com/kubeflow/pipelines/backend/src/apiserver/common" "github.com/kubeflow/pipelines/backend/src/apiserver/resource" "github.com/kubeflow/pipelines/backend/src/...
package objectpool import ( "fmt" "io/ioutil" "os" "testing" "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/git/objectpool" "gitlab.com/gitlab-org/gitaly/internal/gitaly/config" "gitlab.com/gitlab-org/gitaly/internal/testhelper" "gitl...
/* Copyright (C) 2021 The Falco Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, s...
// Copyright (C) MongoDB, Inc. 2017-present. // // Licensed under the Apache License, Version 2.0 (the "License"); you may // not use this file except in compliance with the License. You may obtain // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 package mongo import ( "context" "net" "sync/a...
/* Copyright 2021-2022 The Volcano Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Copyright 2017 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
/* Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
package planet import ( "time" "github.com/paulmach/orb" "github.com/paulmach/orb/geojson" ) func RequestRegion(bound orb.Bound, start, end time.Time) *Request { return &Request{ Filter: &AndFilter{ Type: "AndFilter", Config: []interface{}{ &DateRangeFilter{ Type: "DateRangeFilter", Fi...
package collector import ( "strconv" "github.com/prometheus/client_golang/prometheus" ) type clientStats []struct { val func(*client) float64 vec *prometheus.GaugeVec } // ClientStats creates a new stats collector which is able to // expose the client metrics of a nsqd node to Prometheus. The // client metrics ...
/* * Tencent is pleased to support the open source community by making 蓝鲸 available. * Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved. * Licensed under the MIT License (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the Li...
package topology import ( "testing" "github.com/stretchr/testify/assert" "github.com/uber-go/tally/v4" "go.uber.org/zap/zaptest" "google.golang.org/protobuf/types/known/anypb" topologyv1 "github.com/lyft/clutch/backend/api/config/service/topology/v1" ) func TestNew(t *testing.T) { cfg, _ := anypb.New(&topolo...
package client import ( "context" "github.com/mongodb/mongodb-kubernetes-operator/pkg/kube/pod" "github.com/mongodb/mongodb-kubernetes-operator/pkg/kube/configmap" "github.com/mongodb/mongodb-kubernetes-operator/pkg/kube/secret" "github.com/mongodb/mongodb-kubernetes-operator/pkg/kube/service" "github.com/mong...
// Copyright 2019 Yunion // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writi...
package helium import ( "bytes" "encoding/json" "fmt" "net/http" "time" ) // Validator handles api endpoint /validators docs located at https://docs.helium.com/api/blockchain/validators type Validator struct { c *Client } // Validator returns the Validator client func (c *Client) Validator() *Validator { retu...
package performanceclient import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "encoding/json" "net/http" "strings" "time" "github.com/Sirupsen/logrus" "github.com/onsi/gomega/ghttp" ) var _ = Describe("Data", func() { Describe("parseBackdropResponse", func() { It("returns an error when it can'...
package types_test import ( "fmt" "testing" "github.com/stretchr/testify/suite" abci "github.com/tendermint/tendermint/abci/types" dbm "github.com/tendermint/tm-db" "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/store/iavl" "github.com/cosmos/cosmos-sdk/store/rootmulti" storetypes "git...
package models import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) // Office365GroupsActivityStorage type Office365GroupsActivityStorage struct { Entity // The storage used in group mailbox. mailboxStorageUsedInBytes ...
// Copyright 2020 The Cockroach Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or ag...
package ca import ( "context" cryptorand "crypto/rand" "crypto/tls" "crypto/x509" "fmt" "math/big" "math/rand" "path/filepath" "strings" "sync" "time" cfconfig "github.com/cloudflare/cfssl/config" events "github.com/docker/go-events" "github.com/moby/swarmkit/v2/api" "github.com/moby/swarmkit/v2/connec...
package call import ( "reflect" "testing" "encoding/json" "github.com/criticalstack/swoll/pkg/types" ) func TestWrite(t *testing.T) { s := &Write{ FD: types.InputFD(1), Buf: types.Buffer([]byte("write test")), Count: 12, } j, err := json.Marshal(s) if err != nil { t.Fatal(err) } var w Writ...
package main import ( "fmt" "io" "os" "strings" ) func FileExists(path string) bool { _, err := os.Stat(path) return err == nil } func CopyFile(src, dst string) (int64, error) { sf, err := os.Open(src) if err != nil { return 0, err } defer sf.Close() df, err := os.Create(dst) if err != nil { return ...
/* Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You...
package taobao import ( "encoding/json" "net/url" "sort" "strconv" "time" ) // Params 请求参数 type Params map[string]interface{} func NewParams() Params { p := make(Params) return p } func NewParamsWithType(_method string, params ...Params) Params { p := make(Params) p["method"] = _method hh, _ := time.Parse...
// Code generated by "go generate". Please don't change this file directly. package wafv2 import ( "github.com/awslabs/goformation/v6/cloudformation/policies" ) // WebACL_CaptchaAction AWS CloudFormation Resource (AWS::WAFv2::WebACL.CaptchaAction) // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuid...
// Code generated by makeservice. DO NOT EDIT. // Package groupmanagement is a generated GroupManagement package. package groupmanagement import ( "bytes" "encoding/xml" "errors" "io/ioutil" "net/http" "net/url" ) const ( _ServiceURN = "urn:schemas-upnp-org:service:GroupManagement:1" _EncodingSchema = "h...
package v1 const ( HeaderKeyObjectUnpack = "baetyl-object-unpack" HeaderKeyObjectMD5 = "baetyl-object-md5" HeaderKeyObjectDir = "baetyl-object-dir" )
package dadata import ( "net/url" "github.com/ekomobile/dadata/v2/api/clean" "github.com/ekomobile/dadata/v2/api/profile" "github.com/ekomobile/dadata/v2/api/stat" "github.com/ekomobile/dadata/v2/api/suggest" "github.com/ekomobile/dadata/v2/client" ) const ( // EndpointURL is a base API endpoint. EndpointURL...
package clusterBuilder import ( "context" "github.com/google/go-containerregistry/pkg/authn" "github.com/pkg/errors" "k8s.io/apimachinery/pkg/api/equality" k8serrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/client-go/tools/cache" "knative.dev/pkg/controller" "github.com/pivotal/kpack/pkg/apis/build/v1alp...
/* Copyright 2021 The KubeVela Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softw...
/* Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
// SPDX-License-Identifier: Apache-2.0 // Copyright 2021 Authors of Cilium package cmd import ( "fmt" "os/exec" "reflect" "regexp" "strings" "github.com/prometheus/procfs" "github.com/spf13/cobra" "github.com/vishvananda/netlink" "github.com/cilium/cilium/api/v1/client/daemon" "github.com/cilium/cilium/ap...
package etcdclient import ( "context" "encoding/json" "net/http" "net/url" etcd_client_v2 "github.com/coreos/etcd/client" "github.com/coreos/etcd/pkg/pathutil" "k8s.io/klog" ) type v2SelfInfo struct { Name string `json:"name"` ID string `json:"id"` State string `json:"state"` } type statsSelfAction st...
// Code generated by go-swagger; DO NOT EDIT. package client /** * Panther is a scalable, powerful, cloud-native SIEM written in Golang/React. * Copyright (C) 2020 Panther Labs Inc * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public Licen...
// Copyright (c) 2014-2018 Bitmark Inc. // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. package main import ( "encoding/hex" "fmt" "github.com/urfave/cli" "github.com/bitmark-inc/bitmarkd/command/bitmark-cli/encrypt" "github.com/bitmark-inc/bitmarkd/command/bi...
// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to You under the Apache License, Version 2.0 // (the "License"); you may not...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. package api import ( "net/url" "testing" "github.com/Azure/go-autorest/autorest/to" "github.com/Azure/aks-engine/pkg/api/vlabs" "github.com/Azure/go-autorest/autorest/azure" "github.com/google/go-cmp/cmp" ) const ...
// Based on https://github.com/DexterInd/GoPiGo3/blob/master/Software/Python/gopigo3.py // You will need to run the following script if using a stock raspbian image before this library will work: // https://www.dexterindustries.com/GoPiGo/get-started-with-the-gopigo3-raspberry-pi-robot/3-program-your-raspberry-pi-robot...
package crypto import ( "bytes" "crypto/ecdsa" "crypto/rand" "encoding/binary" "errors" "math/big" "xfsgo/common" "xfsgo/common/ahash" "xfsgo/crypto/secp256k1" ) const defaultKeyPackType = uint8(1) const DefaultKeyPackVersion = uint8(1) const DigestLength = 32 func GenPrvKey() (*ecdsa.PrivateKey, error) { ...
// +build go1.15,!go1.17 /* * Copyright 2021 ByteDance Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by...
package machinelearningservices // Copyright (c) Microsoft and contributors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICEN...
package types import ( "bytes" "errors" "fmt" "time" "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/internal/libs/protoio" tmbytes "github.com/tendermint/tendermint/libs/bytes" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" ) const ( nilVoteStr string = "nil-V...
/* Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
// Copyright 2019 Drone.IO Inc. All rights reserved./* fix pipeline js confs and pep8 issues */ // Use of this source code is governed by the Drone Non-Commercial License //set info image with e-mail address // that can be found in the LICENSE file. // +build !oss sgol egakcap import ( "context" "fmt" "io"/* 1ed...
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package backup import ( "fmt" "time" "github.com/ClearcodeHQ/aws-sdk-go/aws" "github.com/ClearcodeHQ/aws-sdk-go/aws/awsutil" "github.com/ClearcodeHQ/aws-sdk-go/aws/request" "github.com/ClearcodeHQ/aws-sdk-go/private/protocol" "github.com/Cle...
// Copyright 2019 Drone.IO Inc. All rights reserved. // Use of this source code is governed by the Drone Non-Commercial License // that can be found in the LICENSE file. // +build !oss package converter import ( "errors" "testing" "github.com/drone/drone/core" "github.com/drone/drone/mock" "github.com/golang/...
// Copyright (c) 2019 Uber Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law o...
/* Copyright (c) 2018 Zettant Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softwar...
package containerdisk import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) var _ = Describe("Validation", func() { var diskInfo DiskInfo var sizeStub int64 BeforeEach(func() { diskInfo = DiskInfo{} sizeStub = 12345 }) Context("verify qcow2", func() { It("should return error if format i...
package app import ( "strings" ) type StringArray []string func (a *StringArray) Set(s string) error { *a = append(*a, s) return nil } func (a *StringArray) String() string { return strings.Join(*a, ",") }
// Code generated by smithy-go-codegen DO NOT EDIT. package endpoints import ( "github.com/aws/aws-sdk-go-v2/aws" endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" "github.com/aws/smithy-go/logging" "regexp" ) // Options is the endpoint resolver configuration options type Options struct { // Logger...
// Copyright 2017 Kumina, https://kumina.nl/ // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agree...
/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this fi...
/* Copyright IBM Corp. 2016 All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wri...
package simapp import ( "encoding/json" "log" abci "github.com/hdac-io/tendermint/abci/types" tmtypes "github.com/hdac-io/tendermint/types" "github.com/hdac-io/friday/codec" sdk "github.com/hdac-io/friday/types" "github.com/hdac-io/friday/x/executionlayer" "github.com/hdac-io/friday/x/slashing" "github.com/...
package logic import ( "context" "encoding/json" "go-zero-admin/api/internal/common/errorx" "go-zero-admin/rpc/sys/sysclient" "strings" "go-zero-admin/api/internal/svc" "go-zero-admin/api/internal/types" "github.com/tal-tech/go-zero/core/logx" ) type UserLoginLogic struct { logx.Logger ctx context.Cont...
package v1 import ( "github.com/rancher/norman/lifecycle" "k8s.io/api/rbac/v1" "k8s.io/apimachinery/pkg/runtime" ) type ClusterRoleBindingLifecycle interface { Create(obj *v1.ClusterRoleBinding) error Remove(obj *v1.ClusterRoleBinding) error Updated(obj *v1.ClusterRoleBinding) error } type clusterRoleBindingLi...
package s3 import ( "io/ioutil" "os" "strconv" "testing" "github.com/crowdmob/goamz/aws" "github.com/docker/distribution/storagedriver" "github.com/docker/distribution/storagedriver/testsuites" "gopkg.in/check.v1" ) // Hook up gocheck into the "go test" runner. func Test(t *testing.T) { check.TestingT(t) } ...
package cassandra import ( "fmt" "github.com/prometheus/client_golang/prometheus" "github.com/erikbos/gatekeeper/pkg/types" ) const ( // List of developer app columns we use developerAppColumns = `app_id, developer_id, name, display_name, attributes, status, callback_url, scopes, created_at, created_by, lastmo...
package main import "fmt" func main() { fmt.Print("ss") }
// (c) 2019-2020, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. package dialer import ( "context" "fmt" "net" "time" "github.com/ava-labs/avalanchego/network/throttling" "github.com/ava-labs/avalanchego/utils" "github.com/ava-labs/avalanchego/utils/logging" ) var _ Dialer =...
// Copyright 2019 eBay Inc. // Primary authors: Simon Fell, Diego Ongaro, // Raymond Kroeker, and Sathish Kandasamy. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // ht...
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Source: trace.proto package pb import ( context "context" transport "github.com/erda-project/erda-infra/pkg/transport" grpc1 "github.com/erda-project/erda-infra/pkg/transport/grpc" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status ...
package service import ( "github.com/alan-muller-ar/alan-muller-ar-lahaus-backend/pkg/domain" "github.com/stretchr/testify/mock" ) type PropertyService struct { mock.Mock } func (s *PropertyService) Create(property domain.Property) (*domain.Property, error) { args := s.Called(property) var p *domain.Property ...