text
stringlengths
3.08k
10.4k
package collector // Pipeline type type Pipeline struct { Events struct { DurationInMillis int `json:"duration_in_millis"` In int `json:"in"` Filtered int `json:"filtered"` Out int `json:"out"` QueuePushDurationInMillis int `json:"queue_...
// Copyright 2013 tsuru 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 app import ( "fmt" "github.com/globocom/config" "github.com/globocom/tsuru/auth" "github.com/globocom/tsuru/db" "github.com/globocom/tsuru/queue" ...
// Copyright 2019 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 appl...
package ui import ( "strings" "github.com/wx13/sith/terminal" ) // Menu helps create a searchable, flexible, on-screen menu. type Menu struct { cols, rows int col0, row0 int screen Screen keyboard Keyboard selections []int cursor int rowShift int borderColor terminal.Attribute choices ...
package postgres import ( "testing" "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/aodin/aspect" ) // Perform some selections against an actual postgres database // Note: A db.json file must be set in this package type incompleteUser struct { Name string `db...
// Package jwt implements JSON Web Tokens as described in https://tools.ietf.org/html/rfc7519 package jwt import ( "encoding/json" "fmt" "time" "github.com/lestrrat/go-jwx/internal/emap" ) // MarshalJSON generates JSON representation of this instant func (n NumericDate) MarshalJSON() ([]byte, error) { return js...
package blockchain import ( "github.com/gitferry/bamboo/crypto/merkle" "github.com/kelindar/bitmap" "strconv" "time" "github.com/gitferry/bamboo/crypto" "github.com/gitferry/bamboo/identity" "github.com/gitferry/bamboo/message" "github.com/gitferry/bamboo/types" ) type BlockHeader struct { types.View QC ...
/* * Copyright (c) 2015, fromkeith * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, this * list of conditions ...
// // 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...
// Copyright 2017 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 gps import ( "fmt" "math/rand" "strconv" ) // ProjectRoot is the topmost import path in a tree of other import paths - the // root of the tree. In ...
package commands import ( "errors" "fmt" "github.com/pivotal-cf/jhanda" "github.com/pivotal-cf/om/api" ) type ConfigureSAMLAuthentication struct { service configureAuthenticationService logger logger environFunc func() []string Options struct { interpolateConfigFileOptions DecryptionPassphr...
// Package spd finds the shortest path using Bellman-Ford algorithm. // It works with negative edges. package spbf /* SPBF(G, source, target) // Initialize-Single-Source(G,s) for each vertex v ∈ G.V v.d = ∞ v.π = nil // this is already done // when instantiating the graph // and instead of InVertices ...
// Copyright 2020 ZUP IT SERVICOS EM TECNOLOGIA E INOVACAO SA // // 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...
package main import ( "encoding/json" "flag" "fmt" "io/ioutil" "log" "os" "os/signal" "strings" "syscall" "time" mqtt "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git" caf "github.com/cascades-fbp/cascades-caf" helper "github.com/cascades-fbp/cascades-mqtt/lib" "github.com/mayahq/maya-toy-...
package core import ( "fmt" "github.com/golang/protobuf/ptypes" "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes/any" "github.com/textileio/go-textile/broadcast" "github.com/textileio/go-textile/pb" ) // AddContact adds or updates a card func (t *Textile) AddContact(card *pb.Contact) erro...
package cli import ( "bufio" "fmt" "os" "regexp" "strconv" "strings" "time" "unicode" "github.com/theia-log/selene/comm" uuid "github.com/satori/go.uuid" "github.com/theia-log/selene/model" ) // EventCommand implements the 'event' subcommand. // Takes a list of arguments to the event subcommand, parses i...
/* Copyright 2020 The Vitess Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, soft...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package workdocs 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" ) // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-0...
package main import ( "flag" "io/ioutil" "os" "runtime" "runtime/debug" "runtime/pprof" "strings" "time" "github.com/wavesplatform/gowaves/pkg/importer" "github.com/wavesplatform/gowaves/pkg/settings" "github.com/wavesplatform/gowaves/pkg/state" "github.com/wavesplatform/gowaves/pkg/util/common" "go.uber...
package integration import ( "fmt" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/pkg/errors" "github.com/chef/automate/components/automate-cli/pkg/diagnostics" "github.com/chef/automate/components/automate-cli/pkg/diagnostics/lbrequest" ) const createV1TeamTemplate = ...
package controllers import ( "PrometheusAlert/models" "strconv" "time" "github.com/astaxie/beego" "github.com/astaxie/beego/logs" ) //取到tpl路径 //fmt.Println(filepath.Join(beego.AppPath,"tpl")) type MainController struct { beego.Controller } //main page func (c *MainController) Get() { c.Data["IsIndex"] = tru...
package dashboard import ( "net/http" "sync" "time" "github.com/gorilla/websocket" "github.com/iotaledger/hive.go/daemon" "github.com/iotaledger/hive.go/events" "github.com/iotaledger/hive.go/workerpool" "github.com/labstack/echo" "github.com/iotaledger/goshimmer/packages/shutdown" "github.com/iotaledger/g...
// Copyright (c) 2018 The Jaeger 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...
/* * Copyright 2018 Insolar * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law...
// Copyright 2016 The hlin 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 t...
package renter import ( "container/heap" "sync" "time" "gitlab.com/NebulousLabs/Sia/build" "gitlab.com/NebulousLabs/errors" ) // streamHeap is a priority queue and implements heap.Interface and holds chunkData type streamHeap []*chunkData // chunkData contatins the data and the timestamp for the unfinished // ...
// Package vector implement a mathematical vector together with some // metadata. Each element is represented as a float64 (double). // Matrices are stored in column-major order and all columns have a // name. package matrix import ( "bytes" "fmt" "math" "math/rand" ) type Vector []float64 // ToMatrix wraps a 1-...
package dat import "reflect" // UpsertBuilder contains the clauses for an INSERT statement type UpsertBuilder struct { Execer cols []string err error isBlacklist bool isInterpolated bool record interface{} returnings []string table string vals []interfa...
// Package amazons3 uploads or downloads files from Amazon Simple Storage Service (S3) package amazons3 import ( "fmt" "os" "path/filepath" "github.com/TIBCOSoftware/flogo-lib/core/activity" "github.com/TIBCOSoftware/flogo-lib/logger" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/credentials" ...
package provision import ( "context" "fmt" "log" "strings" "google.golang.org/api/compute/v1" "google.golang.org/api/option" ) // GCEProvisioner holds reference to the compute service to provision compute resources type GCEProvisioner struct { gceProvisioner *compute.Service } // NewGCEProvisioner returns a ...
package http import ( "net/http" "regexp" "strings" "github.com/gofrs/uuid" "github.com/pladdy/cabby" "github.com/pladdy/stones" log "github.com/sirupsen/logrus" ) const ( defaultVersion = "last" jsonContentType = "application/json" sixMonthsOfSeconds = "63072000" ) // I don't want to introduce a r...
package trees import ( "fmt" "strings" "github.com/go-humble/detect" ) // This contains printers for the tree dom definition structures // AttrPrinter defines a printer interface for writing out a Attribute objects into a string form type AttrPrinter interface { Print([]*Attribute) string } // AttrWriter provi...
/* Copyright 2021 The Hybridnet 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 writ...
package sshkeys import ( "bytes" "fmt" "golang.org/x/crypto/ssh" "io" "io/ioutil" "log" "math/rand" "os" os_user "os/user" "path" "strconv" "strings" "sync" "text/template" "time" ) type ScriptResult struct { LocalPath string RemotePath string Content string } // createRemoteScriptForAddingKey ...
package graviton import "fmt" import "encoding/binary" // Snapshot are used to access any arbitrary snapshot of entire database at any point in time // snapshot refers to collective state of all trees + data (key-values) + history // each commit ( tree.Commit() or Commit(tree1, tree2 .....)) creates a new snaps...
package init import ( "fmt" "github.com/kudobuilder/kudo/pkg/kudoctl/kube" "github.com/kudobuilder/kudo/pkg/version" "k8s.io/api/apps/v1beta2" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pk...
// Copyright © 2017 Aqua Security Software Ltd. <<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 app...
// +build ignore package main import ( "bytes" "encoding/xml" "go/format" "io/ioutil" "log" "net/http" "os" "strings" "text/template" ) type Table struct { XMLName xml.Name `xml:"table"` Elements []*Element `xml:"element"` ChildHierarchy map[string][]string ParentHierarchy map[string]s...
package cmd import ( "net" "os" gopserver "github.com/hophouse/gop/gopServer" "github.com/hophouse/gop/utils" "github.com/spf13/cobra" ) var ( directoryServeOption string dstUrlOption string interfaceOption string authOption string realmOption string redirectPrefi...
package main import ( "flag" "github.com/amarburg/go-movieset" "log" // "strings" "fmt" "github.com/bamiaux/rez" "html/template" "image" "image/png" "math" "os" "path/filepath" ) var count uint func main() { var source, outdir string var step uint64 scaleFactor := float32(0.2) flag.StringVar(&outdi...
/* Copyright 2019 The Vitess Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, soft...
package ringman import ( "encoding/json" "fmt" "net/http" "time" "github.com/Nitro/memberlist" "github.com/relistan/go-director" log "github.com/sirupsen/logrus" ) // A MemberlistRing is a ring backed by Hashicorp's Memberlist directly. It // exchanges gossip messages directly between instances of this servic...
/* SPDX-License-Identifier: MIT * * Copyright (C) 2019 WireGuard LLC. All Rights Reserved. */ package conf import ( "crypto/rand" "crypto/subtle" "encoding/base64" "encoding/hex" "fmt" "net" "strings" "time" "golang.org/x/crypto/curve25519" "golang.zx2c4.com/wireguard/windows/l18n" ) const KeyLength =...
package vault import ( "fmt" "github.com/jenkins-x/jx/v2/pkg/errorutil" "github.com/jenkins-x/jx/v2/pkg/util" "github.com/pkg/errors" ) const ( // SystemVaultName stores the name of the Vault instance created and managed by Jenkins X unless an external Vault // instance is used in which case this name will be ...
/* Copyright 2014 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 main import ( "log" "os" "os/signal" "runtime" "sync" "syscall" "time" "github.com/pkg/errors" "github.com/sethvargo/go-envconfig" "github.com/suborbital/atmo/atmo/appsource" "github.com/suborbital/vektor/vlog" "github.com/suborbital/sat/constd/config" "github.com/suborbital/sat/constd/exec" ) ...
package commands import ( "fmt" "os" "path/filepath" "strings" "github.com/pkg/sftp" "github.com/scaleway/c14-cli/pkg/api" "github.com/scaleway/c14-cli/pkg/utils/ssh" ) // TODO : flag for download in dest : ./c14 download --dest="~/Documents" type download struct { Base isPiped bool downloadFlags } type ...
package spacelift import ( "context" "fmt" "path" "strings" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/pkg/errors" "github.com/spacelift-io/terraform-provider-spacelift/spacelift/internal" "github.com/spacelift-io/terraform-pr...
package main import ( "bytes" "io/ioutil" "log" "net/http" "os" "path/filepath" "runtime" "strings" "text/template" "time" "github.com/Masterminds/sprig" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/secretsmanager" ) var sess *session.Sessio...
// Code generated by the Pulumi SDK Generator DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package rds import ( "context" "reflect" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Resource schema for AWS::RDS::DBProxy func LookupDBProxy(ctx *pulumi.Cont...
// Copyright 2019 The gVisor 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...
// Copyright 2018-2020 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in wr...
// Copyright 2021 The Oto 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...
package ui import ( "fmt" "unsafe" "github.com/rodrigocfd/windigo/internal/util" "github.com/rodrigocfd/windigo/win" "github.com/rodrigocfd/windigo/win/co" ) type _ListViewItems struct { lv ListView } func (me *_ListViewItems) new(ctrl ListView) { me.lv = ctrl } // Adds an item, specifyin...
// Copyright 2020 IBM Corp. // SPDX-License-Identifier: Apache-2.0 package v1alpha1 import ( "fybrik.io/fybrik/pkg/model/datacatalog" "fybrik.io/fybrik/pkg/model/taxonomy" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // CapabilityScope indicates the level at which a capability is implemented // +kubebuilder:va...
/* The pipeline connects togeather the processors */ package pipeline import ( "context" "github.com/bmeg/grip/engine" "github.com/bmeg/grip/gdbi" "github.com/bmeg/grip/gripql" "github.com/bmeg/grip/log" "google.golang.org/protobuf/types/known/structpb" ) // Start begins processing a query pipeline func Start...
package resolvers import ( "context" "fmt" "testing" "github.com/google/go-cmp/cmp" "github.com/sourcegraph/sourcegraph/cmd/frontend/backend" "github.com/sourcegraph/sourcegraph/cmd/frontend/graphqlbackend" "github.com/sourcegraph/sourcegraph/enterprise/internal/campaigns/resolvers/apitest" "github.com/sourc...
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
package metrics import ( "fmt" "io" "sort" "time" ) // Write sorts writes each metric in the given registry periodically to the // given io.Writer. func Write(r Registry, d time.Duration, w io.Writer) { for _ = range time.Tick(d) { WriteOnce(r, w) } } // WriteOnce sorts and writes metrics in...
// 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 main import ( "flag" "fmt" "github.com/andreaskoch/dee-ns" "github.com/mitchellh/go-homedir" "github.com/spf13/afero" "os" "path" "path/filepath" "str...
package command import ( "context" "fmt" "io" "os" "github.com/evergreen-ci/evergreen/model" "github.com/evergreen-ci/evergreen/rest/client" "github.com/evergreen-ci/evergreen/subprocess" "github.com/evergreen-ci/evergreen/util" "github.com/mitchellh/mapstructure" "github.com/mongodb/grip" "github.com/mong...
package main import ( "bytes" "fmt" "io/ioutil" "strconv" ) func main() { // fmt.Println(amplify([5]int{4, 3, 2, 1, 0}, []int{3, 15, 3, 16, 1002, 16, 10, 16, 1, 16, 15, 15, 4, 15, 99, 0, 0})) // fmt.Println(amplify([5]int{0, 1, 2, 3, 4}, []int{3, 23, 3, 24, 1002, 24, 10, 24, 1002, 23, -1, 23, // 101, 5, 23, 2...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: money_command.proto package pb import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is ...
package shapes import ( "fmt" "github.com/go-gl/gl/v4.5-core/gl" "github.com/wdevore/Ranger-Go-IGE/api" "github.com/wdevore/Ranger-Go-IGE/engine/nodes" "github.com/wdevore/Ranger-Go-IGE/engine/rendering/atlas" "github.com/wdevore/Ranger-Go-IGE/engine/rendering/color" ) const ( pixelBufferSize = 500 ) // Dyn...
package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. import ( "context" "fmt" "github.com/ivas1ly/waybill-app/graph/generated" "github.com/ivas1ly/waybill-app/models"...
// Copyright 2020 CUBRID 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 writ...
/* Copyright AppsCode Inc. and Contributors 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 ( "crypto/ecdsa" "encoding/json" "errors" "fmt" "io/ioutil" "path/filepath" "reflect" "sort" "github.com/c-bata/go-prompt" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/heliorosa/scui/internal" "github.com/heliorosa/scui/ui" ) func newSignerMenu() *ui.MenuCompleter { r :...
package kafkaproxy import ( "context" "net" "sync" "gopkg.in/bufio.v1" "github.com/travisjeffery/jocko/protocol" ) // SizeLen is the number of bytes that make up the size field of the requet. const SizeLen = 4 // Endpoint handles a API request and returns a response. type Endpoint func(ctx context.Context, re...
package common import ( "flag" "fmt" "io/ioutil" "log" "net/smtp" "os" "strconv" "sync" "time" "github.com/freecracy/news/cmd" "github.com/freecracy/news/etc" "github.com/fatih/color" config "github.com/go-ozzo/ozzo-config" "github.com/urfave/cli" ) type mailServer struct { host string port ...
// Copyright 2017 HyperHQ Inc. // // SPDX-License-Identifier: Apache-2.0 // package main import ( "flag" "fmt" "io" "io/ioutil" "log/syslog" "os" "os/signal" "runtime" "sync" "time" opentracing "github.com/opentracing/opentracing-go" "github.com/sirupsen/logrus" lSyslog "github.com/sirupsen/logrus/hooks...
package store import ( "regexp" "strings" "github.com/lib/pq" "gorm.io/gorm" "github.com/figment-networks/avalanche-indexer/model" ) var ( reDate = regexp.MustCompile(`^[\d]{4}-[\d]{2}-[\d]{2}$`) reUnixTime = regexp.MustCompile(`^[\d]{10}$`) ) type TransactionsStore struct { *gorm.DB } // Search retur...
// Code generated by gotdgen, DO NOT EDIT. package tg import ( "context" "fmt" "strings" "github.com/gotd/td/bin" ) // No-op definition for keeping imports. var _ = bin.Buffer{} var _ = context.Background() var _ = fmt.Stringer(nil) var _ = strings.Builder{} // PhoneDiscardCallRequest represents TL type `phone...
// +build !without_qemu /* * This file is part of the libvirt-go project * * 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 ...
package rpc import ( "context" "fmt" "strings" "time" "github.com/naiba/nezha/model" pb "github.com/naiba/nezha/proto" "github.com/naiba/nezha/service/dao" ) type NezhaHandler struct { Auth *AuthHandler } func (s *NezhaHandler) ReportTask(c context.Context, r *pb.TaskResult) (*pb.Receipt, error) { var err ...
package main import ( "context" "crypto/rand" "fmt" "io/ioutil" "log" "os" ds "github.com/ipfs/go-datastore" dsync "github.com/ipfs/go-datastore/sync" "github.com/libp2p/go-libp2p" "github.com/libp2p/go-libp2p-core/network" crypto "github.com/libp2p/go-libp2p-crypto" dht "github.com/libp2p/go-libp2p-kad-d...
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. package commands import ( "encoding/json" "fmt" "github.com/mattermost/mattermost-server/v6/model" "github.com/mattermost/mmctl/v6/client" "github.com/mattermost/mmctl/v6/printer" "github.com/pkg/e...
// tcp.go - rough TCP packet crafting facility. // // To the extent possible under law, <NAME> waived all copyright // and related or neighboring rights to this module of rough, using the creative // commons "cc0" public domain dedication. See LICENSE or // <http://creativecommons.org/publicdomain/zero/1.0/> for full d...
package gms import ( "bytes" "encoding/json" "errors" "os" "os/exec" "strings" ) const ( // DefaultGitCmd is the default command of git DefaultGitCmd = "git" // GitRepoType is the type of the repository GitRepoType = "git" ) var ( // DefaultGitClient uses GitCmd as implementation DefaultGitClient = &GitC...
// Copyright (c) 2014 The btcsuite developers // Copyright (c) 2016 The Dash developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. // NOTE: This file is intended to house the RPC websocket notifications that are // supported by a chain server. package btcjson c...
package controllers import ( "bytes" "encoding/base64" "fmt" "github.com/codeb2cc/gomemcache/memcache" "github.com/revel/revel" "math" "net" "unicode/utf8" ) type App struct { *revel.Controller } type Response struct { Status string Data interface{} } type CacheItem struct { Key string Value ...
package job import ( "bytes" "context" "encoding/json" "fmt" "github.com/kube-sailmaker/sailmaker-deployer-job/k8s/client" "github.com/kube-sailmaker/sailmaker-deployer-job/model" "github.com/kube-sailmaker/sailmaker-deployer-job/opts" "github.com/kube-sailmaker/sailmaker-deployer-job/utils" "github.com/kube-...
/* Copyright 2021 Red Hat, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, soft...
// Copyright 2011 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...
// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file.package zipfs package zipfs import ( "archive/zip" "bytes" "fmt" "io" "io/ioutil" "os" "reflect" "testing" "github.com/april1989/origin-go-tools/godoc/...
package common import ( "bytes" "crypto/sha256" "encoding/binary" "errors" "fmt" "io" "math/big" base58 "github.com/itchyny/base58-go" ) // FOOLPROOFPREFIX used for fool-proof prefix // base58.BitcoinEncoding[21] = 'N', base58.BitcoinEncoding[18] = 'K' // 33 = len(base58.Encode( (2**192).Bytes() )), 192 = 8...
package stats import ( "container/heap" "sync" "time" "code.cloudfoundry.org/gorouter/stats/container" ) const ( TopAppsTrimInterval = 10 * time.Second TopAppsEntryLifetime = 60 * time.Second ) type topAppsEntryTimeSlot struct { t int64 // Unix time n int64 // Number of requests } type topAppsEntry struct...
package cluster import ( "crypto/rand" "encoding/hex" "strings" . "testing" "github.com/stretchr/testify/assert" "github.com/cloudyfa19/radix.v2/pool" "github.com/cloudyfa19/radix.v2/redis" ) // These tests assume there is a cluster running on ports 7000 and 7001, with // the first half of the slots assigned...
package pkg import ( "bytes" "database/sql" "encoding/json" "fmt" "github.com/gorilla/mux" "github.com/levigross/grequests" "github.com/mchirico/harvest/configure" "io" "log" "net/http" "strings" "time" ) type App struct { Router *mux.Router DB *sql.DB at *int secStr *configure.SecretStruct } ...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: spotigraph/guild/v1/guild.proto package guildv1 import ( fmt "fmt" math "math" proto "github.com/golang/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. var ( _ = proto.Marshal _ = fmt.Errorf _ = math.Inf ) ...
/* 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 ( "flag" "fmt" "github.com/husobee/vestigo" _ "github.com/mattn/go-sqlite3" "io" "io/ioutil" "log" "net/http" "os" "os/signal" "path/filepath" "syscall" ) type loggerStruct struct { Info *log.Logger Debug *log.Logger Warning *log.Logger Error *log.Logger Fatal *log.L...
package wxweb import ( "bytes" "encoding/json" "fmt" "io/ioutil" "net/http" "net/url" "regexp" "strconv" "time" "github.com/kwf2030/commons/pipeline" "github.com/kwf2030/commons/time2" ) const ( syncCheckUrlPath = "/synccheck" syncUrlPath = "/webwxsync" ) var syncCheckRegex = regexp.M...
package controller import ( "bytes" "distributed/dto" "distributed/qutils" "distributed/web/model" "encoding/gob" "github.com/gorilla/websocket" "github.com/streadway/amqp" "net/http" "sync" "fmt" "log" ) const url = "amqp://guest:guest@localhost:5672" type websocketController struct { ...
package crm import ( "fmt" zoho "github.com/titandc/Zoho" ) // GetUsers will return the list of users in the CRM organization. The list can be filtered using the // 'kind' parameter // https://www.zoho.com/crm/help/api/v2/#Users-APIs func (c *API) GetUsers(kind UserType) (data UsersResponse, err error) { endpoint ...
package controllers import ( "bytes" "encoding/base64" "fmt" "github.com/citrix/adc-nitro-go/service" "github.com/jantytgat/citrixadc-backup/data" "github.com/jantytgat/citrixadc-backup/models" "io/ioutil" "log" "net/url" "os" "path/filepath" "strings" "sync" "time" ) type BackupController struct{} type...
// Copyright (c) 2016 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 Software without restriction, including without limitation the rights // to use, copy, modify, merge...
/* Copyright © 2020 Marvin 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 distri...
package client import ( "github.com/rancher/norman/types" ) const ( ProjectAlertRuleType = "projectAlertRule" ProjectAlertRuleFieldAlertState = "alertState" ProjectAlertRuleFieldAnnotations = "annotations" ProjectAlertRuleFieldCreated = "created" ProjectA...
/* * Copyright 2022 The Furiko 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...