text
stringlengths
3.08k
10.4k
package prune import ( "fmt" "io" "os" "text/tabwriter" "time" "github.com/spf13/cobra" kapi "k8s.io/kubernetes/pkg/api" kclient "k8s.io/kubernetes/pkg/client/unversioned" kcmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" "github.com/openshift/origin/pkg/client" "github.com/openshift/origin/pkg/cmd/templ...
// Copyright 2016-2020, Pulumi Corporation. // // 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...
// Copyright 2015 <NAME>. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build linux // A Go interface to linux kernel keyrings (keyctl interface) package keyctl // All Keys and Keyrings have unique 32-bit serial number identifiers. ty...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package mediaconnect 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" ) // The updates that you want to make to a specific entitlement. // Ple...
package govalidator import ( "encoding/json" "fmt" "net/http" "net/url" "reflect" "strings" ) const ( tagIdentifier = "json" //tagName idetify the struct tag for govalidator tagSeparator = "|" //tagSeparator use to separate tags in struct defaultFormSize int64 = 1024 * 1024 * 1 ) type ( ...
// Copyright 2016 CoreOS, 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 ...
// Copyright 2019 fatedier, <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 ...
// Package router is a network/router selector package router import ( "context" "os" "sort" "sync" "github.com/micro/go-micro/v2/client" "github.com/micro/go-micro/v2/client/selector" "github.com/micro/go-micro/v2/registry" "github.com/micro/go-micro/v2/router" pb "github.com/micro/go-micro/v2/router/servic...
package config import ( "time" ) // Config defines the configuration structure. type Config struct { General struct { LogLevel int `mapstructure:"log_level"` LogToSyslog bool `mapstructure:"log_to_syslog"` } `mapstructure:"general"` Filters struct { NetIDs []string `mapstructure:"net_ids"` JoinE...
package cli import ( "flag" "fmt" "strconv" "strings" ) // Int64Slice is an opaque type for []int to satisfy flag.Value and flag.Getter type Int64Slice []int64 // Set parses the value into an integer and appends it to the list of values func (f *Int64Slice) Set(value string) error { tmp, err := strconv.ParseInt...
/* 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, ...
// Copyright (c) 2019 The virnsnap authors. See file "AUTHORS". // Licensed under the MIT License. You have obtained a copy of the License at // the "LICENSE" file in this repository. // Package cmd implements the handlers for the different command line arguments. package cmd import ( "bufio" "fmt" "os" "strings"...
package calcium import ( "context" "encoding/json" "errors" "fmt" "io" "io/ioutil" "os" "time" enginetypes "github.com/projecteru2/core/engine/types" "github.com/projecteru2/core/log" "github.com/projecteru2/core/types" ) // BuildImage will build image func (c *Calcium) BuildImage(ctx context.Context, opt...
package build import ( "bufio" "fmt" "os" "strings" "time" "github.com/mycujoo/kube-deploy/cli" "github.com/mycujoo/kube-deploy/config" ) const testCommandImage = "mycujoo/gcloud-docker" func MakeAndPushBuild(forcePush bool, dirtyWorkDirOverride bool, keepTestContainer bool, repoConfig config.RepoConfigMap) ...
/* 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, ...
package graph import ( "encoding/xml" "errors" "fmt" "io" "os" "path" "path/filepath" "strings" "github.com/kardianos/osext" "github.com/hackborn/ghost/node" ) // A message passed between nodes. type builder struct { graph *Graph order []node.Node } func (b *builder) build(la LoadArgs) { // For now th...
// Copyright (c) 2017 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 or a...
// Package pgstorage is an PostgreSQL implementation of storage interface. // It allows to persist objects in PostgreSQL database. package pgstorage import ( "context" "database/sql" "github.com/pkg/errors" "github.com/shopspring/decimal" "github.com/twonegatives/coinsph_challenge/pkg/entities" "github.com/twon...
/* Copyright IBM Corp. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package chaincode import ( "bytes" "fmt" "sort" "strings" "justledger/core/chaincode/accesscontrol" "justledger/core/chaincode/platforms" "justledger/core/common/ccprovider" "justledger/core/container" "justledger/core/conta...
// Code generated by entc, DO NOT EDIT. package ent import ( "fmt" "strings" "entgo.io/ent/dialect/sql" "github.com/direktiv/direktiv/pkg/flow/ent/ref" "github.com/direktiv/direktiv/pkg/flow/ent/route" "github.com/direktiv/direktiv/pkg/flow/ent/workflow" "github.com/google/uuid" ) // Route is the model entit...
package kubeconverters import ( "context" "github.com/solo-io/gloo/pkg/utils/protoutils" v1 "github.com/solo-io/gloo/projects/gloo/pkg/api/v1" "github.com/solo-io/solo-kit/pkg/api/v1/clients/kubesecret" "github.com/solo-io/solo-kit/pkg/api/v1/resources" skcore "github.com/solo-io/solo-kit/pkg/api/v1/resources/c...
package simplepath import ( "github.com/spn/go/services/horizon/internal/db2/core" "github.com/spn/go/services/horizon/internal/paths" "github.com/spn/go/xdr" ) // MaxPathLength is a maximum path length as defined in XDR file (includes source and // destination assets). const MaxPathLength uint = 7 // search repr...
// Code generated by go-swagger; DO NOT EDIT. package container // 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 "github.co...
// Copyright 2021 Workrise 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 ...
/* Copyright 2019 Bloomberg Finance LP. 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, so...
package cachekv import ( "bytes" "container/list" "io" "sort" "sync" cmn "github.com/tendermint/tendermint/libs/common" dbm "github.com/tendermint/tendermint/libs/db" "github.com/cosmos/cosmos-sdk/store/types" "github.com/cosmos/cosmos-sdk/store/tracekv" ) // If value is nil but deleted is false, it means...
// Copyright (c) 2018 Cisco 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 applicabl...
// Copyright 2019 - 2022 The Samply Community // // 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 types import ( "context" "fmt" cmn "github.com/blockchainworkers/conch/libs/common" "github.com/blockchainworkers/conch/libs/log" tmpubsub "github.com/blockchainworkers/conch/libs/pubsub" ) const defaultCapacity = 0 type EventBusSubscriber interface { Subscribe(ctx context.Context, subscriber string, ...
// Copyright 2019 DxChain, All rights reserved. // Use of this source code is governed by an Apache // License 2.0 that can be found in the LICENSE file. package erasurecode import ( "bytes" "errors" "fmt" "io" ) // EncodedShardUnit minimum unit for encoded data structure const EncodedShardUnit = 64 // ErrInsuf...
/* Copyright 2018 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://www.apache.org/licenses/LICENSE-2.0 or in the "license...
// Package fasthttp implements http load generator with fasthttp transport. package fasthttp import ( "fmt" "log" "net" "net/url" "strconv" "strings" "sync" "sync/atomic" "time" "github.com/valyala/fasthttp" "github.com/vearutop/plt/nethttp" "github.com/vearutop/plt/report" ) // JobProducer sends HTTP re...
// // Copyright (C) 2021 IOTech Ltd // // SPDX-License-Identifier: Apache-2.0 package transformer import ( "fmt" "sync" "time" "github.com/edgexfoundry/device-sdk-go/v2/internal/cache" "github.com/edgexfoundry/device-sdk-go/v2/internal/container" "github.com/edgexfoundry/device-sdk-go/v2/pkg/models" bootstra...
package auth import ( "errors" "net/http" "fmt" "io/ioutil" "crypto/rsa" "time" "strings" "github.com/DarthHater/bored-board-service/database" "github.com/DarthHater/bored-board-service/model" "github.com/DarthHater/bored-board-service/constants" "github.com/gin-gonic/gin" "github.com/dgrijalva/jwt-go" l...
package query import ( "bytes" "encoding/binary" "errors" "fmt" "unsafe" ) // We implement a custom binary marshaller for a list of repos to // branches. When profiling Sourcegraph this is one of the dominant items. // // Wire-format of map[string][]string is pretty straightforward: // // byte(1) version // uvar...
/* Type describing the tracker events. */ package rep import ( "math" "github.com/icza/s2prot" ) const ( // TrackerEvtIDPlayerStats is the ID of the Player Stats tracker event TrackerEvtIDPlayerStats = 0 // TrackerEvtIDUnitBorn is the ID of the Unit Born tracker event TrackerEvtIDUnitBorn = 1 // TrackerE...
package client import ( "context" "encoding/json" "fmt" "os" "github.com/pkg/errors" "github.com/spf13/pflag" "github.com/zrepl/zrepl/cli" "github.com/zrepl/zrepl/config" "github.com/zrepl/zrepl/daemon/filters" "github.com/zrepl/zrepl/zfs" ) var TestCmd = &cli.Subcommand{ Use: "test", SetupSubcommands: ...
package provision import ( "errors" "os" "path/filepath" "strings" "time" "github.com/golang/glog" "github.com/kubernetes-incubator/external-storage/lib/controller" corev1 "k8s.io/api/core/v1" storagev1 "k8s.io/api/storage/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" ) t...
package day12 import ( "bufio" "fmt" "log" "os" ) func abs(a int) int { if a < 0 { return -a } return a } type vec [3]int func vec_sub(a vec, b vec) vec { return vec{a[0]-b[0],a[1]-b[1],a[2]-b[2]} } func vec_add(a vec, b vec) vec { return vec{a[0]+b[0],a[1]+b[1],a[2]+b[2]} } func vec_sum_abs(a vec) int...
// Copyright 2016-2018, Pulumi Corporation. // // 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...
// Copyright 2021 Yahoo Inc. // Licensed under the terms of the Apache 2.0 License. See LICENSE file in project root for terms. package main import ( "errors" "flag" "fmt" "log" "os" "os/exec" "strings" "github.com/google/goterm/term" ) type RsyncOpts struct { ProjectDir string Nodes []string Exclud...
/** * Copyright 2014 @ S1N1 Team. * name : * author : jarryliu * date : 2013-12-08 11:44 * description : * history : */ package sale import ( "errors" "go2o/src/core/domain/interface/sale" "time" ) var _ sale.ISale = new(Sale) const MAX_CACHE_SIZE int = 1000 type Sale struct { _partnerId int _saleRep ...
package repeatr import ( "github.com/warpfork/go-errcat" "go.polydawn.net/go-timeless-api/rio" ) type ErrorCategory string // Error implements the errcat.Error interface, specifically using // this package's ErrorCategory as the concrete category, // and giving us a type to hang custom serialization on. type Erro...
package plivo import ( "bytes" "crypto/hmac" "crypto/sha1" "crypto/sha256" "encoding/base64" "fmt" "net/url" "reflect" "sort" "strings" ) func Numbers(numbers ...string) string { return strings.Join(numbers, "<") } func headersWithSep(headers map[string]string, keyValSep, itemSep string, escape bool) stri...
package types /* Activity ... */ type Activity struct { ID string `json:"id,omitempty"` Actor activityActor `json:"actor,omitempty"` Verb string `json:"verb,omitempty"` Generator ...
package main import ( "crypto/sha256" "errors" "io" "net/http" "net/url" "strings" "time" ) // A very simple http proxy func createHTTPClient() *http.Client { client := &http.Client{ Transport: &http.Transport{ MaxIdleConnsPerHost: MaxIdleConnections, }, //Timeout: time.Duration(RequestTimeout...
package app // ProgramName defines this application name const ProgramName = "{{ Project }}" // ProgramVersion set this application version // This is supposed to be automatically populated by the Makefile using the value from the VERSION file // (-ldflags '-X main.ProgramVersion=$(shell cat VERSION)') var ProgramVer...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: user.proto package protoc import ( fmt "fmt" math "math" proto "github.com/golang/protobuf/proto" timestamp "github.com/golang/protobuf/ptypes/timestamp" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal va...
package cmd import ( "fmt" "github.com/jaeles-project/jaeles/sender" "log" "strings" "sync" "github.com/jaeles-project/jaeles/core" "github.com/jaeles-project/jaeles/database" "github.com/jaeles-project/jaeles/libs" "github.com/jaeles-project/jaeles/server" "github.com/jaeles-project/jaeles/utils" "github...
package core import ( "io" "os" "unicode" "unicode/utf8" ) type Text struct { ctx cmdContext buf Buffer origin int64 q0, q1 int64 selEnd *int64 // position for ReadRune pp int64 } func newText(ctx cmdContext, buf Buffer) *Text { return &Text{ ctx: ctx, buf: buf, } } func (t *Text) Reset() { t.pp...
package goshopify import ( "fmt" "net/http" "time" ) const smartCollectionsBasePath = "smart_collections" const smartCollectionsResourceName = "collections" // SmartCollectionService is an interface for interacting with the smart // collection endpoints of the Shopify API. // See https://help.shopify.com/api/refe...
/* * Copyright (c) 2019 WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you 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...
package oommf import ( "fmt" "github.com/XuebingZhao/3/data" "io" "log" "strings" "unsafe" ) func WriteOVF2(out io.Writer, q *data.Slice, meta data.Meta, dataformat string) { writeOVF2Header(out, q, meta) writeOVF2Data(out, q, dataformat) hdr(out, "End", "Segment") } func writeOVF2Header(out io.Writer, q *d...
// Copyright 2020 The go-ego Project Developers. // // 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 protocol import ( "bytes" "crypto" "crypto/x509" "crypto/x509/pkix" "encoding/asn1" "fmt" "time" "github.com/bukodi/go_S-MIME/oid" ) // SignerInfo ::= SEQUENCE { // version CMSVersion, // sid SignerIdentifier, // digestAlgorithm DigestAlgorithmIdentifier, // signedAttrs [0] IMPLICIT SignedAtt...
package cmd import ( "bufio" "fmt" "os" "strconv" "strings" "sync" "time" "github.com/spf13/cobra" apitypes "github.com/puppetlabs/wash/api/types" cmdutil "github.com/puppetlabs/wash/cmd/util" ) func psCommand() *cobra.Command { use, aliases := generateShellAlias("ps") psCmd := &cobra.Command{ Use: ...
package git_test import ( "errors" "fmt" "io" "os" "path" "path/filepath" "strconv" "github.com/alessio/shellescape" . "github.com/onsi/ginkgo" "gopkg.in/yaml.v3" "github.com/werf/werf/integration/pkg/utils" "github.com/werf/werf/integration/pkg/utils/docker" ) var _ = Describe("Git add file renames", f...
// 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 // TODO: return value from newobject/newarray is non-nil. // nilcheckelim eliminates unnecessary nil checks. func nilcheckelim(f *Func) { // A ni...
package scw import ( "encoding/json" "fmt" "strings" "github.com/scaleway/scaleway-sdk-go/internal/errors" "github.com/scaleway/scaleway-sdk-go/logger" "github.com/scaleway/scaleway-sdk-go/validation" ) // localityPartsSeparator is the separator used in Zone and Region const localityPartsSeparator = "-" // Zo...
package downloader import ( "fmt" "io" "log" "os" "os/exec" "sync" "time" "github.com/cheggaaa/pb" "github.com/hondajojo/annie/config" "github.com/hondajojo/annie/request" "github.com/hondajojo/annie/utils" ) // URLData data struct of single URL type URLData struct { URL string Size int64 Ext string...
package rpio import ( "errors" ) type SpiDev int // SPI devices. // Only SPI0 supported for now. const ( Spi0 SpiDev = iota Spi1 // aux Spi2 // aux ) const ( csReg = 0 fifoReg = 1 // TX/RX FIFO clkDivReg = 2 ) var ( SpiMapError = errors.New("SPI registers not mapped correctly - are you ...
package cryptolib import ( "encoding/binary" "encoding/hex" "errors" "fmt" "math/big" "strconv" ) // GetBlockSubsidyForHeight func func GetBlockSubsidyForHeight(height uint64) uint64 { halvings := height / 210000 // Force block reward to zero when right shift is undefined. if halvings >= 64 { return 0 } ...
package chanfunding import ( "fmt" "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcutil" "github.com/lightningnetwork/lnd/input" "github.com/lightningnetwork/lnd/lnwallet/chainfee" ) // ErrInsufficientFunds is a type matching the error interface which is // returned ...
// Copyright 2021 FerretDB 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-2017 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 "lic...
package main import ( "fmt" ) // BTree -- type BTree struct { Root *BNode } // BNode -- type BNode struct { Value int Left *BNode Right *BNode } // main -- package main implements Binary Tree operations // and solution to the House Robber problem. func main() { var b BTree fmt.Println("*************...
// Copyright [2019] LinkedIn Corp. 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 dockerfile import ( "bytes" "fmt" "io/ioutil" "path/filepath" "strconv" "strings" log "github.com/Sirupsen/logrus" "github.com/cloudimmunity/go-dockerclientx" ) type imageInst struct { instCmd string instComment string instType string instTime int64 layerImageID string imageName ...
// +build ignore /* Copyright 2016 <NAME> <<EMAIL>> 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 applicab...
package aescbc import ( "crypto/cipher" "crypto/hmac" "crypto/sha256" "crypto/sha512" "crypto/subtle" "encoding/binary" "fmt" "hash" "github.com/pkg/errors" ) const ( NonceSize = 16 ) func pad(buf []byte, n int) []byte { rem := n - len(buf)%n if rem == 0 { return buf } newbuf := make([]byte, len(bu...
package internal import ( "fmt" "io" "io/ioutil" "net/http" "net/url" "strings" ) type URLParameters map[string]string type HTTPOptionalParams struct { Headers http.Header URLParameters URLParameters Body url.Values } // Construct an URL including on parameters func HTTPConstructURL(baseURL ...
package cache import ( "hash/crc32" "sync" ) // A cache that is comprised other caches in a ring. // // Each cache is protected with a Mutex that is locked for write // operations. // // Keys are hashed into the ring and added to their respective // caches. // type ConcurrentRingCache struct { SizeLimit int RingS...
// Package cloudlatencytest provides access to the Google Cloud Network Performance Monitoring API. // // Usage example: // // import "github.com/jfcote87/api/cloudlatencytest/v2" // ... // cloudlatencytestService, err := cloudlatencytest.New(oauthHttpClient) package cloudlatencytest import ( "errors" "fmt" "...
/* Copyright 2022 k0s 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, software dis...
// Copyright (C) 2021 Google 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 t...
package sidecar import ( "fmt" "io/ioutil" "log" "net/http" "strconv" "time" "github.com/pkg/errors" "github.com/streadway/amqp" "github.com/msf/sidecar/mailbox" ) // sender is an http proxy sidecar, it pretends to be an http server and // proxies all http requests to a RabbitMQ persistent queue // It is c...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package ecs import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) // Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/UpdateContainerInstancesStateRequest type UpdateContai...
package service import ( "blog/config" "crypto/md5" "errors" "fmt" "github.com/dgrijalva/jwt-go" jwtmiddleware "github.com/iris-contrib/middleware/jwt" "github.com/kataras/iris/v12" "time" ) var response Response const ( JWT_KEY = "Authorization" ) /** 注册中间件 */ func GetJWTHandler() *jwtmiddleware.Middlewar...
/* Copyright (c) 2020 vesoft inc. All rights reserved. * * This source code is licensed under Apache 2.0 License, * attached with Common Clause Condition 1.0, found in the LICENSES directory. */ package completer import ( "strings" ) // all keywords var keywords = []string{ "GO", "AS", "TO", "OR", "AND", "XOR"...
package bindings import ( "context" "fmt" "io" "net" "net/http" "net/url" "path/filepath" "strings" "github.com/containers/libpod/pkg/api/handlers" jsoniter "github.com/json-iterator/go" "github.com/pkg/errors" ) var ( defaultConnectionPath string = filepath.Join(fmt.Sprintf("v%s", handlers.MinimalApiVer...
package bitmexgo import ( "context" "io/ioutil" "net/http" "net/url" "strings" "github.com/aiviaio/bitmexgo/optional" ) // Linger please var ( _ context.Context ) type FundingApiService service /* FundingApiService Get funding history. * @param ctx context.Context - for authentication, logging, cancellatio...
/* Copyright 2021 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, ...
/* 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 to in writing, software distributed under the Li...
package main import ( "encoding/binary" "gotos/system" ) const ( pageFlagValid uint32 = 0x01 // the virtual address is valid pageFlagRead = 0x02 // indicates that the processor is allowed to read data from this address pageFlagWrite = 0x04 // indicates that the processor is allowed to wri...
package maccommand import ( "testing" "github.com/brocaar/loraserver/internal/common" "github.com/brocaar/loraserver/internal/session" "github.com/brocaar/loraserver/internal/test" "github.com/brocaar/lorawan" . "github.com/smartystreets/goconvey/convey" ) func TestQueue(t *testing.T) { conf := test.GetConfig...
// Copyright 2016 The Gosl 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 fun import ( "math" "github.com/cpmech/gosl/io" ) // Sinusoid implements the sinusoid equation: // // y(t) = A0 + C1⋅cos(ω0⋅t + θ) ...
/* Copyright (C) 2016 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, softwa...
// Copyright 2019 The Fuchsia 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 artifacts import ( "context" "fmt" "io/ioutil" "os" "path/filepath" "strings" "time" "golang.org/x/crypto/ssh" "go.fuchsia.dev/fuchsia/...
// Copyright (c) 2017 <NAME> <<EMAIL>> // released under the ISC license package lib import ( "strings" "github.com/goshuirc/irc-go/ircfmt" "github.com/mgutz/ansi" ) var ( colourToAnsi = map[string]string{ "white": "white+h", "black": "black", "blue": "blue", "green": "green", ...
/* * Copyright 2019 the original author or 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 applic...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. package msihttpclient import ( "fmt" "github.com/Azure/azure-extension-foundation/httputil" "github.com/Azure/azure-extension-foundation/metadata" "github.com/Azure/azure-extension-foundation/msi" "io" "net/http" "n...
package network import ( "bytes" "errors" "net" "os/exec" "strings" "github.com/google/gopacket" "github.com/google/gopacket/layers" log "github.com/sirupsen/logrus" ) // Configuration for network interface. const ( // hostMode should be used when tracking traffic from a network end point. hostMode = "h...
package createdbtpl import ( "bytes" "context" "embed" "errors" "fmt" "os/exec" "regexp" "strings" "text/template" "unicode" "github.com/xo/xo/templates" xo "github.com/xo/xo/types" ) func init() { formatterPath, _ := exec.LookPath("sql-formatter") var formatterOptions []string if formatterPath != "" ...
/* * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2019-Present Datadog, Inc. */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO N...
// Copyright 2019 The LevelDB-Go and Pebble 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 pebble import ( "bytes" "fmt" "path/filepath" "strings" "testing" "github.com/cockroachdb/pebble/internal/base" "github.com/...
/* * go4api - an api testing tool written in Go * Created by: <NAME> 2019.07 * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * */ package testcase import ( "fmt" ...
package main import ( "context" "encoding/json" "fmt" "github.com/olivere/elastic" "golang.org/x/sync/errgroup" "io" "os" "strings" "time" ) type Batch struct { ID int Docs []map[string]interface{} } func indexBatch(ctx context.Context, client *elastic.Client, batch Batch) (time.Duration, error) { inde...
package vm import ( "errors" "fmt" "github.com/golang/glog" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" vmapi "github.com/rancher/vm/pkg/apis/ranchervm/v1alpha1" "github.com/rancher/vm/pkg/common" ...
package toypad import ( "encoding/binary" "fmt" "io" "log" ) // Command is a command to send to the toy pad. type Command struct { cmd cmd payload []byte cb func(payload []byte, err error) } // Format implements fmt.Formatter. func (cmd *Command) Format(f fmt.State, c rune) { switch c { case 'v': ...
/* * Copyright © 2020. TIBCO Software Inc. * This file is subject to the license terms contained * in the license file that is distributed with this file. */ package v200 import ( "context" "encoding/json" "fmt" "sync" "github.com/dgraph-io/dgo/v200" "github.com/dgraph-io/dgo/v200/protos/api" "github.com/d...