text
stringlengths
3.08k
10.4k
// -*- coding: utf-8 -*- // Copyright (C) 2017 Nippon Telegraph and Telephone 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...
// Package psconfig is a utility package, built to load values from // AWS SSM Param Store into a custom configuration `struct` for your // application. package psconfig import ( "errors" "os" "reflect" "strings" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-g...
package par2 import ( "crypto/md5" "testing" "github.com/stretchr/testify/require" ) type testDecoderDelegate struct { t *testing.T } func (d testDecoderDelegate) OnCreatorPacketLoad(clientID string) { d.t.Helper() d.t.Logf("OnCreatorPacketLoad(%s)", clientID) } func (d testDecoderDelegate) OnMainPacketLoad(...
// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in wr...
package unit_test import ( "fmt" "reflect" "testing" "github.com/ni/systemlink-cli/internal/commandline" "github.com/ni/systemlink-cli/internal/model" ) var convertValuesTest = []struct { value string targetType model.ParameterType convertedValue interface{} err error }{ {"hello wor...
// Code generated by gotdgen, DO NOT EDIT. package tdapi import ( "context" "errors" "fmt" "sort" "strings" "go.uber.org/multierr" "github.com/gotd/td/bin" "github.com/gotd/td/tdjson" "github.com/gotd/td/tdp" "github.com/gotd/td/tgerr" ) // No-op definition for keeping imports. var ( _ = bin.Buffer{} _...
package memorypersistence import ( "context" "sort" "github.com/dogmatiq/verity/persistence" ) // LoadQueueMessages loads the next n messages from the queue. func (ds *dataStore) LoadQueueMessages( ctx context.Context, n int, ) ([]persistence.QueueMessage, error) { ds.db.mutex.RLock() defer ds.db.mutex.RUnloc...
/* Copyright 2016 The gta AUTHORS. All rights reserved. Use of this source code is governed by the Apache 2 license that can be found in the LICENSE file. */ package gta import ( "bufio" "fmt" "io" "os" "os/exec" "path/filepath" "strings" "sync" ) // Differ implements a single method, used to note code diffs...
package ontsdk import ( "math/rand" "fmt" "github.com/ontio/ontology-crypto/keypair" "github.com/ontio/ontology-go-sdk/client" "github.com/ontio/ontology-go-sdk/utils" "github.com/ontio/ontology/common" "github.com/ontio/ontology/common/constants" "github.com/ontio/ontology/core/payload" "github.co...
// Package main implements an Organization command-line client for the Organization service. package main import ( "context" "flag" "fmt" "log" "os" "time" pb "grpc_go_service_example/mbm/service/organization/organization" "google.golang.org/grpc" ) const ( address = "localhost:50051" cmdlineOrg = "o...
// Copyright (c) 2019,CAOHONGJU All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package flv import "errors" // SoundFormat UB [4] // Format of SoundData. The following values are defined: // 0 = Linear PCM, platform endian // 1 = AD...
package string import ( "bytes" "fmt" bytes2 "github.com/extensible-cms/ecms-go-filter/bytes" "regexp" "testing" ) var nameSubSequences [][]byte // Generate a set of subsequences for given valid html tag names and valid html attributes (used by // `TestStripHtmlTags` and `TestStripHtmlAttribs`). func init() { ...
// Copyright 2020 <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 writi...
package kafka import ( "fmt" "log" "strings" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) func kafkaACLResource() *schema.Resource { //lintignore:R011 return &schema.Resource{ Create: aclCreate, Read: aclRead, Delete: aclDelete, Importer: &schema.ResourceImporter{ State: ImportACL, ...
// Copyright (c) 2019, The Emergent 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 ( "github.com/emer/etable/etable" // include to get gui views "github.com/emer/etable/etensor" // include to get gui views ...
// Package quasigo implements a Go subset compiler and interpreter. // // The implementation details are not part of the contract of this package. package quasigo import ( "go/ast" "go/token" "go/types" ) // TODO(quasilyte): document what is thread-safe and what not. // TODO(quasilyte): add a readme. // Env is us...
package eval import ( "testing" "math" ) func TestCalculate(t *testing.T) { type args struct { substitutedExpression string } tests := []struct { name string args args want float64 wantErr bool }{ {"empty", args{""}, 0.0, true}, {"foreign symbol", args{"r"}, 0.0, true}, {"valid number |...
package db // The manifest tracks all the known SSTables. // // This includes an on-disk representation for crash safety as well as in-memory // cache to lookup keys by first finding the right tables to search. // // on-disk representation: // numTables uint32 // tables [numTables]tableInfo // // tableInfo: // l...
package webapp import ( "net/http" "github.com/authgear/authgear-server/pkg/api/model" "github.com/authgear/authgear-server/pkg/auth/handler/webapp/viewmodels" "github.com/authgear/authgear-server/pkg/auth/webapp" "github.com/authgear/authgear-server/pkg/lib/authn/identity" "github.com/authgear/authgear-server/...
// // DISCLAIMER // // Copyright 2017 ArangoDB GmbH, Cologne, Germany // // 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 require...
// Copyright 2016 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...
/* 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 ...
package main import ( "bytes" "fmt" "net/http" "time" "github.com/go-chi/chi" "github.com/go-chi/chi/middleware" "github.com/go-chi/cors" "github.com/jimmysawczuk/power-monitor/internal/monitor" "github.com/jimmysawczuk/power-monitor/internal/respond" "github.com/joho/godotenv" "github.com/kelseyhightower/...
// Copyright 2022 The Matrix.org Foundation C.I.C. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable...
package frm import ( "encoding/binary" "io" ) type column struct { fieldLength uint16 unireg uint8 flags uint16 uniregType uint8 charsetLow uint8 intervalNr uint8 fieldType uint8 charset uint8 comentLength uint16 name string } func (c *column) read(d []byte) { // skip...
package pcert import ( "crypto" "crypto/rand" "crypto/sha1" "crypto/x509" "crypto/x509/pkix" "fmt" "math/big" "reflect" "time" ) const ( // DefaultValidityPeriod is the validity period used for certificates which have not set NotAfter explicitly DefaultValidityPeriod = time.Hour * 24 * 365 ) // Create cre...
// Copyright 2021 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 analysis import ( "context" "time" "infra/appengine/weetbix/internal/clustering" cpb "infra/appengine/weetbix/internal/clustering/proto" bq...
package models import ( "errors" "github.com/jinzhu/gorm" ) // Post ポスト type Post struct { Model UserID int `json:"userID" binding:"required"` User *User `json:"user" gorm:"foreignKey:UserID"` PostParentID int `json:"postParentID"` PostParent *PostParent `json:"postParent...
// Copyright 2012 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. // embedded types package decls3 import "unsafe" import "fmt" // fields with the same name at the same level cancel each other out func _() { type ( T1 s...
package api import ( "fmt" kodingmodels "koding/db/models" "koding/db/mongodb/modelhelper" "net/url" "socialapi/models" "sync" "time" "github.com/gorilla/schema" "github.com/nlopes/slack" "gopkg.in/mgo.v2/bson" ) // SlackUser holds custom properties apart from slack' api response type SlackUser struct { s...
// Copyright 2018 <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 writi...
package main import ( "fmt" "strings" "encoding/json" "github.com/hyperledger/fabric/core/chaincode/shim" "github.com/hyperledger/fabric/protos/peer" ) type SimpleAsset struct { } type State [][]string // An important structure which describes a valid format for the update function argument. ty...
// Copyright 2020 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 aws import ( "github.com/infracost/infracost/internal/schema" "github.com/infracost/infracost/internal/usage" "github.com/shopspring/decimal" "github.com/tidwall/gjson" "strings" ) func GetStepFunctionRegistryItem() *schema.RegistryItem { return &schema.RegistryItem{ Name: "aws_sfn_state_machine", ...
package tracert import ( //"bufio" "context" "errors" "io" "net" "sync" "time" "golang.org/x/net/icmp" "golang.org/x/net/ipv4" ) type Config struct { MaxTTL int TOS int Timeout time.Duration Parallel int Delay time.Duration } var DefaultConfig = Config{ MaxTTL: 30, Timeout: 3 * time.S...
// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. // This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose ei...
// Copyright (c) 2019 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 app...
package image import ( "bytes" "errors" "fmt" "log" "os/exec" "strings" "github.com/henvic/picel/logger" "github.com/rakyll/magicmime" ) const ( // WebpQuality is the quality parameter to use when using cwebp WebpQuality = "92" // ImagickQuality is the quality parameter to use when using Imagick Imagick...
package main import ( "errors" "math/bits" "sort" "github.com/golang-collections/collections/queue" "github.com/golang-collections/go-datastructures/bitarray" "github.com/hillbig/rsdic" ) func prevPowerOf2(n uint) int { var u uint = 0 for n > 0 { n >>= 1 u++ } return 1 << (u - 1) } func nextPowerOf2(n...
// Copyright 2019 yhyzgn gox // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in w...
// Copyright 2019 Istio 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 i...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 // protoc v3.17.3 // source: service.proto package service import ( reflect "reflect" sync "sync" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl"...
package gt import ( "fmt" "reflect" "strings" ) type ( Align int Width uint64 Height uint64 Table struct { Lines Lines header Header rows []Row emptyText string output string } Header Row Row struct { width Width height Height Columns []Column } Column struct { h...
// Copyright 2020 <NAME> // SPDX-License-Identifier: Apache-2.0 // (Re-)generated by schema tool //////// DO NOT CHANGE THIS FILE! //////// // Change the json schema instead package sbtests import "github.com/iotaledger/wasp/packages/iscp" const ( ScName = "testcore" ScDescription = "Core test for ISCP was...
/* This application handles all the startup and connection scaffolding for running a gRPC server serving the APIService as defined in ${OM_ROOT}/internal/pb/matchfunction.pb.go All the actual important bits are in the API Server source code: apisrv/apisrv.go Copyright 2018 Google LLC Licensed under the Apache Licens...
package configload import ( "fmt" version "github.com/hashicorp/go-version" "github.com/hashicorp/hcl/v2" "github.com/hashicorp/terraform/configs" ) // LoadConfig reads the Terraform module in the given directory and uses it as the // root module to build the static module tree that represents a configuration, /...
package main import ( "bytes" "errors" "fmt" "io/ioutil" "log" "net/http" "strings" "time" "github.com/VirusTotal/gyp" "github.com/antonholmquist/jason" ) // VTBASEURL define the VirusTotal API endpoint for hash requesting const VTBASEURL = "https://www.virustotal.com/api/v3/intelligence/hunting_rulesets" ...
// Copyright 2015 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...
package interactions import ( "github.com/knightjdr/cmgo/pkg/fs" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/spf13/afero" ) var biogridText = `#BioGRID Interaction ID Entrez Gene Interactor A Entrez Gene Interactor B BioGRID ID Interactor A BioGRID ID Interactor B Systematic Name Interactor ...
package bootstrapping import ( "fmt" "github.com/ldsec/lattigo/v2/ckks" "github.com/ldsec/lattigo/v2/ckks/advanced" "github.com/ldsec/lattigo/v2/rlwe" "math" ) // Bootstrapper is a struct to stores a memory pool the plaintext matrices // the polynomial approximation and the keys for the bootstrapping. type Boots...
package meta import ( "github.com/puppetlabs/wash/cmd/internal/find/parser/predicate" ) /* If metadata predicates are constructed on metadata values, then metadata schema predicates are constructed on metadata schemas. Thus, one would expect that metadata schema predicate parsing is symmetric with metadata predicate...
package info // InfoServer is a struct for the results returned from an 'INFO server' // command // // Currently the members defined by redis are as follows. // redis_version // redis_git_sha1 // redis_git_dirty // redis_build_id // redis_mode // os // arch_bits // multiplexing_api // gcc_version // process_id // run_...
package secure import ( "bytes" "crypto/rand" "encoding/binary" "errors" "io" "net" "time" log "github.com/sirupsen/logrus" "golang.org/x/crypto/nacl/box" ) type SecureMessage struct { Msg []byte Size uint16 Nonce [24]byte } func (s *SecureMessage) toByteArray() []byte { length := []byte{0x0, 0x0} ...
package deployment import ( "fmt" "os" "strings" "testing" "github.com/stretchr/testify/assert" "github.com/krane/krane/internal/store" "github.com/krane/krane/internal/utils" ) const boltpath = "./krane.db" const testDeployment = "krane-test" func teardown() { os.Remove(boltpath) } func TestMain(m *testin...
package spiremgr import ( "context" "errors" "fmt" "github.com/go-logr/logr" "github.com/spiffe/spire/proto/spire/api/registration" "github.com/spiffe/spire/proto/spire/common" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "net/url" "path" ) type SpireUtils struct { SpireClient registratio...
package interfaces import ( "database/sql" "fmt" "github.com/kendellfab/publish/domain" "log" "strings" "time" ) type DbPageRepo struct { db *sql.DB cache *PageCache } func NewDbPageRepo(db *sql.DB) domain.PageRepo { pageRepo := &DbPageRepo{db: db} cache, err := NewPageCache(100) if err != nil { log....
package main import ( //"bytes" "encoding/json" "fmt" "io/ioutil" "net/http" "flag" "crypto/tls" "strconv" "strings" ) func get(url string, headers *map[string]string) (*http.Response, error) { client := &http.Client{} req, err := http.NewRequest("GET", url, nil) if err != nil { return nil...
// Copyright 2011 The LevelDB-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 db // Compression is the per-block compression algorithm to use. type Compression int const ( DefaultCompression Compression = iota NoCompre...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package databasemigrationservice import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) type ModifyReplicationInstanceInput struct { _ struct{} `type:"structure"` // The amount of storage (in ...
/* Copyright NetFoundry, 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 https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software ...
// Copyright 2021 The Kanister 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...
// Copyright 2009 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. // Calibration used to determine thresholds for using // different algorithms. Ideally, this would be converted // to go generate to create thresholds.go // T...
package main import ( "flag" "fmt" "log" "os" "os/signal" "syscall" "time" "github.com/google/uuid" "github.com/nsf/termbox-go" cron "github.com/robfig/cron/v3" ) // Todo represents something to accomplish. type Todo struct { Name string ID string CreatedAt time.Time } // Trigger defines wh...
package metadata import ( "bytes" "encoding/base64" "encoding/json" "errors" "reflect" "strconv" "github.com/incognitochain/incognito-chain/common" "github.com/incognitochain/incognito-chain/database" "github.com/incognitochain/incognito-chain/wallet" ) // PDETradeRequest - privacy dex trade type PDETradeRe...
package main import ( "fmt" "time" // "reflect" // "bytes" "encoding/json" // "strconv" "github.com/hyperledger/fabric/core/chaincode/shim" "github.com/hyperledger/fabric/protos/peer" ) /******************************************************** 상태값 Succcess - 운전자와 화물 의뢰자 간 계약이 채결이 된 상태 FA...
// Light-weight json logging package jlo import ( "fmt" "io" "os" "sync" "time" easyjson "github.com/mailru/easyjson" ) //go:generate easyjson -no_std_marshalers $GOFILE const ( // FieldKeyLevel is the log level log field name FieldKeyLevel = "@level" // FieldKeyMsg is the log message log field name Field...
// Copyright 2019-2020 Grabtaxi Holdings PTE LTE (GRAB), All rights reserved. // Use of this source code is governed by an MIT-style license that can be found in the LICENSE file package thriftlog import ( "encoding/json" "github.com/kelindar/talaria/internal/encoding/typeof" "github.com/kelindar/talaria/internal...
/* Copyright IBM Corp All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package views import ( "github.com/pkg/errors" "github.com/hyperledger-labs/fabric-smart-client/integration/fabric/iou/states" "github.com/hyperledger-labs/fabric-smart-client/platform/fabric" "github.com/hyperledger-labs/fabric-sm...
package payments import ( "context" "errors" "fmt" "net/http" "os" "testing" "time" "github.com/cpurta/go-raiden-client/config" "github.com/ethereum/go-ethereum/common" "github.com/jarcoal/httpmock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func ExampleLister() { var (...
package caller import ( "fmt" "reflect" helpersReflect "github.com/gomponents/gontainer-helpers/internal/reflect" ) func call(fn reflect.Value, params ...interface{}) (res []interface{}, err error) { if fn.Kind() != reflect.Func { return nil, fmt.Errorf("expects %s, %T given", reflect.Func.String(), fn.Type()....
/* Copyright 2014 Google Inc. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in ...
package app import ( "fmt" "os" "strings" "time" "github.com/fragmenta/assets" "github.com/fragmenta/query" "github.com/fragmenta/server/config" "github.com/fragmenta/server/log" "github.com/fragmenta/view" "github.com/fragmenta/fragmenta-cms/src/lib/mail" "github.com/fragmenta/fragmenta-cms/src/lib/mail/...
package alr_test import ( "bufio" "flag" "fmt" "io/ioutil" "os" "path/filepath" "testing" "time" alrcsv "github.com/CMSgov/bcda-app/bcda/alr/csv" alrgen "github.com/CMSgov/bcda-app/bcda/alr/gen" "github.com/CMSgov/bcda-app/bcda/models/fhir/alr" v1 "github.com/CMSgov/bcda-app/bcda/models/fhir/alr/v1" v2 "...
// Package apimanagement implements the Azure ARM Apimanagement service API version 2021-08-01. // // ApiManagement Client package apimanagement // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // // Code genera...
package store import ( "bytes" "fmt" "net/http" "github.com/douban/gobeansdb/cmem" "github.com/douban/gobeansdb/quicklz" "github.com/douban/gobeansdb/utils" ) const ( FLAG_INCR = 0x00000204 FLAG_COMPRESS = 0x00010000 FLAG_CLIENT_COMPRESS = 0x00000010 COMPRESS_RATIO_LIMIT = 0.7 TRY_COMPR...
/* 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, ...
package ardrone3 import ( "sync" log "github.com/Sirupsen/logrus" "github.com/krancour/go-parrot/protocols/arcommands" "github.com/krancour/go-parrot/ptr" ) // GPS related States // GPSState ... // TODO: Document this type GPSState interface { // RLock blocks until a read lock is obtained. This permits callers...
// Copyright <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, s...
package cmd import ( "github.com/rsteube/carapace" "github.com/rsteube/carapace-bin/pkg/actions/fs" "github.com/spf13/cobra" ) var rootCmd = &cobra.Command{ Use: "lsblk", Short: "list block devices", Long: "https://linux.die.net/man/8/lsblk", Run: func(cmd *cobra.Command, args []string) {}, } func Execut...
// Copyright 2018 NTT Group // 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, distribut...
package fileutil import ( "crypto/tls" "fmt" "io" "io/ioutil" "net" "net/http" "net/url" "os" "time" "github.com/ghetzel/go-stockutil/pathutil" "github.com/jlaffaye/ftp" "github.com/pkg/sftp" "golang.org/x/crypto/ssh" ) const DefaultOpenTimeout = time.Duration(10 * time.Second) type OpenOptions struct ...
// Copyright 2021 Rubrik, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to // deal in the Software without restriction, including without limitation the // rights to use, copy, modify, merge, publish, dist...
package mq import ( "encoding/json" "fwds/internal/conf" "fwds/pkg/httpclient" "fwds/pkg/log" "github.com/nsqio/go-nsq" "github.com/pkg/errors" "math/rand" "strconv" "sync" "time" ) func NewNSQ() *NSQ { return &NSQ{} } type NSQ struct { mux sync.Mutex p []*nsq.Producer } func (n *NSQ) newConfig() *ns...
package types import ( "fmt" "time" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/gogo/protobuf/proto" ) const ( BlockPeriodUnit = "block" TimePeriodUnit = "time" ) // ------------------------...
// *** 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 v1 import ( "context" "reflect" "github.com/pkg/errors" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Creates a debug session for a deployed API P...
// //Copyright [2016] [SnapRoute 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 agr...
package main import ( "context" "database/sql" "errors" "io/ioutil" "log" "net/http" "net/url" "sort" "strconv" "strings" "time" "scraper/entity/anigamer" "scraper/entity/bangumi" "scraper/models" "github.com/mailru/easyjson" "github.com/r3labs/diff/v2" "github.com/volatiletech/null/v8" "github.com...
package resources import ( "encoding/json" "fmt" "github.com/leandroberetta/mimik/pkg/api" "github.com/leandroberetta/mimik/pkg/generator" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/s...
//Package server contains the ts3chatter server. package server import ( "fmt" "github.com/crackdog/ts3sqlib" "log" "net/http" "strconv" "sync" "time" ) //Server contains the ts3 sq connection and other ts3 server data. type Server struct { ts3conn *ts3sqlib.SqConn servemux *http.ServeMux data ...
package eventService import ( "encoding/json" "fmt" "io/ioutil" "log" "net/http" "os" "time" "github.com/hacksoc-manchester/www/config" "github.com/patrickmn/go-cache" ) // An Event represents a HackSoc event. type Event struct { Name string Description string Location string URL ...
package main import ( "encoding/json" "fmt" "log" "net/http" "github.com/gofiber/fiber" "github.com/gofiber/fiber/middleware" "github.com/gorilla/mux" "github.com/jinzhu/gorm" _ "github.com/jinzhu/gorm/dialects/sqlite" ) type Car struct { gorm.Model Name string `json:"name"` Modelo string `json:"mode...
// Copyright 2018 The Operator-SDK 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 ...
/* Copyright 2020 The OpenYurt 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, so...
package server import ( "net/http" "runtime/debug" ut "github.com/go-playground/universal-translator" "github.com/go-playground/validator/v10" "github.com/labstack/echo/v4" "github.com/labstack/echo/v4/middleware" "github.com/saferwall/saferwall-api/internal/activity" "github.com/saferwall/saferwall-api/inter...
// Copyright 2021 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 gerrit import ( "context" "fmt" "infra/chromium/bootstrapper/gob" "strconv" "go.chromium.org/luci/auth" "go.chromium.org/luci/common/api/g...
// Copyright (C) 2020 Cisco Systems Inc. // Copyright (C) 2016-2017 Nippon Telegraph and Telephone 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....
// Copyright © 2019 The VirusTotal CLI authors. 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 require...
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** package ad import ( "github.com/pkg/errors" "github.com/pulumi/pulumi/sdk/go/pulumi" ) // Manages a Password associated with a Service Principal...
/* Copyright 2020 Elotl Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dist...
//go:build integration // +build integration package integration_test import ( "archive/zip" "bytes" "context" "fmt" "io" "os" "path/filepath" "strings" "testing" "time" "github.com/stretchr/testify/require" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" "google.golang.org/proto...