text
stringlengths
3.08k
10.4k
/* Copyright 2019 The Cloud-Barista 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 2020 Chaos Mesh 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 agree...
//go:generate mockgen -source auth.go -destination mock/auth.go -package mock package auth import ( "context" "encoding/base64" "encoding/json" "errors" "fmt" "net/http" "net/url" "strings" "time" ) const ( clientID = "2iZo3Uczt5LFHacKdM0zzgUO2eG2uDjT" deviceCodeEndpoint = "https://auth0....
// Copyright © 2018 aswinkarthik // // 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, di...
package awsprovider import ( "errors" "fmt" "strings" "gopkg.in/mgo.v2/bson" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/iam" "koding/kites/kloud/api/amazon" "koding/kites/kloud/kloud" "koding/kites...
// Copyright (c) 2021 Terminus, 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 agree...
// 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...
// Copyright 2020 The Cockroach Authors. // // Use of this software is governed by the Business Source License // included in the file licenses/BSL.txt. // // As of the Change Date specified in that file, in accordance with // the Business Source License, use of this software will be governed // by the Apache License, ...
/* Copyright 2017-2019 Gravitational, 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,...
/******************************************************************************* * * Copyright 2018 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 should have received a copy of the License along with this * program. If...
/* 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 ...
/* Copyright 2020-2021 Gravitational, 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,...
/* Copyright 2021 TriggerMesh Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softwar...
package response import ( "bufio" "bytes" "context" "fmt" "io" "io/ioutil" "net/http" "net/http/httputil" "net/url" "os" "os/exec" "regexp" "strconv" "strings" "time" "unicode" ) // Response is an HTTP response. type Response struct { Item string URL string Error error Duration time.Du...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package apigateway import ( "context" "time" "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" ) // Creates a new documentation version of a given API. type Crea...
package docker import ( "context" "fmt" "strings" "sync" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" dockerclient "github.com/docker/docker/client" hclog "github.com/hashicorp/go-hclog" "github.com/hashicorp/hcl" "github.com/spiffe/spire/pkg/agent/common/cgroups" "gi...
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"). You may // not use this file except in compliance with the License. A copy of the // License is located at // // http://aws.amazon.com/apache2.0/ // // or in the "license" file ...
// 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 2021. 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 un...
/* Copyright (C) BABEC. All rights reserved. SPDX-License-Identifier: Apache-2.0 */ package host import ( "context" "strconv" "testing" "time" "chainmaker.org/chainmaker/common/v2/crypto/asym" cmTls "chainmaker.org/chainmaker/common/v2/crypto/tls" cmx509 "chainmaker.org/chainmaker/common/v2/crypto/x509" "ch...
// The MIT License // // Copyright (c) 2020 Temporal Technologies Inc. All rights reserved. // // Copyright (c) 2020 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Soft...
package router import ( "blog-panda/conf" "blog-panda/internal/jwt" "blog-panda/model" "crypto/md5" "encoding/hex" "fmt" "html/template" "io" "os" "runtime" "strings" "time" "github.com/labstack/echo/v4" "github.com/labstack/echo/v4/middleware" "github.com/zxysilent/utils" ) var f...
// Copyright 2020 The Swarm 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 postage import ( "encoding/binary" "math/big" "sync" "github.com/holisticode/bee/pkg/swarm" "github.com/vmihailenco/msgpack/v5" ) // stampIss...
package main import ( "context" "database/sql" "github.com/bwmarrin/discordgo" "github.com/bwmarrin/lit" _ "github.com/go-sql-driver/mysql" "github.com/kkyr/fig" "github.com/zmb3/spotify" "golang.org/x/oauth2/clientcredentials" "math/rand" _ "modernc.org/sqlite" "os" "os/signal" "strconv" "strings" "sys...
package add import ( "fmt" "github.com/jenkins-x-plugins/jx-gitops/pkg/helmfiles" "github.com/jenkins-x-plugins/jx-gitops/pkg/rootcmd" "github.com/jenkins-x-plugins/jx-gitops/pkg/versionstreamer" "github.com/jenkins-x/jx-helpers/v3/pkg/cobras/helper" "github.com/jenkins-x/jx-helpers/v3/pkg/cobras/templates" "g...
package watch import ( "context" "sync" "time" "github.com/jakewright/home-automation/libraries/go/errors" "github.com/jakewright/home-automation/libraries/go/slog" "github.com/jakewright/home-automation/service.log/domain" "github.com/jakewright/home-automation/service.log/repository" "github.com/fsnotify/f...
// Copyright 2021 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 postgres import ( "context" "database/sql" "errors" "fmt" "sort" "strings" "github.com/lib/pq" "golang.org/x/pkgsite/internal" "golang.org/x/...
package main import ( "context" "fmt" "os" "path" "strings" "github.com/ovh/cds/sdk" "github.com/ovh/cds/sdk/log" "github.com/ovh/cds/sdk/plugin" ) var mapBuiltinActions = map[string]BuiltInActionFunc{} func init() { mapBuiltinActions[sdk.ArtifactUpload] = runArtifactUpload mapBuiltinActions[sdk.ArtifactD...
package chartplugin import ( "bytes" "fmt" "image/color" "log" "math/rand" "strings" "github.com/gonum/plot" "github.com/gonum/plot/plotter" "github.com/gonum/plot/plotutil" "github.com/gonum/plot/vg" "github.com/matannoam/comicjerk" "github.com/iopred/discordgo" ) type chartPlugin struct { comicjerk.Si...
package miscmodule import ( "math/rand" "sort" "strconv" "strings" bot "../sweetiebot" "github.com/erikmcclure/discordgo" ) const maxShowDice int64 = 250 type showrollCommand struct { } func (c *showrollCommand) Info() *bot.CommandInfo { return &bot.CommandInfo{ Name: "ShowRoll", Usage: ...
package kafka import ( "crypto/tls" "crypto/x509" "encoding/pem" "fmt" "github.com/Shopify/sarama" "github.com/google-cloud-tools/kafka-minion/options" log "github.com/sirupsen/logrus" "io/ioutil" "os" ) // saramaClientConfig returns a sarama config pre initialized with SASL / TLS settings // This function p...
/* Copyright 2020 The Skaffold 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, sof...
/* Copyright 2020 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 main import ( "bytes" "database/sql" "errors" "fmt" "io" "io/ioutil" "log" "os" "os/exec" "os/signal" "path/filepath" "strings" "syscall" "time" _ "github.com/golang-migrate/migrate/source/file" _ "github.com/lib/pq" "github.com/rubenv/sql-migrate" ) // SQLCloudProxyBinary is the name of the...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package rdsdata 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 request parameters represent the input of a request to start a SQL t...
/* * Copyright © 2015-2018 <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 o...
package main import ( "strconv" "github.com/stampzilla/stampzilla-go/v2/nodes/stampzilla-server/models/devices" ) /* No Unit / Data type Additional info 0 Degrees Divide by 10 1 On/off bool 0 or 1 2 Number Divide by 10 3 Percent Divide by 10 4 Ampere Divide by 10 5 kWh Divide by 10 6 Hours As is 7 Minutes...
// Package db provides a key-value database and functions related to // operating one. package db import ( "github.com/NethermindEth/juno/internal/log" "github.com/torquem-ch/mdbx-go/mdbx" ) // Databaser describes methods relating to an abstract key-value // database. type Databaser interface { // Has returns true...
package runner import ( "context" "encoding/json" "strconv" "testing" "time" "github.com/stretchr/testify/assert" ) func TestReport_MarshalJSON(t *testing.T) { z, _ := time.Parse(time.RFC822Z, "02 Jan 06 15:04 -0700") r := &Report{ Date: z, Count: 1000, Total: time.Duration(10) * time.Second, ...
package soy import ( "fmt" "io/ioutil" "log" "os" "path/filepath" "strings" "time" "github.com/robfig/soy/data" "github.com/robfig/soy/parse" "github.com/robfig/soy/parsepasses" "github.com/robfig/soy/soyhtml" "github.com/robfig/soy/template" "gopkg.in/fsnotify.v0" ) // Logger is used to print notificat...
// Copyright 2021 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 vta import ( "go/ast" "go/parser" "go/types" "io/ioutil" "reflect" "strings" "testing" "golang.org/x/tools/go/ssa" "golang.org/x/tools/go/ssa...
package cmd import ( "bytes" "fmt" "os" "text/template" "time" "syscall" "github.com/blang/semver" "github.com/oneconcern/datamon/pkg/errors" "github.com/rhysd/go-github-selfupdate/selfupdate" "github.com/spf13/cobra" ) const ( githubRepo = "oneconcern/datamon" ) var releaseDescriptorTemplate func(flags...
/* (c) Copyright 2017 Hewlett Packard Enterprise Development 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 agre...
// Package tests is a collection of consensus implementation test cases. package tests import ( "context" "fmt" "testing" "time" "github.com/stretchr/testify/require" "github.com/oasisprotocol/oasis-core/go/common/crypto/signature" memorySigner "github.com/oasisprotocol/oasis-core/go/common/crypto/signature/s...
// Copyright 2011 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 runtime import ( //"runtime/internal/atomic" "unsafe" ) const ( _NSIG = 65 ) type mOS struct { initialized bool mutex pthreadmutex cond ...
// Copyright (c) 2015 <NAME> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distri...
package cluster import ( "errors" "fmt" "strings" "time" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "github.com/kuadrant/kcp-glbc/pkg/tls" ) const ( // TODO: consider grouping the annotations below into a single structured annotation ...
/* Copyright 2019 Google Inc. Copyright 2019 The MayaData 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 applicable law...
package query import ( "fmt" "github.com/stretchr/testify/require" "github.com/unionj-cloud/go-doudou/toolkit/sqlext/sortenum" "testing" ) func ExampleCriteria() { query := C().Col("name").Eq("wubin").Or(C().Col("school").Eq("havard")).And(C().Col("age").Eq(18)) fmt.Println(query.Sql()) query = C().Col("name...
package certify import ( "bytes" "crypto/ecdsa" "crypto/rand" "crypto/rsa" "crypto/x509" "crypto/x509/pkix" "encoding/pem" "fmt" "math/big" "net" "strings" "time" ) // Certificate hold certificate information type Certificate struct { Subject pkix.Name NotBefore time.Time NotAfter ...
package integration import ( "bytes" "context" "encoding/json" "fmt" "net/http" "os/exec" "reflect" "testing" "time" "github.com/gwos/tcg/config" "github.com/gwos/tcg/sdk/clients" "github.com/gwos/tcg/sdk/milliseconds" "github.com/gwos/tcg/sdk/transit" "github.com/gwos/tcg/services" "github.com/stretch...
package work import ( "testing" "time" "github.com/gomodule/redigo/redis" "github.com/robfig/cron/v3" "github.com/stretchr/testify/assert" ) func TestPeriodicEnqueuer(t *testing.T) { pool := newTestPool(":6379") ns := "work" cleanKeyspace(ns, pool) var pjs []*periodicJob pjs = appendPeriodicJob(pjs, "0/29...
/* 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 client import ( "fmt" "sync" "time" "go.uber.org/atomic" ) // Stats represent stats for a request type Stats struct { RequestID string discoveredNodes []string outstandingNodes *NodeList unexpectedRespones *NodeList responses atomic.Int32 passed atomic.Int32 failed atomic.Int32 start ...
package main import ( "encoding/xml" "flag" "fmt" "log" "io/ioutil" "os" "path/filepath" "strings" "text/template" "time" "unicode" ) type Date time.Time func (d Date) String() string { return time.Time(d).Format("2006-01-02T15:04:05Z") } func (d *Date) UnmarshalXML(dec *xml.Decoder, start xml.StartEl...
package osrm import ( "encoding/json" "fmt" "net/url" "strings" geo "github.com/paulmach/go.geo" geojson "github.com/paulmach/go.geojson" ) const ( polyline5Factor = 1.0e5 polyline6Factor = 1.0e6 ) // Geometry represents a points set type Geometry struct { geo.Path } // NewGeometryFromPath creates a geome...
package util import ( "time" "testing" "github.com/stretchr/testify/assert" "github.com/pip-services/pip-services-runtime-go/util" ) func TestToString(t *testing.T) { assert.Nil(t, util.Converter.ToNullableString(nil)) assert.Equal(t, "xyz", util.Converter.ToString("xyz")) assert.Equal(t,...
package printer import ( "bufio" "fmt" "io" "regexp" "strconv" "strings" "github.com/dty1er/kubecolor/color" "github.com/dty1er/kubecolor/kubectl" ) var ( // Preset of colors for background // Please use them when you just need random colors colorsForDarkBackground = []color.Color{ color.Cyan, color.G...
// Copyright 2019 ByteWatch 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 a...
package audio import ( "github.com/jmontupet/gbcore/internal/pkg/constants" "github.com/jmontupet/gbcore/internal/pkg/ioports" "github.com/jmontupet/gbcore/pkg/coreio" ) type APU struct { channel1 *SquareChannel channel2 *SquareChannel audioPlayer coreio.AudioPlayer nr11 *ioports.Ptr // FF11 - NR11 - Channel...
/* Copyright 2020 The Crossplane 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 conntrack import ( "fmt" "github.com/mdlayher/netlink" "github.com/pkg/errors" "github.com/ti-mo/netfilter" ) const ( opUnExpectNAT = "ExpectNAT unmarshal" ) // Expect represents an 'expected' connection, created by Conntrack/IPTables helpers. // Active connections created by helpers are shown by the c...
// This is an example application using vfilter. The application // allow selecting of files from the filesystem based on a VQL // query. This example demonstrates how a third party application can // integrate with VFilter and extend the VQL language to cater for // application specific functionality. package main ...
// *** 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 powerplatform import ( "context" "reflect" "github.com/pkg/errors" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Definition of the EnterprisePolic...
package egoscale import ( "context" "fmt" ) // SSHKeyPair represents an SSH key pair // // See: http://docs.cloudstack.apache.org/projects/cloudstack-administration/en/stable/virtual_machines.html#creating-the-ssh-keypair type SSHKeyPair struct { Account string `json:"account,omitempty"` // must be used with a...
package binance import ( "encoding/json" "github.com/stretchr/testify/assert" "testing" ) const ( bnbSingleTransfer = ` { "blockHeight": 84191216, "tx": [ { "txHash": "4577CB3B5B202696E9E0B093A6DA973C7DD9CBC6808DA1326872745C35F3C089", "blockHeight": 84191216, "t...
package db import ( "encoding/json" "flag" "github.com/NYTimes/gziphandler" "io/ioutil" "log" "net/http" "os" "path" "strings" "sync" "sync/atomic" "time" ) // Represents a specific index for a specific Tag on disk. // For example, we will have a Tag for the index of symbols, of v1.0 of the linux kernel. ...
/* 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, ...
// Licensed to The Moov Authors under one or more contributor // license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright // ownership. The Moov Authors licenses this file to you under // the Apache License, Version 2.0 (the "License"); you may // not use this...
/* Copyright 2019 BlackRock, 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 di...
// Copyright 2019 Authors of Cilium // // 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 ...
/* Copyright 2015 The Kubernetes 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 required by applicable law or ag...
package text import ( "fmt" "strconv" "strings" ) const Escape = '\x1b' type EscapeState struct { Bold bool Dim bool Italic bool Underlined bool Blink bool Reverse bool Hidden bool CrossedOut bool FgColor Color BgColor Color } type Color interface { Codes() []string } fu...
package alphavilleseries import ( "encoding/json" "fmt" "github.com/Financial-Times/neo-utils-go/neoutils" "github.com/jmcvetta/neoism" ) type service struct { conn neoutils.NeoConnection } // NewCypherAlphavilleSeriesService provides functions for create, update, delete operations on alphavilleSeries in Neo4j...
package cli import ( "encoding/json" "fmt" "io/ioutil" "os" "path/filepath" "sort" "strings" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/viper" "github.com/tendermint/tendermint/libs/cli" tmtypes "github.com/tendermint/tendermint/types" "github.com/cosmos/cosmos-sdk/client/flags" ...
package main import ( "os" "path/filepath" "runtime" "strconv" "strings" "sync/atomic" "github.com/beyondblog/k8s-web-terminal/Godeps/_workspace/src/github.com/iris-contrib/errors" "github.com/beyondblog/k8s-web-terminal/Godeps/_workspace/src/github.com/kataras/iris/utils" "github.com/kataras/cli" ) var ( ...
// Copyright 2021 VMware, Inc. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 // Package inspect implements inspector functionality. package inspect import ( "context" "fmt" "net/url" "time" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/util/retry" "github.com/vmware-tanzu-private/core/a...
// Copyright ©2012 The bíogo 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 bgzf import ( "bytes" "compress/gzip" "fmt" "io" "sync" ) // Writer implements BGZF blocked gzip compression. type Writer struct { gzip.Head...
// Copyright 2017 Drone.IO Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package stash import ( "encoding/json" "errors" "io" "io/ioutil" "net/http" "time" "github.com/drone/go-scm/scm" "github.com/drone/go-scm/scm/driver/int...
package qrCode import ( "bytes" "fmt" "image" "image/png" "math" "math/rand" "time" ) type qrBuf struct { qr *QrRender //qrChan chan *bytes.Buffer qrChan chan *QrData conf QrBufConf //qrHistory map[int]int64 //qrHistory map[int] *QrData //mux sync.Mutex //qrTreadHistory []map[int]int64 rangeMaxId in...
/* * Copyright 2018 The CovenantSQL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law ...
package nat import ( "context" "fmt" "net" "strconv" "strings" "syscall" "github.com/datawire/dlib/dexec" ) type iptablesRouter struct { routingTableCommon } func newRouter(name string, _, _ net.IP) FirewallRouter { return &iptablesRouter{ routingTableCommon: routingTableCommon{ Name: name, map...
package config import ( "fmt" "log" "os" "path/filepath" "reflect" "strings" "github.com/fsnotify/fsnotify" "github.com/spf13/viper" ) type config struct { name string viper *viper.Viper conf2Value map[string]reflect.Value watchPrefix string } // Can initialize multiple configuration file ...
package ftn import ( "encoding/json" "fmt" "strconv" "strings" ) type Zone int type Net int type Node int type Point int type Domain string // A "5-dimensional" FTN address type Address struct { zone Zone net Net node Node point Point domain Domain } // Returns an empty Address. func emptyAddress()...
// // 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...
// Copyright (c) FreitX Network // This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no // warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent // permitted by law, all liability for your use of the...
package powervs import ( "context" "fmt" "os" "time" "github.com/IBM/go-sdk-core/v5/core" "github.com/IBM/networking-go-sdk/zonesv1" "github.com/IBM/platform-services-go-sdk/iamidentityv1" "github.com/IBM/platform-services-go-sdk/resourcecontrollerv2" "github.com/IBM/platform-services-go-sdk/resourcemanagerv...
// Copyright 2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable...
package schema import ( "fmt" "strings" ) // MapFieldReader reads fields out of an untyped map[string]string to // the best of its ability. type MapFieldReader struct { Map MapReader Schema map[string]*Schema } func (r *MapFieldReader) ReadField(address []string) (FieldReadResult, error) { k := strings.Join(...
// Copyright Fuzamei Corp. 2018 All Rights Reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package broadcast import ( "encoding/hex" "runtime" "github.com/33cn/chain33/types" "github.com/golang/snappy" "github.com/libp2p/go-libp2p-core/peer" pub...
package sql_test import ( "fmt" "net/http" "net/http/httptest" "net/url" "reflect" "strings" "testing" "time" "github.com/gildas/go-logger" "github.com/gildas/go-sql" "github.com/stretchr/testify/suite" ) type QueriesTest struct { suite.Suite Name string Logger *logger.Logger Start time.Time } fun...
package main import ( "fmt" "net/http" "regexp" "strings" "google.golang.org/genproto/googleapis/api/annotations" "google.golang.org/protobuf/compiler/protogen" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/descriptorpb" ) const ( contextPackage = protogen.GoImportPath("context") ...
package main import ( "os" "github.com/go-gl/glfw/v3.3/glfw" "github.com/go-gl/mathgl/mgl32" ) type Keys struct { escape string t string v string shift string kp1 string kp2 string kp3 string kp4 string kp5 string kp6 string } func initKeys(keys *Keys) { keys.escape = "nul...
package expr_test import ( "fmt" "testing" "goa.design/goa/v3/expr" "goa.design/goa/v3/expr/testdata" ) func TestMethodExprValidate(t *testing.T) { cases := []struct { Name string DSL func() Error string }{ {"valid-security-schemes-extend", testdata.ValidSecuritySchemesExtendDSL, ""}, {"invalid-se...
package stdout import ( "bytes" "context" "fmt" "strings" "time" "github.com/atlassian/gostatsd" log "github.com/sirupsen/logrus" "github.com/spf13/viper" ) // BackendName is the name of this backend. const BackendName = "stdout" // Client is an object that is used to send messages to stdout. type Client s...
package relfile import ( "certutil" "crypto/sha1" "crypto/x509" "fmt" "os" "os/exec" "regexp" "strings" "github.com/DHowett/go-plist" ) /* Distribution struct */ type Distribution struct { // Required Scheme string `yaml:"scheme"` ProvisioningProfile string `yaml:"provisioning_profile"` //...
// Copyright 2018 The OpenPitrix Authors. All rights reserved. // Use of this source code is governed by a Apache license // that can be found in the LICENSE file. package opapp import ( "bytes" "encoding/json" "fmt" "html/template" "regexp" "openpitrix.io/openpitrix/pkg/util/jsonutil" ) type ClusterConfTempl...
package main import ( "bufio" "flag" "fmt" "io" "log" "net" "net/url" "os" "regexp" "strings" ) var ( listen = flag.String("listen", ":554", "Listen host:port") allowedHostRegexp = flag.String("allowed-host-regexp", "", "Hosts which to allow proxying to") ) func main() { flag.Parse() var ho...
/* Copyright © 2020 reeve0930 <<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, so...
package database import ( "context" "time" "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/options" "github.com/misterabdul/goblog-server/internal/database/migrations" "github.com/misterabdul/goblog-server/...