text stringlengths 3.08k 10.4k |
|---|
package cmd
// FunctionCall represents the details of the function call
type FunctionCall struct {
// ContractAddress Is a field element of 251 bits. Represented as up to 64 hex digits
ContractAddress string `json:"contract_address"`
// EntryPointSelector Is a field element of 251 bits. Represented as up to 64 hex ... |
// Code generated by go-swagger; DO NOT EDIT.
package firm_client_linkages
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"net/http"
"time"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr... |
package config
import (
"os"
"path/filepath"
"time"
"github.com/spf13/viper"
)
type API viper.Viper
func (a *API) viper() *viper.Viper {
return (*viper.Viper)(a)
}
func (a *API) BasePath() string {
return a.viper().GetString("api.basePath")
}
func (a *API) SetBasePath(bp string) {
a.viper().Set("api.basePa... |
package main
import (
"context"
"flag"
"fmt"
"os"
"github.com/pelletier/go-toml"
"compress/gzip"
"docker.io/go-docker"
"docker.io/go-docker/api/types"
"io"
"log"
"text/template"
)
const manifest_name = "satchel-manifest.toml"
const loadScriptName = "load-images.sh"
const loadScriptTemplate = `#!/bin/bash... |
package http
import (
"bytes"
"crypto/tls"
"crypto/x509"
"encoding/json"
"io"
"io/ioutil"
orig "net/http"
"os"
"strings"
)
// 读取Response的状态码和文本内容
func ReadResponse(resp *orig.Response, err error) (code int, body []byte) {
if resp != nil {
defer resp.Body.Close()
code = resp.StatusCode
}
if err != nil ... |
// Copyright 2020 The Tagger 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 agr... |
// Copyright 2021 The LUCI 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... |
package ibft
import (
"errors"
"fmt"
"github.com/0xPolygon/polygon-edge/contracts/staking"
"github.com/0xPolygon/polygon-edge/types"
)
// PoSMechanism defines specific hooks for the Proof of Stake IBFT mechanism
type PoSMechanism struct {
// Reference to the main IBFT implementation
ibft *Ibft
// hookMap is ... |
/*
MIT License
Copyright (c) 2018 <NAME>
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, publish, distrib... |
package spoukfw
import (
"github.com/spouk/spoukfw/httprouter"
"net/http"
"fmt"
"strings"
"log"
"runtime"
"reflect"
)
type (
spoukrouter struct {
router httprouter.Router
//middlewares *spoukmiddlewares
middlewares *spoukstockmiddlewares
spoukmux *Spoukmux
}
SpoukHandler func(*SpoukCarry) er... |
package deployment
import (
bosherr "github.com/cloudfoundry/bosh-utils/errors"
boshlog "github.com/cloudfoundry/bosh-utils/logger"
boshsys "github.com/cloudfoundry/bosh-utils/system"
bftanalyzer "github.com/cloudfoundry-incubator/bosh-fuzz-tests/analyzer"
"github.com/cloudfoundry-incubator/bosh-fuzz-tests/varia... |
package main
import (
"bytes"
"encoding/json"
"fmt"
"github.com/gorilla/mux"
"github.com/gorilla/sessions"
"golang.org/x/crypto/bcrypt"
"log"
"net/http"
"text/template"
"time"
)
type handler func(http.ResponseWriter, *http.Request) error
func (h handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
... |
package serverside
import (
"net"
"time"
"github.com/weaveworks/flux/agent"
"github.com/weaveworks/flux/balancer/events"
"github.com/weaveworks/flux/balancer/forwarder"
"github.com/weaveworks/flux/balancer/prometheus"
"github.com/weaveworks/flux/common/daemon"
"github.com/weaveworks/flux/common/netutil"
"git... |
/*
Copyright 2019 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 auth
import (
"crypto/sha1"
"fmt"
"log"
"time"
"github.com/aodin/sol"
"github.com/aodin/sol/postgres"
"github.com/aodin/sol/types"
)
// User is a database-backed user.
type User struct {
ID int64 `db:"id,omitempty"`
Email string `db:"email"`
FirstName string `db:... |
package exchange
import (
"time"
"github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain/store"
"github.com/ipfs/go-cid"
logging "github.com/ipfs/go-log"
"golang.org/x/xerrors"
"github.com/filecoin-project/lotus/chain/types"
)
var log = logging.Logger("chainxchg")
const (
// Blo... |
package jiracmd
import (
"fmt"
"os"
"strings"
"github.com/coryb/figtree"
"github.com/coryb/oreo"
"github.com/go-jira/jira"
"github.com/go-jira/jira/jiracli"
"github.com/go-jira/jira/jiradata"
kingpin "gopkg.in/alecthomas/kingpin.v2"
yaml "gopkg.in/coryb/yaml.v2"
)
type CreateOptions struct {
jiracli.Comm... |
package execution
import (
"fmt"
"strings"
"time"
"rptsec.com/amg/actionstore"
)
// Execution represents an instance of playbook execution
type Execution struct {
startNode Node
as *actionstore.ActionStore
execState *ExecState
startTs int64
doneTs ... |
// Copyright © 2018 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 agr... |
// Copyright 2018 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 applicabl... |
package itau
import (
"errors"
"strings"
. "github.com/PMoneda/flow"
"github.com/mundipagg/boleto-api/config"
"github.com/mundipagg/boleto-api/log"
"github.com/mundipagg/boleto-api/metrics"
"github.com/mundipagg/boleto-api/models"
"github.com/mundipagg/boleto-api/tmpl"
"github.com/mundipagg/bolet... |
// 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 storage
import (
"context"
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"io"
"path/filepath"
"sync"
"github.com/journeymidnight/yig/api/datatype"
"github.com/journeymidnight/yig/crypto"
. "github.com/journeymidnight/yig/error"
"github.com/journeymidnight/yig/helper"
"github.com/journeymidnight/yig/l... |
// Copyright Amazon.com Inc. or its affiliates. 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. A copy of the
// License is located at
//
// http://aws.amazon.com/apache2.0/
//
// or in the "license" file acco... |
// 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 ag... |
package query
import (
"testing"
"github.com/pelletier/go-toml"
)
func testQLFlow(t *testing.T, input string, expectedFlow []token) {
ch := lexQuery(input)
for idx, expected := range expectedFlow {
token := <-ch
if token != expected {
t.Log("While testing #", idx, ":", input)
t.Log("compared (got)", tok... |
package cli_test
import (
"fmt"
"os"
"time"
cli "github.com/draft6/mow.cli"
)
func Example_greet() {
app := cli.App("greet", "Greet")
app.Spec = "[NAME]"
name := app.String(cli.StringArg{Name: "NAME", Value: "stranger", Desc: "Your name", EnvVar: "USER"})
app.Action = func() {
fmt.Printf("Hello %s\n", *nam... |
// Copyright 2020 Insolar Network 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/licenses/LICENSE-2.0
//
// Unless required by applicable law or agre... |
package integration
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"net/http/httptest"
"net/http/httputil"
"os/exec"
"strings"
"testing"
"github.com/sclevine/spec"
"github.com/stretchr/testify/require"
)
type serverRequest struct {
Name string `json:"name"`
}
var _ = suite("compute/server/create"... |
package eksconfig
import (
"errors"
"fmt"
"path"
"path/filepath"
"strings"
"time"
"github.com/aws/aws-k8s-tester/pkg/timeutil"
)
// AddOnIRSA defines parameters for EKS cluster
// add-on "IAM Roles for Service Accounts (IRSA)".
type AddOnIRSA struct {
// Enable is 'true' to create this add-on.
Enable bool `... |
package version
import (
"net/http"
"net/url"
"time"
"github.com/pkg/errors"
"github.com/percona/percona-postgresql-operator/internal/kubeapi"
"github.com/percona/percona-postgresql-operator/internal/util"
"github.com/percona/percona-postgresql-operator/percona/controllers/db"
api "github.com/percona/percona... |
// Copyright 2019 Red Hat, Inc. and/or its affiliates
//
// 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 applic... |
// Copyright 2018 the Service Broker Project 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 applic... |
/*
Copyright 2017 The Nuclio 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... |
// Copyright (C) 2019-2020 Zilliz. 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 l... |
// Copyright 2018 The Go Cloud Development Kit 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appli... |
package types
import (
"time"
velerov1 "github.com/vmware-tanzu/velero/pkg/apis/velero/v1"
)
type StoreAWS struct {
Region string `json:"region"`
AccessKeyID string `json:"accessKeyID"`
SecretAccessKey string `json:"secretAccessKey"` // added for unmarshaling, redacted on marshaling
UseInstanceRol... |
package proxy
import (
"context"
"crypto/tls"
"fmt"
"testing"
"time"
"github.com/stretchr/testify/require"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/status"
commonGrpc "github.com/oasisprotocol/oasis-core/go/common/grpc"
"github.c... |
/*
* foundationdb_version.go
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2021-2022 Apple Inc. and the FoundationDB project authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You ... |
/*
* Copyright 2018 The CovenantSQL 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 ... |
package docker
import (
"bytes"
"encoding/base64"
"encoding/json"
"errors"
"io"
"strings"
"time"
"context"
"github.com/docker/docker/api/types"
"github.com/docker/docker/pkg/stdcopy"
log "github.com/sirupsen/logrus"
)
var defaultTimeout int64 = 3
//ExecOptions control how a container is executed
type Ex... |
package identity
import (
"context"
"database/sql/driver"
"encoding/json"
"sync"
"time"
"github.com/ory/kratos/corp"
"github.com/ory/herodot"
"github.com/ory/x/sqlxx"
"github.com/ory/kratos/driver/config"
"github.com/gofrs/uuid"
"github.com/pkg/errors"
"github.com/ory/kratos/x"
)
type (
// Identity ... |
//
// Last.Backend LLC CONFIDENTIAL
// __________________
//
// [2014] - [2018] Last.Backend LLC
// All Rights Reserved.
//
// NOTICE: All information contained herein is, and remains
// the property of Last.Backend LLC and its suppliers,
// if any. The intellectual and technical concepts contained
// herein are prop... |
package main
import (
"database/sql"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"log"
"os/exec"
"strings"
"time"
)
type piStatus int
const (
NOTINUSE piStatus = 1
INUSE piStatus = 2
PREPARING piStatus = 3
)
type piList map[string]PiInfo
type PiInfo struct {
db *sql.DB
Id stri... |
package filevault
import (
"crypto/aes"
"crypto/cipher"
"encoding/binary"
"encoding/hex"
"errors"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
"sync"
"github.com/rs/zerolog"
)
const (
vaultFileName = "krok_vault.dat"
keySize = 32
)
// Config has the configuration options for the file vault.
... |
package pageant
import (
"bufio"
"crypto/sha256"
"fmt"
"io"
"log"
"net"
"os/user"
"strings"
"syscall"
"unsafe"
"encoding/binary"
"github.com/Microsoft/go-winio"
"github.com/lxn/win"
"golang.org/x/sys/windows"
"encoding/hex"
"github.com/gazzenger/winssh-pageant/internal/security"
"github.com/gazzen... |
// Copyright 2019, 2021 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed ... |
package gamedayapi
import "encoding/xml"
// Boxscore is the representation of the boxscore.xml file.
type Boxscore struct {
XMLName xml.Name `xml:"boxscore"`
AwayFName string `xml:"away_fname,attr"`
AwayID string `xml:"away_id,attr"`
AwayLoss string `xml:"away_loss,attr"`
AwaySName ... |
package dbserver
import (
"context"
"database/sql"
"database/sql/driver"
)
// Runner is an interface for database access
type Runner interface {
// Transact executes the function passed as a parameter in a database transaction.
// It does not support nested transactions.
// It is possible to have a Transact wra... |
package tx
import (
"errors"
"fmt"
"strings"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/irisnet/irishub/codec"
sdk "github.com/irisnet/irishub/types"
"github.com/irisnet/irishub/client"
"github.com/irisnet/irishub/client/context"
"github.com/irisnet/irishub/client/utils"
ctypes "github.... |
package manager
import (
"context"
"fmt"
"reflect"
"sort"
"strings"
v32 "github.com/rancher/rancher/pkg/apis/management.cattle.io/v3"
monitoringv1 "github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1"
v1 "github.com/rancher/rancher/pkg/generated/norman/core/v1"
rmonitoringv1 "github.com/rancher/ran... |
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package main
import (
"context"
"crypto/sha256"
"encoding/hex"
"fmt"
"io"
"io/ioutil"
"strings"
"infra/cmd/cloudbuildhelper/cloudbuild"
"infra/... |
package stack
import (
"fmt"
"os"
"strings"
"github.com/DeepApex/rattlesnakeos-stack/templates"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/s3"
"github.com/aws/aws-sdk-go/service/sns"
log "github.com/sirups... |
package nicocas
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"net/http"
"time"
)
type putHeartbeat struct {
expire int64
uri string
}
type messageServer struct {
HTTP string `json:"http"`
HTTPS string `json:"https"`
ProtocolVersion int64 `json:"... |
/*
* Tencent is pleased to support the open source community by making Nocalhost available.,
* Copyright (C) 2019 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... |
package hedera
import (
"crypto/aes"
cipher2 "crypto/cipher"
"crypto/hmac"
"crypto/rand"
"crypto/sha256"
"crypto/sha512"
"crypto/subtle"
"encoding/hex"
"encoding/json"
"io"
"golang.org/x/crypto/pbkdf2"
)
type _Keystore struct {
Version uint8 `json:"version"`
Crypto _CryptoData `json:"crypto"`
}
... |
package asm
import (
"fmt"
"github.com/antlr/antlr4/runtime/Go/antlr"
parser "github.com/hsiaosiyuan0/ripplet/internal/grammar"
)
type Scope struct {
// an auto-increment number which is generated according
// the depth-first walk over the entire AST
Id uint
Parent *Scope
Subs []*Scope
// formal paramet... |
package output
import (
"os"
"regexp"
"sync"
"time"
"github.com/pkg/errors"
jsoniter "github.com/json-iterator/go"
"github.com/logrusorgru/aurora"
"github.com/projectdiscovery/interactsh/pkg/server"
"github.com/projectdiscovery/nuclei/v2/internal/colorizer"
"github.com/projectdiscovery/nuclei/v2/internal/... |
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ssa
import (
"cmd/internal/obj"
"cmd/internal/obj/s390x"
"cmd/internal/obj/x86"
"cmd/internal/src"
"testing"
)
var CheckFunc = checkFunc
var Opt ... |
package odoo
import (
"fmt"
)
// AccountTax represents account.tax model.
type AccountTax struct {
LastUpdate *Time `xmlrpc:"__last_update,omptempty"`
AccountId *Many2One `xmlrpc:"account_id,omptempty"`
Active *Bool `xmlrpc:"active,omptempty"`
Amount ... |
// RiveScript Test Suite: Go Test Runner
package main
import (
"fmt"
"io/ioutil"
"log"
"path/filepath"
"reflect"
"strings"
yaml "gopkg.in/yaml.v2"
rivescript "github.com/aichaos/rivescript-go"
)
// TestCase wraps each RiveScript test.
type TestCase struct {
file string
name string
username string... |
package proc
import (
"go/constant"
"unsafe"
)
// delve counterpart to runtime.moduledata
type moduleData struct {
text, etext uint64
types, etypes uint64
typemapVar *Variable
}
func loadModuleData(bi *BinaryInfo, mem MemoryReadWriter) ([]moduleData, error) {
scope := globalScope(bi, bi.Images[0], mem)
v... |
/*
MIT License
Copyright (c) 2018 <NAME>.
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, publish, distri... |
// Package bitlog implements data structure and functions
// to manage Bitcask log files. By log files it means the
// files contains data represent both running log and data,
// which is how Bitcask is designed.
package bitlog
// The following code was sourced and modified from the
// https://github.com/Panda-Home/go... |
// Copyright (c) 2014 <NAME>
//
// 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, publish, dist... |
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"strconv"
"strings"
"time"
"github.com/gocolly/colly"
"github.com/joho/godotenv"
)
// --------------------------------------------------------------------------------
// Structs
// -----------------------------------------------... |
/*
* 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 ... |
// Code generated by moq; DO NOT EDIT.
// github.com/matryer/moq
package products
import (
"context"
integreatlyv1alpha1 "github.com/integr8ly/integreatly-operator/apis/v1alpha1"
"k8s.io/apimachinery/pkg/runtime"
k8sclient "sigs.k8s.io/controller-runtime/pkg/client"
"sync"
)
// Ensure, that InterfaceMock does i... |
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package apply
import (
"fmt"
"github.com/go-errors/errors"
"github.com/spf13/cobra"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/kubectl/pkg/... |
package events
import (
"context"
"sync"
"time"
"github.com/filecoin-project/go-state-types/abi"
"github.com/ipfs/go-cid"
logging "github.com/ipfs/go-log/v2"
"golang.org/x/xerrors"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/build"
"g... |
package poly
import (
"log"
"math/big"
"testing"
"../utils"
)
func xPoints(n int) []*big.Int {
out := make([]*big.Int, n)
for i := 0; i < n; i++ {
out[i] = big.NewInt(int64(i))
}
return out
}
func TestAllocPreDeg(t *testing.T) {
mod := big.NewInt(13)
NewBatch(mod, xPoints(10))
}
func TestAllocEvalPoint... |
/*
Copyright 2018 OpenEBS 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 pegn
import (
"fmt"
"strconv"
"strings"
"github.com/di-wu/parser/ast"
"github.com/rwxrob/pegn-go/pegn/nd"
)
// generatePrimary writes the given primary node to the writer. The parameter
// indent indicates whether the value has to be written without indentation or
// not.
//
// PEGN
// Primary <- Simple... |
package checkpoint
import (
"context"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"testing"
"time"
"github.com/stretchr/testify/require"
"github.com/oasisprotocol/oasis-core/go/common/crypto/hash"
"github.com/oasisprotocol/oasis-core/go/storage/mkvs"
db "github.com/oasisprotocol/oasis-core/go/storage/mkvs/db/a... |
// Copyright 2020 Copyright (c) 2020 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 complian... |
package statsd
import (
"fmt"
"sync"
"sync/atomic"
"time"
backendTypes "github.com/atlassian/gostatsd/backend/types"
"github.com/atlassian/gostatsd/types"
log "github.com/Sirupsen/logrus"
"golang.org/x/net/context"
)
const (
internalMetric = "statsd."
badLinesSeen = internalMetric + "bad_lines_s... |
// Copyright 2018 The Mangos Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use 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... |
package rogger
import (
"fmt"
"os"
"path/filepath"
"strconv"
"time"
)
//DAY for rotate log by day
const (
DAY DateType = iota
HOUR
)
//LogWriter is interface for different writer.
type LogWriter interface {
Write(v []byte)
NeedPrefix() bool
}
//ConsoleWriter writes the logs to the console.
type ConsoleWrit... |
// Copyright (c) 2019 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 Lice... |
// Copyright (c) 2018 DDN. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package main
import (
"context"
"io"
"net/url"
"time"
"cloud.google.com/go/storage"
"github.com/pkg/errors"
"github.com/intel-hpdd/lemur/dmplugin"
"github.c... |
// Copyright (C) 2019-2020 Zilliz. 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 l... |
package main
import (
"fmt"
"github.com/murlokswarm/app"
"strconv"
"time"
)
const (
// Activity type
TASK = ActivityType("Task")
PAUSE = ActivityType("Pause")
LONG_PAUSE = ActivityType("Long pause")
// Activity statuses
NEW = ActivityStatus("New")
IN_PROGRESS = ActivityStatus("In Progre... |
package dburl
import (
"net/url"
"strings"
)
// URL wraps the standard net/url.URL type, adding OriginalScheme, Transport,
// Driver, and DSN strings.
type URL struct {
// URL is the base net/url/URL.
url.URL
// OriginalScheme is the original parsed scheme (ie, "sq", "mysql+unix", "sap", etc).
OriginalScheme s... |
/*
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
distributed under the License ... |
/*
* 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 ... |
package cmd
import (
"fmt"
"io"
"reflect"
"strings"
"github.com/olekukonko/tablewriter"
"github.com/smartcontractkit/chainlink/core/store/config"
"github.com/smartcontractkit/chainlink/core/store/presenters"
"github.com/smartcontractkit/chainlink/core/utils"
"github.com/smartcontractkit/chainlink/core/web"
... |
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// This file contains the test for canonical struct tags.
package a
import "encoding/xml"
type StructTagTest struct {
A int "hello" // want "`h... |
package flags
import (
"fmt"
"io"
"os"
"path"
"reflect"
"strconv"
"strings"
"time"
"github.com/dustin/go-humanize"
"github.com/thought-machine/go-flags"
)
// A CompletionHandler is the type of function that our flags library uses to handle completions.
type CompletionHandler func(parser *flags.Parser, item... |
package protocolnetlink
import (
"fmt"
"sync"
"github.com/bio-routing/bio-rd/config"
bnet "github.com/bio-routing/bio-rd/net"
"github.com/bio-routing/bio-rd/route"
"github.com/bio-routing/bio-rd/routingtable"
"github.com/bio-routing/bio-rd/routingtable/filter"
log "github.com/sirupsen/logrus"
"github.com/vis... |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package organizations
import (
"context"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
"github.com/aws/aws-sdk-go-v2/private/protocol"
"github.com/aws/aws-sdk-go-v2/private/protocol/jsonrpc"
)
type DetachP... |
package main
/*
Copyright 2015 <NAME> <<EMAIL>>
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 wr... |
/*
* Copyright (c) 2021 yedf. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
package busi
import (
"context"
"database/sql"
"errors"
"fmt"
"net"
"github.com/dtm-labs/dtmcli"
"github.com/dtm-labs/dtmcli/dtmimp"
"github.com/dtm-... |
package crypto
import (
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/sha512"
"crypto/x509"
"math/big"
"github.com/nspcc-dev/neofs-crypto/internal"
"github.com/pkg/errors"
)
const (
// ErrEmptyPublicKey when PK passed to Verify method is nil.
ErrEmptyPublicKey = internal.Error("empty public key")
... |
package service
import (
"errors"
"fmt"
"sort"
"strings"
"code.cloudfoundry.org/cli/cf/flags"
. "code.cloudfoundry.org/cli/cf/i18n"
"code.cloudfoundry.org/cli/cf/actors/servicebuilder"
"code.cloudfoundry.org/cli/cf/commandregistry"
"code.cloudfoundry.org/cli/cf/configuration/coreconfig"
"code.cloudfoundry.... |
// Code generated by entc, DO NOT EDIT.
package ent
import (
"fmt"
"strings"
"time"
"entgo.io/ent/dialect/sql"
"github.com/drrrMikado/shorten/internal/repo/ent/alias"
)
// Alias is the model entity for the Alias schema.
type Alias struct {
config `json:"-"`
// ID of the ent.
ID int `json:"id,omitempty"`
//... |
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package collate
import (
"sort"
"github.com/gomirror/text/internal/colltab"
"github.com/gomirror/text/language"
"github.com/gomirror/text/unicode/norm"
)
... |
/*
Copyright (C) 2018 Synopsys, Inc.
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
"... |
package 围碁
import "github.com/gorgonia/agogo/game"
var _ game.State = &Game{}
type historicalBoard struct {
board []game.Colour
hash game.Zobrist
}
// Game implements game.State and mcts.GameState
type Game struct {
board *Board
history []game.PlayerMove
historical []historicalBoard
nextToMove game.P... |
package validator
import (
"reflect"
"strconv"
"strings"
)
// extractTypeInternal gets the actual underlying type of field value.
// It will dive into pointers, customTypes and return you the
// underlying value and it's kind.
func (v *validate) extractTypeInternal(current reflect.Value, nullable bool) (reflect.Va... |
// Package services encapsulates all the functionality around Epinio services
package services
import (
"context"
"errors"
"fmt"
"github.com/epinio/epinio/helpers/kubernetes"
corev1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
type Service... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.