text
stringlengths
3.08k
10.4k
// +build !shipping package offboard_vision import ( "bytes" "crypto/tls" "encoding/json" "fmt" "html/template" "io/ioutil" "net/http" "net/url" "os" "path" "github.com/digital-dream-labs/vector-cloud/internal/clad/vision" "github.com/digital-dream-labs/vector-cloud/internal/ipc" "github.com/digital-dr...
package fee import ( "math/big" "github.com/void616/gm.mint/amount" ) var ( goldMinFixed = amount.MustFromString("0.00002") goldMaxFixed = amount.MustFromString("0.002") mntFixed = amount.MustFromString("0.02") mnt10 = amount.MustFromString("10") mnt1_000 = amount.MustFromString("1000") mnt10_...
// Copyright 2020 dfuse Platform 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 agre...
/** * This implements the ERC20 standard token * https://theethereum.wiki/w/index.php/ERC20_Token_Standard * The ERC20 standard is used for defining tokens in Ethereum. This is an implementation * of the same standard on Fabric. **/ package main import ( "fmt" // April 2020, Updated to Fabric 2.0 Shim "gith...
// Copyright 2019 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
// Code generated from agc.g4 by ANTLR 4.7.2. DO NOT EDIT. package agc // agc import "github.com/antlr/antlr4/runtime/Go/antlr" // BaseagcListener is a complete listener for a parse tree produced by agcParser. type BaseagcListener struct{} var _ agcListener = &BaseagcListener{} // VisitTerminal is called when a ter...
package manager import ( "net" ) const ( S_UPDATETCP = iota S_UPDATEUDP S_UPDATEUDPHEADER S_GETTCPDATACHAN S_GETUDPCHANS S_GETUDPHEADER S_CLOSETCP S_CHECKSOCKSREADY S_FORCESHUTDOWN ) type socksManager struct { socksStatusMap map[uint64]*socksStatus SocksMessChan chan interface{} TaskChan chan *Socks...
package user import ( "net/http" "github.com/budden/semdict/pkg/apperror" "github.com/budden/semdict/pkg/sddb" "github.com/budden/semdict/pkg/shared" "github.com/gin-gonic/gin" ) // ChangePasswordFormPageHandler renders a /changepasswordform page func ChangePasswordFormPageHandler(c *gin.Context) { sduserID :=...
package main import ( "encoding/json" "fmt" "runtime" "time" cytonats "github.com/cytobot/messaging/nats" pbd "github.com/cytobot/messaging/transport/discord" pbm "github.com/cytobot/messaging/transport/manager" pbs "github.com/cytobot/messaging/transport/shared" pbw "github.com/cytobot/messaging/transport/w...
// Copyright 2019 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 frontend import ( "bytes" "context" "html" "io/ioutil" "net/http" "os" "path/filepath" "strings" "github.com/google/safehtml" "github.com/go...
package grit import ( "bytes" "fmt" "html/template" "os" "path" "strings" "github.com/go-git/go-git/v5/config" "github.com/go-git/go-git/v5/plumbing/transport" "github.com/go-git/go-git/v5/plumbing/transport/client" ) const slugSeparator = "/" // EndpointTemplate is template for a Git repository URL. type ...
/* Package foreman provide a client to the Foreman API. */ package foreman import ( "bytes" "context" "encoding/json" "io/ioutil" "log" "net/http" "net/url" "path" "strings" ) const ( hostsapi = "api/hosts" message = "Resource host not found by i" ) // HostsReq contains parent field for data payload for ...
// Copyright 2015 <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 w...
package main import ( "net/http" "strconv" "strings" ) const ( DEFAULT_OFFSET = 0 DEFAULT_LIMIT = 10 ) var ( lang = map[string]string{ "default": "ru", "ru": "ru", } supportedVersions = map[string]string{ "default": "v1", "v1": "v1", } ) type NullInt64 struct { Int64 int64 `json:"value"...
// Copyright ©2016 The Gonum 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 distuv import ( "fmt" "math" "sort" "testing" "golang.org/x/exp/rand" "gonum.org/v1/gonum/floats/scalar" ) func TestGamma(t *testing.T) { ...
package color import ( "encoding/json" "fmt" "os" "strings" "github.com/shiena/ansicolor" ) var w = ansicolor.NewAnsiColorWriter(os.Stdout) const ( Gray = uint8(iota + 90) Red Green Yellow Blue Magenta Cyan White Default EndColor = "\033[0m" printV = "A" contentJsonRegex = `appli...
package main import ( "bufio" "crypto/cipher" "crypto/ecdsa" "crypto/elliptic" "crypto/x509" "encoding/hex" "encoding/pem" "errors" "fmt" "io/ioutil" "log" "math/big" "os" "github.com/tarm/serial" "github.com/ugorji/go/codec" "golang.org/x/crypto/chacha20poly1305" ) func ecdh(pubBytes []byte, privBy...
/* Copyright 2019 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...
package main import ( "crypto/tls" "fmt" "io" "log" "net" "net/http/httputil" "net/url" "os" "strconv" "strings" "github.com/docker/docker/pkg/term" "github.com/getfiit/empire/pkg/heroku" ) var ( detachedRun bool dynoSize string ) var cmdRun = &Command{ Run: maybeMessage(runRun), Usag...
package ogame import ( "net/url" "time" ) // Wrapper all available functions to control ogame bot type Wrapper interface { SetLoginProxy(proxy, username, password string) error SetLoginWrapper(func(func() error) error) GetClient() *OGameClient Enable() Disable() IsEnabled() bool Quiet(bool) Tx(clb func(tx *...
package converter import ( "github.com/binzume/modelconv/mmd" "github.com/binzume/modelconv/mqo" ) type mqoToMMD struct { Scale float32 } func NewMQOToMMDConverter(options interface{}) *mqoToMMD { return &mqoToMMD{Scale: 1.0 / 80} } func (c *mqoToMMD) Convert(doc *mqo.Document) (*mmd.Document, error) { dst := ...
package main import ( "errors" "flag" "fmt" "gitee.com/Luna-CY/go-to-internet/src/command" "gitee.com/Luna-CY/go-to-internet/src/command/acme" "gitee.com/Luna-CY/go-to-internet/src/command/service" "gitee.com/Luna-CY/go-to-internet/src/command/user" "gitee.com/Luna-CY/go-to-internet/src...
/* * Copyright The Dragonfly 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 agr...
/* Copyright 2016 The Rook 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 agreed to ...
/* Package cmd ... Copyright © 2020 NAME HERE <EMAIL ADDRESS> 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 initialize import ( "gorm.io/plugin/dbresolver" "os" "github.com/flipped-aurora/gin-vue-admin/server/global" "github.com/flipped-aurora/gin-vue-admin/server/initialize/internal" "github.com/flipped-aurora/gin-vue-admin/server/model/autocode" "github.com/flipped-aurora/gin-vue-admin/server/model/example"...
// Copyright 2020 ETH Zurich // // 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 wri...
/* Copyright IBM Corp. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package main import ( "fmt" "os" "os/signal" "syscall" "go.uber.org/zap" "github.com/hyperledger/fabric-chaincode-evm/fab3" "github.com/hyperledger/fabric-sdk-go/pkg/client/channel" "github.com/hyperledger/fabric-sdk-go/pkg/...
package godb import ( "context" "database/sql" "fmt" "testing" "github.com/btm6084/gojson" "github.com/btm6084/utilities/metrics" "github.com/stretchr/testify/assert" ) var _ Database = &MockDB{} // MockDB implements the Database interface and allows for database mocking. type MockDB struct { t *testing.T ...
package main import ( "bufio" "errors" "fmt" "strconv" "strings" "github.com/spf13/cobra" "github.com/spf13/viper" "github.com/tendermint/tendermint/libs/cli" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/crypto/keys" "github.com/cosmos/co...
/* * SPDX-License-Identifier: Apache-2.0 */ package main import ( "github.com/hyperledger/fabric-chaincode-go/shim" "github.com/hyperledger/fabric-contract-api-go/contractapi" "github.com/stretchr/testify/mock" ) //const getStateError = "world state get error" type MockStub struct { shim.ChaincodeStubInterfac...
package account import ( "bufio" "bytes" "fmt" "os" "time" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/awserr" orgs "github.com/aws/aws-sdk-go-v2/service/organizations" "github.com/mxk/go-cloud/aws/arn" "github.com/mxk/go-cloud/aws/region" ) var errNoOrg = awserr.New(orgs.ErrCodeAW...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: protos/eap_auth.proto package protos import ( context "context" fmt "fmt" proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" protos "magma/feg/gateway/serv...
package mp3 import ( "bytes" "io" "os" ) type Scanner struct { f io.ReadSeeker // The version and layer we are looking for version MPEGVersion layer MPEGLayer buf []byte FrameCount, curSize int vbrCounter uint64 curPos, absPos int64 eofPos int64 Info *MP3In...
// Copyright 2015 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...
// Copyright 2016 fatedier, <EMAIL> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed ...
/* Copyright 2021 The cert-manager 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 evop import ( "context" "fmt" "math" "strings" ) type ( state struct { genome []*gene op operator // action (mutation | crossover | swap | splay left/right) parent *state states []*state reward int nvisits int } mcts struct { ops []operator // actions consts []constraint ...
package db import ( "encoding/binary" "encoding/json" "errors" "log" "time" "github.com/kr/pretty" bolt "go.etcd.io/bbolt" ) var db *bolt.DB var eventBucket = []byte("events") //Init opens or creates the database func Init(dbPath string) error { var err error db, err = bolt.Open(dbPath, 0600, &bolt.Options...
package conn import ( "container/list" "context" "fmt" logic "github.com/ilovesusu/suim/api/logic/service/v1" "github.com/ilovesusu/suim/app/connect/service/internal/service" "sync" "time" "github.com/alberliu/gn" "github.com/gorilla/websocket" ) const ( CoonTypeTCP int8 = 1 // tcp连接 ConnTypeWS int8 = 2 ...
package pythonmetrics import ( "fmt" "go/token" "io" "reflect" "github.com/kiteco/kiteco/kite-go/lang/python/pythonast" "github.com/kiteco/kiteco/kite-go/lang/python/pythonhelpers" "github.com/kiteco/kiteco/kite-go/lang/python/pythonscanner" "github.com/kiteco/kiteco/kite-golib/errors" "github.com/kiteco/kit...
/* Copyright 2018 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...
package envoy import ( "fmt" "git.target.com/Kubernetes/envoy-control-plane/pkg/data" "github.com/envoyproxy/go-control-plane/envoy/api/v2" "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" discovery "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2" "github.com/envoyproxy/go-control-pl...
// Copyright 2019 MSolution.IO // // 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 ...
package hep import ( "encoding/binary" "fmt" "net" "strconv" "time" ) // HEP chuncks const ( Version = 1 // Chunk 0x0001 IP protocol family (0x02=IPv4, 0x0a=IPv6) Protocol = 2 // Chunk 0x0002 IP protocol ID (0x06=TCP, 0x11=UDP) IP4SrcIP = 3 // Chunk 0x0003 IPv4 source address IP4DstIP = 4 // Chunk 0...
package controllers import ( "context" "fmt" "mercadinhoBigGo/domain/entities" "mercadinhoBigGo/domain/services" ) type Controller struct { Ctx context.Context } func (controller Controller) Saudacoes(Nome string) { // declaração base de uma func fmt.Println("Olá", Nome, ", seja bem vindo!") } func (controlle...
package main import ( "context" "fmt" "net" "net/http" _ "net/http/pprof" "net/url" "os" "os/signal" "strings" "sync" "syscall" "github.com/PacktPublishing/Hands-On-Software-Engineering-with-Golang/Chapter06/textindexer/index" "github.com/PacktPublishing/Hands-On-Software-Engineering-with-Golang/Chapter0...
package main import ( "fmt" "log" "os" "os/signal" "syscall" "time" swagger "github.com/arsmn/fiber-swagger/v2" "github.com/gofiber/fiber/v2" "github.com/gomodule/redigo/redis" "github.com/sdil/jkjav-server/api/routes" "github.com/sdil/jkjav-server/docs" "github.com/sdil/jkjav-server/pkg/booking" "github...
// Licensed to Elasticsearch B.V. under one or more contributor // license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright // ownership. Elasticsearch B.V. licenses this file to you under // the Apache License, Version 2.0 (the "License"); you may // not use ...
package main import ( "flag" "fmt" "io" "io/ioutil" "log" "net" "os" "os/user" "syscall" "time" "github.com/tftp-go-team/hooktftp/src/config" "github.com/tftp-go-team/hooktftp/src/hooks" "github.com/tftp-go-team/hooktftp/src/logger" "github.com/tftp-go-team/libgotftp/src" ) var HOOKS []hooks.Hook var C...
package linearModel import ( "fmt" "log" "math" "runtime" // use dot import for lisibility //"github.com/gcla/sklearn/base" "github.com/gcla/sklearn/base" "gonum.org/v1/gonum/mat" gg "gorgonia.org/gorgonia" "gorgonia.org/tensor" ) // Float is gorgonia's Float64 var Float = gg.Float64 // LinearRegressionGor...
package server import ( "context" "crypto/tls" "log" "net" "net/http" "sync" "time" easytls "github.com/Bearnie-H/easy-tls" "github.com/gorilla/mux" ) const ( // DefaultServerAddr represents the default address to serve on, // should a value not be provided. DefaultServerAddr string = ":8080" ) // Simpl...
package kafka import ( "context" "runtime" "sync" "time" "github.com/8treenet/freedom/infra/requests" "github.com/8treenet/freedom" "github.com/Shopify/sarama" ) func init() { freedom.Prepare(func(initiator freedom.Initiator) { initiator.BindInfra(true, consumerPtr) }) } var consumerPtr *Consumer = new(...
// Copyright 2017 The Recime 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 la...
package testutil import ( "git.fd.io/govpp.git/adapter/mock" "github.com/golang/protobuf/proto" "github.com/ligato/cn-infra/core" "github.com/ligato/cn-infra/datasync" localsync "github.com/ligato/cn-infra/datasync/kvdbsync/local" "github.com/ligato/cn-infra/flavors/local" "github.com/ligato/cn-infra/logging/lo...
// Copyright © 2019-2021 VMware, Inc. All Rights Reserved. // SPDX-License-Identifier: BSD-2-Clause // Auto generated code. DO NOT EDIT. // Interface file for service: Tags // Used by client-side stubs. package infra import ( "github.com/vmware/vsphere-automation-sdk-go/lib/vapi/std/errors" "github.com/vmware/vsp...
// Copyright 2012-2017 the u-root Authors. All rights reserved // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build !plan9 // mount mounts a filesystem at the specified path. // // Synopsis: // mount [-r] [-o options] [-t FSTYPE] DEV PATH // // Options:...
// 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 column import ( "encoding/json" "reflect" "testing" "time" "github.com/grab/talaria/internal/encoding/typeof" "github.com/gr...
// Copyright 2020 The Chromium OS 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 cryptohome import ( "context" "fmt" "os" "regexp" "strconv" "strings" "time" "chromiumos/tast/common/hwsec" "chromiumos/tast/common/...
package internal import ( "encoding/json" "errors" "fmt" "github.com/blang/semver/v4" "github.com/fatih/color" "io" "io/ioutil" "net/http" "os" "runtime" "strconv" "strings" "time" ) var GithubRepository = "hazelcast/hazelcast-cloud-cli" var Version string var Distribution string type UpdateService stru...
package gql // Abstract interpretation (aka typecheck) utilities import ( "fmt" "strings" "github.com/grailbio/base/log" "github.com/grailbio/gql/symbol" ) // AIType is similar to ValueType, but it contains more detailed information, // such as function signatures. It is used only during pre-execution program /...
/* * The MIT License (MIT) * * Copyright (c) 2019 HereweTech Co.LTD * * 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 *...
package gobrailcreator // * gets configuration from config/reader (creation plan) // * can add elements (by json or objects?) // * can provide creation to run railroad import ( "fmt" "strings" "time" "gobot.io/x/gobot" "gobot.io/x/gobot/drivers/i2c" "github.com/gen2thomas/gobrail/internal/boardsapi" "github....
package main import ( "context" "fmt" "log" "path" "strconv" "strings" ) type Connection bool func (Connection) Type() string { return "connection" } type Status struct { State string `json:"state"` SongID string `json:"songid"` Elapsed float64 `json:"elapsed"` Duration float64 `json:"duration"` ...
package model import ( "encoding/json" "fmt" "reflect" "strings" ) // PokemonResponse is a struct that stores the pokemon JSON response from API type PokemonResponse struct { Abilities []struct { Ability struct { Name string `json:"name"` URL string `json:"url"` } `json:"ability"` IsHidden bool `jso...
/* Copyright 2020 The KubeDiag 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 entity import ( "context" "gxt-park-assets/internal/app/schema" "github.com/jinzhu/gorm" ) // GetSettlementRecordDB 结算信息 func GetSettlementRecordDB(ctx context.Context, defDB *gorm.DB) *gorm.DB { return getDBWithModel(ctx, defDB, SettlementRecord{}) } // SchemaSettlementRecord 结算信息 type SchemaSettlement...
package core import ( "time" ) const ( // the timeout of a socks5 requester shake with an AhriSocks5Server. Socks5ShakeTimeoutMillisec = 400 // the timeout of an AhriClient registers itself with an AhriServer. AhriShakeTimeoutSec = 3 // the maximum number of proxy frames that an AhriClientPartner can save in a...
package helm import ( "bytes" "context" "crypto/tls" "encoding/json" "errors" "fmt" "io" "io/ioutil" "net/http" "helm.sh/helm/v3/pkg/chart/loader" helm_repo "helm.sh/helm/v3/pkg/repo" ) type Options struct { Addr string `json:"addr,omitempty" description:"chart repository url"` } func NewDefaultOptions(...
// Copyright 2019 The Gitea Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package flags import ( "fmt" "strings" "code.gitea.io/sdk/gitea" "code.gitea.io/tea/modules/context" "code.gitea.io/tea/modules/task" "github.com/ar...
package titanfall import ( "encoding/json" "fmt" "github.com/multiplay/go-svrquery/lib/svrquery/common" ) // Info represents a full query response. type Info struct { // All Header // Version 1+ InstanceInfo // Version 8+ InstanceInfoV8 BuildName string Datacenter string GameMode string // All Basic...
package group import ( "fmt" "sort" ) type Group struct { Windows int replicas map[uint64]*Replica } func New(peers []uint64) *Group { g := Group{replicas: make(map[uint64]*Replica)} for _, peer := range peers { g.replicas[peer] = newReplica() } return &g } func (g *Group) Members() int { return len(g.r...
package enclave_runtime_pal // import "github.com/inclavare-containers/rune/libenclave/internal/runtime/pal" import ( "encoding/binary" "fmt" "github.com/go-restruct/restruct" "github.com/inclavare-containers/epm/pkg/epm-api/v1alpha1" "github.com/inclavare-containers/rune/libenclave/attestation" "github.com/incl...
package controller import ( "context" "fmt" "github.com/Seagate/seagate-exos-x-csi/pkg/common" "github.com/Seagate/seagate-exos-x-csi/pkg/storage" "github.com/container-storage-interface/spec/lib/go/csi" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "k8s.io/klog" ) var ( volumeCaps = []csi....
/* MIT License Copyright (c) 2020-2021 YPSI SAS Centctl is developped by : <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 ...
// Copyright (c) 2017 Cisco and/or its affiliates. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at: // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
package poller import ( "context" "fmt" "net/http" "net/url" "sync" "time" "github.com/fluxcd/flux/pkg/api/v6" transport "github.com/fluxcd/flux/pkg/http" "github.com/fluxcd/flux/pkg/http/client" "github.com/fluxcd/flux/pkg/resource" "github.com/go-logr/logr" "github.com/xenitab/flux-status/pkg/flux" "g...
package data import ( "encoding/base64" "fmt" "strings" ) // separatator is used to separate parts of an item key. const separator = "/" // encodePart encodes a part of the key into a string so that it can be safely joined with separator. func encodePart(part string) string { return base64.RawURLEncoding.EncodeT...
// Copyright (c) 2018 IoTeX // 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 cod...
package config import ( "fmt" "io/ioutil" "os" "regexp" "strings" "time" "golang.org/x/crypto/ssh" ) // SSHProxyConfig is the configuration for the SSH proxy module. type SSHProxyConfig struct { // Server is the IP address or hostname of the backing server. Server string `json:"server" yaml:"server"` // Po...
// 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 bls import ( "encoding/hex" "testing" "github.com/33cn/chain33/common/crypto" "github.com/33cn/plugin/plugin/dapp/evm/executor/vm/common" "github.c...
package protobuf import ( "fmt" "github.com/iancoleman/strcase" "github.com/lechuckroh/octopus-db-tools/format/common" "github.com/lechuckroh/octopus-db-tools/format/octopus" "github.com/lechuckroh/octopus-db-tools/util" "io" "log" "strings" "text/template" ) type ProtoFieldRule string const ( Required Pro...
package screwdriver import ( "bytes" "encoding/json" "fmt" "io" "io/ioutil" "log" "net/http" "net/url" "os" "strconv" "strings" "time" "github.com/hashicorp/go-retryablehttp" ) const retryWaitMin = 100 const retryWaitMax = 300 var maxRetries = 5 var httpTimeout = time.Duration(20) * time.Second // API...
package transport import ( "context" "net" "net/http" "regexp" "time" gws "github.com/gobwas/ws" "github.com/gobwas/ws/wsutil" "github.com/VolantMQ/volantmq/configuration" "github.com/VolantMQ/volantmq/metrics" ) var subProtocolRegexp = regexp.MustCompile(`^mqtt(([vV])(3.1|3.1.1|5.0))?$`) type httpServer ...
/* Before you execute the program, Launch `cqlsh` and execute: cqlsh --execute="create keyspace xtsdb with replication = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };" cqlsh --keyspace xtsdb --file assets/scheme/series_cassandra.sql */ package main import ( "flag" "fmt" "log" "strconv" "strings" "ti...
package s32cs import ( "bytes" "compress/gzip" "encoding/json" "io" "io/ioutil" "log" "os" "regexp" "strings" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/cloudsearchdomain" "github.com/aws/aws-sdk-go/service/s3" "github.com/aws/aws-sdk-go/se...
package main import ( "bytes" "context" "flag" "fmt" "net" "path/filepath" "testing" "time" "github.com/golang/protobuf/ptypes/timestamp" "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly/internal/praefect/config" "gitlab.com/gitlab-org/gitaly/internal/testhelper" "gitlab.com/gitlab-org...
package raw type DataFromDataJSON struct { LastUpdate string `json:"last_update"` Kasus Kasus `json:"kasus"` Sembuh Meninggal `json:"sembuh"` Meninggal Meninggal `json:"meninggal"` Perawatan Meninggal `json:"perawatan"` } type Kasus struct { KondisiPenyerta KasusGejala `json:"kondisi_pen...
package pod import ( "github.com/ihaiker/vik8s/reduce/asserts" "github.com/ihaiker/vik8s/reduce/config" "github.com/ihaiker/vik8s/reduce/kube/pod/container" "github.com/ihaiker/vik8s/reduce/kube/pod/volumes" "github.com/ihaiker/vik8s/reduce/plugins" "github.com/ihaiker/vik8s/reduce/refs" v1 "k8s.io/api/core/v1"...
/* Copyright 2020 The CRDS Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software ...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: logic_server.ext.proto package pb import ( context "context" fmt "fmt" proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" math "math" ) // Reference impor...
package wasm import ( "encoding/json" "github.com/confio/tgrade/x/poe/contract" wasmvmtypes "github.com/CosmWasm/wasmvm/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/confio/tgrade/x/poe/types" "github.com/confio/tgrade/x/poe/keeper" ) type...
/* Copyright 2019 The Knative 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...
// Copyright (c) 2014-2017 Bitmark Inc. // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. package main import ( "encoding/hex" "encoding/json" "fmt" "sync" zmq "github.com/pebbe/zmq4" "github.com/bitmark-inc/logger" ) const ( bitcoinOPReturnHexCode = "6a...
// Copyright 2020 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...
package log import ( "encoding/json" "fmt" "io" "strings" "github.com/sirupsen/logrus" ) // Config holds configuration options for a logger object. type Config struct { LogLevel string `json:"level" yaml:"level"` Format string `json:"format" yaml:"format"` AddTimeStamp bool ...
package controller import ( "fmt" "time" "github.com/go-graphite/carbonapi/date" "github.com/satori/go.uuid" "go.avito.ru/DO/moira" "go.avito.ru/DO/moira/api" "go.avito.ru/DO/moira/api/dto" "go.avito.ru/DO/moira/database" ) // GetAllContacts gets all moira contacts func GetAllContacts(database moira.Databas...
// 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 ...
package utils import ( "crypto/sha256" "crypto/tls" "encoding/hex" "fmt" "log" "math/rand" "net" "os" "os/exec" "runtime" "strings" "time" "github.com/bitcav/nitr/version" "github.com/gofiber/fiber" "github.com/gofiber/logger" "github.com/spf13/viper" ) func ConfigFileSetup() { if _, err := os.Stat(...
// Package pbar provides a simple progress bar that includes display of records-per-second (RPS) and an ETA // // This package is a toy and shouldn't be used in production. It will crash. package pbar import ( "bytes" "fmt" "os" "os/exec" "strconv" "strings" "time" ) // The ETA and OPS measurements use a movin...