text
stringlengths
3.08k
10.4k
// Code generated by protoc-gen-go. // source: type.proto // DO NOT EDIT! /* Package message is a generated protocol buffer package. It is generated from these files: type.proto header.proto discover.proto command.proto event.proto register.proto device.proto components.proto inventory.proto It has these to...
package styx import ( "errors" "sort" "strings" badger "github.com/dgraph-io/badger/v2" ) // QuadStore is an interface for things that can persist datasets type QuadStore interface { Set(id ID, quads [][4]ID) error Get(id ID) ([][4]ID, error) Delete(id ID) error List(id ID) interface { Next() (id ID, valid...
// Copyright 2022 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 2020 Cango Author. // 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 main import ( "fmt" "reflect" "strings" ) type Type = reflect.Type var ( Types = []Type{ TypeBool, TypeInt, TypeInt8, TypeInt16, TypeInt32, TypeInt64, TypeUint, TypeUint8, TypeUint16, TypeUint32, TypeUint64, TypeFloat32, TypeFloat64, TypeComplex64, TypeComplex128, TypeUint...
package subprocessors import ( "bufio" "fmt" "os" "regexp" "strings" "github.com/dmachard/go-dnscollector/dnsutils" "github.com/dmachard/go-logger" "gopkg.in/fsnotify.v1" "inet.af/netaddr" ) type FilteringProcessor struct { config *dnsutils.Config logger *logger.Logger dropDomains ...
package transaction import ( "fmt" "github.com/CanonicalLtd/go-dqlite/internal/bindings" "github.com/ryanfaerman/fsm" ) // Txn captures information about an active WAL write transaction that has been // started on a SQLite connection configured to be in either leader or follower // replication mode. type Txn stru...
// TODO: disassembler support should be compiled in unconditionally, // instead of being decided by the build-target architecture, and be // part of the Arch object instead. package proc import ( "golang.org/x/arch/arm64/arm64asm" ) var maxInstructionLength uint64 = 4 type archInst arm64asm.Inst func asmDecode(me...
package mm import ( "testing" "strconv" "sync" "flag" "os" "time" ) var ( MethodAInfo = "I'm original MethodA" // So, MethodA here represents an exported method from some library you want to mock // By convention, it's in a form of method variable // MethodA = func(p1 int, p2 string) (r1 string) { re...
package networktypes import ( "github.com/pkg/errors" sdk "github.com/cosmos/cosmos-sdk/types" launchtypes "github.com/tendermint/spn/x/launch/types" ) // GenesisInformation represents all information for a chain to construct the genesis. // This structure indexes accounts and validators by their address for bett...
package main import ( "fmt" "log" "sort" "time" "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/autoscaling" "github.com/aws/aws-sdk-go/service/autoscaling/autoscalingiface" "github.com/aws/aws-sdk-go/service/e...
package main import ( "bytes" "flag" "html/template" "io" "log" "net/http" "os" "path/filepath" "strings" ) const ( SoundFolder = "snd" ) type CTL string const ( Stop CTL = "" ) func main() { var ( control = make(chan CTL, 3) errs = make(chan error, 30) kbd = flag.String("kbd", "", "path o...
package main import ( "fmt" "reflect" "sort" "testing" ) func TestLength(t *testing.T) { got := Length(nil) if want := 0; got != want { t.Errorf("got %d; want %d", got, want) } got = Length(BuildOneTwoThree()) if want := 3; got != want { t.Errorf("got %d; want %d", got, want) } } func TestCount(t *test...
// Package human provides a function for formatting and parsing quantities of // data as human-readable values such as 1MB or 2.2GB. package bytesize import ( "fmt" "math" "strconv" "unicode" ) // SI (base 10) units // See http://physics.nist.gov/cuu/Units/prefixes.html const ( KB float64 = 1000 MB = 10...
// // Copyright (c) 2018 The heketi Authors // // This file is licensed to you under your choice of the GNU Lesser // General Public License, version 3 or any later version (LGPLv3 or // later), or the GNU General Public License, version 2 (GPLv2), in all // cases as published by the Free Software Foundation. // packa...
package common import ( "errors" "fmt" "reflect" "strconv" ) func GetKey(dbName string, tableName string, fieldName string) string { return dbName + "_" + tableName + "_" + fieldName } //func GetValueString(v interface{}) string { // rawValue := reflect.Indirect(reflect.ValueOf(v)) // // stringV, _ := value2Str...
package atoms import ( "encoding/binary" "fmt" "hash/fnv" "github.com/corywalker/expreduce/pkg/expreduceapi" ) type Complex struct { Re expreduceapi.Ex Im expreduceapi.Ex needsEval bool } func (cmplx *Complex) AsExpr() expreduceapi.Ex { iSym := S("I") reInt, reIsInt := cmplx.Re.(*Integer) im...
package bpt import ( "github.com/bluekaki/pkg/stringutil" ) func (t *bpTree) Delete(val Value) (ok bool) { if val == nil { return } t.Lock() defer t.Unlock() return t.delete(val) } func (t *bpTree) delete(val Value) (ok bool) { if val == nil || t.size == 0 { return } var ( root = t.loadSnapshots(ro...
package upload import ( "reflect" "strings" "github.com/NyaaPantsu/nyaa/utils/validator/tag" "github.com/NyaaPantsu/nyaa/models/tag" "github.com/NyaaPantsu/nyaa/config" "github.com/NyaaPantsu/nyaa/models" "github.com/NyaaPantsu/nyaa/utils/sanitize" "github.com/NyaaPantsu/nyaa/utils/search" "github.com/Nyaa...
package kube import ( "encoding/json" "fmt" "io/ioutil" "os" "os/exec" "strings" "github.com/pkg/errors" "github.com/utilitywarehouse/kube-applier/metrics" "github.com/utilitywarehouse/kube-applier/sysutil" ) const ( // Default location of the service-account token on the cluster tokenPath = "/var/run/sec...
package chicken import ( "time" "github.com/lindsaygelle/nook" "github.com/lindsaygelle/nook/animal" "github.com/lindsaygelle/nook/character" "github.com/lindsaygelle/nook/gender" "github.com/lindsaygelle/nook/personality" "golang.org/x/text/language" ) var ( bettyBirthday = nook.Birthday{ Day: 0, Mont...
// Code generated by smithy-go-codegen DO NOT EDIT. package glacier import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" glaciercust "github.com/aws/aws-sdk-go-v2/service/glacier/internal/customizations" "github.com/aws/aws-sdk-go-v2/service/...
package gc_map import ( "context" "fmt" "github.com/hopkings2008/yigfs/server/common" . "github.com/hopkings2008/yigfs/server/error" "github.com/hopkings2008/yigfs/server/helper" "github.com/hopkings2008/yigfs/server/io_engine" "github.com/hopkings2008/yigfs/server/message/builder" meta_mgr "github.com/hopkin...
// Copyright (c) 2021 <NAME> // // This software is released under the MIT License. // https://opensource.org/licenses/MIT package main import ( "errors" "fmt" "io" "log" "strconv" "time" "github.com/go-gota/gota/dataframe" ) type Transaction struct { Date time.Time Description string Credit f...
package handlers import ( "encoding/json" "fmt" "log" "net/http" "serverside-final-project/servers/gateway/sessions" "github.com/gorilla/websocket" "github.com/streadway/amqp" ) // Control messages for websocket const ( // TextMessage denotes a text data message. The text message payload is // interpreted a...
package main import ( "flag" "fmt" "log" "reflect" "time" "gopkg.in/routeros.v2" ) var ( address = flag.String("a", "192.168.88.1:8728", "RouterOS address and port") username = flag.String("u", "admin", "User name") password = flag.String("p", "<PASSWORD>", "Password") out_interface = flag....
package anomalydetector import ( "log" "math" "math/rand" "time" ) type AnomalyDetector struct { Term int R float64 last float64 lastScore float64 lastProbe float64 Mu float64 Sigma float64 C []float64 Data []float64 DataSize int Identity []float64 Matrix ...
package stream import ( "bytes" "crypto/rand" "encoding/binary" "errors" "fmt" "io" "math" ) var ( // ErrMaxNonce indicates the max allowed nonce is reach. If this happends, a // new stream with different key should be created. ErrMaxNonce = errors.New("max nonce reached") // ErrWrongNonceInitiator indica...
// 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...
package heartbeat import ( "fmt" "path/filepath" "runtime" "strings" "github.com/wakatime/wakatime-cli/pkg/log" "github.com/wakatime/wakatime-cli/pkg/version" "github.com/wakatime/wakatime-cli/pkg/windows" "github.com/matishsiao/goInfo" "github.com/yookoala/realpath" ) // Heartbeat is a structure represent...
/* Copyright 2019 The 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 di...
/* * Copyright 2019, Offchain Labs, 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 ag...
//Package stream 流及相关对象的包 package stream import ( "context" "strconv" "sync" "time" log "github.com/Golang-Tools/loggerhelper" "github.com/Golang-Tools/redishelper/broker" "github.com/Golang-Tools/redishelper/broker/consumerabc" event "github.com/Golang-Tools/redishelper/broker/event" "github.com/Golang-Tool...
// Unless explicitly stated otherwise all files in this repository are licensed // under the Apache License Version 2.0. // This product includes software developed at Datadog (https://www.datadoghq.com/). // Copyright 2016-2019 Datadog, Inc. package metricsserver import ( goctx "context" "io/ioutil" "path/filepat...
package agent import ( "context" "github.com/rinx/alvd/internal/log" "github.com/rinx/alvd/internal/log/level" "github.com/rinx/alvd/pkg/alvd/agent/config" "github.com/rinx/alvd/pkg/alvd/agent/runner" "github.com/rinx/alvd/pkg/alvd/extension/lua" "github.com/rinx/alvd/pkg/alvd/observability" cli "github.com/...
package funnel import ( "context" "fmt" "io/ioutil" "net/http" "time" "github.com/nortonlifelock/aegis/pkg/log" "github.com/pkg/errors" ) type funnel struct { ctx context.Context client Client retries int ticker *time.Ticker delay time.Duration c...
package cmd import ( "fmt" "github.com/cheynewallace/tabby" "github.com/fatih/color" "github.com/kyokomi/emoji" "github.com/naveego/bosun/pkg/bosun" "github.com/naveego/bosun/pkg/util" "github.com/olekukonko/tablewriter" "github.com/spf13/cobra" "github.com/spf13/viper" "os" "path/filepath" "strings" ) va...
package server import ( "errors" "fmt" "sync" "github.com/ethereum/go-ethereum/rpc" "github.com/oasisprotocol/oasis-core/go/common/logging" "github.com/starfishlabs/oasis-evm-web3-gateway/conf" "github.com/starfishlabs/oasis-evm-web3-gateway/storage" ) type Server struct { Config *conf.Config Web3 *Web3G...
/* *Copyright (c) 2019-2021, Alibaba Group Holding Limited; *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 graphdriver import ( "bytes" "encoding/json" "fmt" "os" "path/filepath" "syscall" "github.com/containers/storage/pkg/idtools" "github.com/containers/storage/pkg/reexec" ) const ( chownByMapsCmd = "storage-chown-by-maps" ) func init() { reexec.Register(chownByMapsCmd, chownByMapsMain) } func chown...
package fs import ( "fmt" "hash/crc32" "io" "io/ioutil" "log" "os" "sync" "sync/atomic" "time" "github.com/gallir/bytebufferpool" "github.com/gallir/smart-relayer/lib" "github.com/gallir/smart-relayer/redis/fs/ifaceS3" ) var ( msgBytesPool = &bytebufferpool.Pool{} msgPool = &sync.Pool{ New: func...
package telegram import ( "bytes" "encoding/binary" "encoding/hex" "fmt" "html/template" "strconv" "strings" "time" "unicode/utf16" "arhat.dev/pkg/log" "arhat.dev/meeting-minutes-bot/pkg/botapis/telegram" "arhat.dev/meeting-minutes-bot/pkg/constant" "arhat.dev/meeting-minutes-bot/pkg/message" _ "embed...
package kafka_test import ( "errors" "os" "time" "github.com/Shopify/sarama" "github.com/altnometer/account/kafka" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) type MockConsumer struct { done chan bool PartitionsCall struct { Receive struct { Topic string } Return struct { Partition...
// // Modified BSD 3-Clause Clear License // // Copyright (c) 2019 Insolar Technologies GmbH // // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, // are permitted (subject to the limitations in the disclaimer below) provided that // the following conditions a...
// Package camera provides a virtual camera that allows for taking pictures of a scene. package camera import ( "github.com/austingebauer/go-ray-tracer/canvas" "github.com/austingebauer/go-ray-tracer/matrix" "github.com/austingebauer/go-ray-tracer/point" "github.com/austingebauer/go-ray-tracer/ray" "github.com/au...
package main import ( "errors" "fmt" //"math/rand" "time" "github.com/andsha/postgresutils" "github.com/andsha/vconfig" "github.com/sirupsen/logrus" ) type upload struct { m_sec vconfig.Section m_name string m_vconfig lvconfig m_logger *logrus.Entry m_flags cmdflags m_pgcon...
package tool import ( "fmt" "path/filepath" "github.com/vulppine/cmdio-go" "github.com/vulppine/fotoDen/generator" ) func isBlank(input string) bool { if input == "" { return true } return false } func setupWebsite(loc string, theme string) (WebsiteConfig, *generator.WebConfig) { fmt.Println("Wizard: Set...
package pgtypes import ( "github.com/apaxa-go/helper/mathh" "github.com/jackc/pgx" "reflect" "strings" "testing" ) func testNumeric_ScanPgx(t *testing.T) { type testElement struct { sql string n *Numeric err bool } setString := func(s string) *Numeric { var n Numeric n.setString(s) return &n } ...
package parser import ( "github.com/alltom/tomcalendar/pkg/datespec" "bufio" "fmt" "io" "regexp" "strconv" "strings" "time" ) type Entry struct { Title string DateSpec datespec.DateSpec } var ( commentPattern = regexp.MustCompile(`^\s*(#|//).*$`) dayOfMonthPattern = regexp.MustCompile(`^(...
// Copyright 2016 IBM 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 2020 <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 writing, softwar...
/* 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, ...
/* Copyright 2019 <NAME> 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 distribu...
/* * Copyright (c) 2020 Board of Trustees of the University of Illinois. * 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/licen...
// Copyright 2017 Rough Industries LLC. All rights reserved. //model/memcache.go:package model package model import ( "bytes" "encoding/gob" "github.com/CommonwealthCocktails/connectors" "github.com/bradfitz/gomemcache/memcache" "github.com/golang/glog" "strconv" ) //Clears out the whole memcache func DeleteAll...
/* * PDF to text: Extract all text for each page of a pdf file. * * Run as: go run pdf_extract_text.go input.pdf */ package main import ( common "./common" . "./core" . "./extractor" pdf "./model" "bytes" "fmt" "github.com/otiai10/gosseract" "io/ioutil" "os" "time" //"runtime" "strings" ) func main()...
package stream import ( bbi "github.com/BinaryHexer/nbw/internal/bundler" bbx "github.com/BinaryHexer/nbw/pkg/bundler" "github.com/reugn/go-streams" "google.golang.org/api/support/bundler" "math" "reflect" "sync" "time" ) const ( DefaultDelayThreshold = 2 * time.Second DefaultBundleCountThreshold = 10...
/* MIT License Copyright (c) 2021 MyBack 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...
// Copyright (c) 2021 <NAME> // Copyright (c) 2021 Regents of the University Of California // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/MIT. package main import ( "encoding/binary" "fmt" "io/ioutil" "log" "net" "...
// Copyright 2019 CEA // // 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...
// Code generated by go-swagger; DO NOT EDIT. package search_universal_relative // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "net/http" "time" "golang.org/x/net/context" "github.com/go-openapi/errors" "github.com/...
package gubrak // Operation represent the type of chainable operation type Operation string const ( OperationNone = "" OperationChunk = "Chunk()" OperationCompact = "Compact()" OperationConcatMany = "ConcatMany()" OperationConcat = "Concat()" OperationContains ...
package main import ( "math" "math/rand" . "github.com/jakecoffman/cp" "github.com/jakecoffman/cp/examples" ) const ( DENSITY = 1.0 / 10000.0 MAX_VERTEXES_PER_VORNOI = 16 ) type WorleyContex struct { seed uint32 cellSize float64 width, height int bb BB focus ...
// Copyright 2021 <NAME>. 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 ( "encoding/json" "fmt" "io/ioutil" "log" "net/http" "strings" "github.com/karalabe/go-threema" "github.com/spf13/cobra" "github.com/spf1...
package slot type Type byte const ( TypeOther Type = 1 + iota TypeUnknown TypeISA TypeMCA TypeEISA TypePCI TypePCCardPCMCIA TypeVL_VESA TypeProprietary TypeProcessorCardSlot TypeProprietaryMemoryCardSlot TypeIORiserCardSlot TypeNuBus TypePCI_66MHzCapable TypeAGP TypeAGP2X TypeAGP4X TypePCI_X TypeAG...
package ultimate_test_harness /* * 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, Versi...
// Package watcher watch change event package watcher import ( "context" "os" "path/filepath" "regexp" "strings" "time" "github.com/fsnotify/fsnotify" "go.uber.org/zap" "golang.org/x/sync/errgroup" e "github.com/hatappi/go-recmd/internal/event" ) var defaultExcludePaths = []string{ ".git", } // Watcher ...
package migrations import ( "context" "testing" "time" "gopkg.in/mgo.v2/bson" "github.com/evergreen-ci/evergreen" evgdb "github.com/evergreen-ci/evergreen/db" "github.com/evergreen-ci/evergreen/model/task" "github.com/evergreen-ci/evergreen/model/version" "github.com/mongodb/anser" "github.com/mongodb/anse...
/* * Copyright 2021 SAP SE * * 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...
package main import ( "fmt" "math" "time" "github.com/life4/gweb/canvas" "github.com/life4/gweb/web" ) const BGColor = "#ecf0f1" const BallColor = "#2c3e50" const TextColor = "#2c3e50" type Ball struct { context canvas.Context2D size int // position x, y int // movement vectorX int vectorY int // bo...
package gohome const ( SPRITE2D_SHADER_NAME string = "2D" SPRITE2D_MESH_NAME string = "SPRITE2D_MESH" FLIP_UNIFORM_NAME string = "flip" TEXTURE_REGION_UNIFORM_NAME string = "textureRegion" DEPTH_UNIFORM_NAME string = "depth" ENABLE_KEY_UNIFORM...
package client import "encoding/json" type GetInfoResult struct { Version string `json:"version"` Protocolversion int `json:"protocolversion"` Walletversion int `json:"walletversion"` Balance int `json:"balance"` Blocks int `json:"blocks"` Timeoffset int `jso...
// Wrappers for OpenGL // We won't wrap the 2.1 API, since a lot of it has become obsoleted // by 3.2 and onwards. // Only the API that is available in 2.x, but still supported // in the latest versions of openGL will be wrapped. package gl //#define GL_GLEXT_PROTOTYPES //#include <GL/gl.h> //#include <GL/glext.h> ...
// 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://aws.amazon.com/apache2.0/ // // or in the "license"...
package main import ( "github.com/Shopify/sarama" "flag" "fmt" "os" "os/signal" "strings" "time" // "reflect" "io/ioutil" ) var argRole = flag.String("role", "P", "Role choice: [P, C]") var argWorkId = flag.Int("work_id", 0, "work id") var argTopic = flag.String("topic", "topic_1", "topic id") var argRoutineN...
// Copyright (C) 2021 Gridworkz Co., Ltd. // KATO, Application Management Platform // 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 r...
// domains.go contains functions for dealing with domains (e.g. propagating domain changes) package core import ( "fmt" "zanaduu3/src/database" ) // Domain stores all information about Arbital domain (like Math or ValueAlignment) type Domain struct { ID string `json:"id"` PageID string `json:"pageId"` ...
package syncer import ( "context" "fmt" "k8s.io/apimachinery/pkg/api/errors" "reflect" log "github.com/sirupsen/logrus" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" ) ...
// Copyright 2021 MatrixOrigin. // // 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...
// *** WARNING: this file was generated by the Pulumi SDK Generator. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** package security import ( "context" "reflect" "github.com/pkg/errors" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // API Version: 2020-01-01. type Adaptive...
package main import ( "fmt" "os" "github.com/spf13/cobra" "github.com/pachisi456/sia-hostdb-profiles/build" ) var ( // globalConfig is used by the cobra package to fill out the configuration // variables. globalConfig Config ) // exit codes // inspired by sysexits.h const ( exitCodeGeneral = 1 // Not in s...
package mcorpc import ( "context" "encoding/json" "fmt" "sort" "strings" "github.com/choria-io/go-choria/choria" "github.com/choria-io/go-choria/server/agents" "github.com/choria-io/go-config" "github.com/choria-io/go-protocol/protocol" "github.com/choria-io/mcorpc-agent-provider/mcorpc/audit" "github.com/...
package router_test import ( "io/ioutil" "net/http" "net/http/httptest" "strings" "sync" "testing" "time" "github.com/stretchr/testify/assert" "github.com/matt-deboer/mpp/pkg/locator" "github.com/matt-deboer/mpp/pkg/router" _ "github.com/matt-deboer/mpp/pkg/selector/strategy/random" ) const validUpRespon...
/* Copyright 2021 The KServe 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 grpcweb import ( "bytes" "context" "encoding/binary" "io" "net/http" "github.com/pkg/errors" "google.golang.org/grpc" "google.golang.org/grpc/encoding" "google.golang.org/grpc/metadata" "github.com/ktr0731/grpc-web-go-client/grpcweb/parser" "github.com/ktr0731/grpc-web-go-client/grpcweb/transport"...
package model import ( "fmt" "strings" "github.com/kubernetes-incubator/kube-aws/cfnresource" "github.com/kubernetes-incubator/kube-aws/logger" "github.com/kubernetes-incubator/kube-aws/naming" "github.com/kubernetes-incubator/kube-aws/pkg/api" ) type Ref struct { PoolName string } type NodePoolConfig struct...
// Copyright (c) 2018 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...
package mqtt import ( "encoding/base64" "fmt" "strconv" "strings" "time" MQTT "github.com/eclipse/paho.mqtt.golang" "k8s.io/klog" beehiveContext "github.com/kubeedge/beehive/pkg/core/context" "github.com/kubeedge/beehive/pkg/core/model" "github.com/kubeedge/kubeedge/edge/pkg/common/modules" "github.com/ku...
// // Copyright 2019 Insolar Technologies GmbH // // 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 sentry import ( "encoding/json" "fmt" "net/url" "strconv" "strings" "time" ) type scheme string const ( schemeHTTP scheme = "http" schemeHTTPS scheme = "https" ) func (scheme scheme) defaultPort() int { switch scheme { case schemeHTTPS: return 443 case schemeHTTP: return 80 default: retur...
// Package gotenberg is a Gotenberg client with stream (io.Reader) support. package gotenberg import ( "errors" "fmt" "io" "io/ioutil" "mime/multipart" "net/http" "net/url" "time" "github.com/ilgooz/mattermost-plugin-topdf/server/topdf/pdfserver" perrors "github.com/pkg/errors" ) const ( // pingTimeout de...
// +build go1.7 // Copyright (c) 2019 Siemens AG // // 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, m...
package main import ( "context" "errors" "fmt" "io" "os" "strings" "github.com/alibaba/pouch/apis/types" "github.com/spf13/cobra" "golang.org/x/crypto/ssh/terminal" ) // startDescription is used to describe start command in detail and auto generate command doc. var startDescription = "Start one or more cre...
package postgres import ( "context" "database/sql" "encoding/json" "github.com/bots-house/share-file-bot/core" "github.com/bots-house/share-file-bot/pkg/log" "github.com/bots-house/share-file-bot/store/postgres/dal" "github.com/friendsofgo/errors" "github.com/volatiletech/null/v8" "github.com/volatiletech/sq...
/* Copyright IBM Corp. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package idemix import ( "github.com/golang/protobuf/proto" "github.com/mcc-github/blockchain-amcl/amcl" "github.com/mcc-github/blockchain-amcl/amcl/FP256BN" "github.com/pkg/errors" ) func NewIssuerKey(AttributeNames ...
package connect import ( "bytes" "errors" "fmt" "github.com/cilium/ebpf/ringbuf" "github.com/cilium/ebpf/rlimit" "github.com/vishvananda/netlink" "io" "io/fs" "log" "strings" ) // $BPF_CLANG and $BPF_CFLAGS are set by the Makefile. //go:generate bpf2go -cc $BPF_CLANG -cflags $BPF_CFLAGS bpf ../../bcc/flows....
package onvif import ( "errors" "net" "regexp" "strings" "time" "github.com/clbanning/mxj" "github.com/satori/go.uuid" ) var errWrongDiscoveryResponse = errors.New("Response is not related to discovery request") // StartDiscovery send a WS-Discovery message and wait for all matching device to respond func St...
// Copyright 2016 <NAME>. All rights reserved. Use of this source code is // governed by a BSD-style license that can be found in the LICENSE file. package multipass import "html/template" const ( notfoundPage = iota loginPage tokenInvalidPage tokenSentPage continueOrSignoutPage errorPage ) type page struct {...
// Copyright 2015 Canonical Ltd. // Licensed under the LGPLv3, see LICENCE file for details. // Package cache provides a simple caching mechanism // that limits the age of cache entries and tries to avoid large // repopulation events by staggering refresh times. package cache import ( "math/rand" "sync" "time" "...
package tsgen import ( "fmt" "path" "strings" "text/template" "github.com/351423113/go-zero/tools/goctl/api/spec" apiutil "github.com/351423113/go-zero/tools/goctl/api/util" "github.com/351423113/go-zero/tools/goctl/util" ) const ( handlerTemplate = `{{.imports}} {{.apis}} ` ) func genHandler(dir, webAPI, ...