text
stringlengths
3.08k
10.4k
/* * Copyright (c) 2021 THL A29 Limited, a Tencent company. * * 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 applica...
package app_create import ( "fmt" "time" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/watch" route "github.com/openshift/origin/pkg/route/apis/route" ) func (d *AppCreate) createAndCheckRoute() { result :...
// Copyright 2020 The PipeCD 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 ipallocator import ( "fmt" "math/big" "net" "os" "path" "strconv" "time" "github.com/boltdb/bolt" "github.com/erikh/ping" "github.com/sirupsen/logrus" "github.com/vishvananda/netlink" ) var ( // DBFile is the file the bolt ndatabase is stored in. DBFile = "bolt.db" // IPBucket is the bolt datab...
package database import ( "errors" "fmt" "os" "sync" "time" "github.com/pojol/gobot/bot" "gorm.io/driver/mysql" "gorm.io/gorm" ) type MysqlAdapter struct { db *gorm.DB sync.Mutex } const ( Mysql = "mysql" ) func init() { Register(&MysqlAdapter{}, Mysql) } func (f *MysqlAdapter) Init() error { pwd :=...
package provider import ( "bytes" "context" "errors" "fmt" "io" "net/http" "path" "path/filepath" "regexp" "strings" "sync" "time" "unicode" "github.com/ViBiOh/httputils/v4/pkg/logger" "github.com/ViBiOh/httputils/v4/pkg/request" "golang.org/x/text/runes" "golang.org/x/text/transform" "golang.org/x/...
/* Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
/* * Copyright (C) 2018 The DNA Authors * This file is part of The DNA library. * * The DNA is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) ...
package push import ( "time" "github.com/coreos/etcd/clientv3" "github.com/meitu/bifrost/commons/log" "github.com/meitu/bifrost/commons/trace" "github.com/meitu/bifrost/grpc/callback" "github.com/twinj/uuid" "go.uber.org/zap" "github.com/meitu/bifrost/commons/auth" lb "github.com/meitu/bifrost/commons/grpc-...
// Copyright © 2019 Intel Corporation. All rights reserved. // SPDX-License-Identifier: BSD-3-Clause package events import ( "fmt" "strconv" ) type RTTLogEventEntry struct { ProductId string `json:"product_id"` ProductIdType string `json:"product_id_type"` ProductName string `json:...
// SPDX-License-Identifier: MIT package protocol import "github.com/caixw/apidoc/v7/core" // TextDocumentIdentifier text documents are identified using a URI. // On the protocol level, URIs are passed as strings. // The corresponding JSON structure looks like this: type TextDocumentIdentifier struct { // The text d...
package schema import ( "fmt" "io" "os" "github.com/oliverkofoed/dogo/commandtree" ) const AgentPath = "/usr/local/bin/dogoagent" type Config struct { Environments map[string]*Environment Packages map[string]*Package TemplateSource TemplateSource } type Environment struct { Name strin...
package tvmaze import ( "encoding/json" "fmt" "net/http" "net/url" "reflect" "strconv" "time" "github.com/pkg/errors" log "github.com/sirupsen/logrus" ) // ShowResponse wraps a TV Maze search response type ShowResponse struct { Score float64 Show Show } // Show wraps a TV Maze show object type Show stru...
//go:build linux // +build linux package pmem import ( "context" "fmt" "os" "github.com/pkg/errors" "go.opencensus.io/trace" "golang.org/x/sys/unix" "github.com/Microsoft/hcsshim/internal/guest/storage" dm "github.com/Microsoft/hcsshim/internal/guest/storage/devicemapper" "github.com/Microsoft/hcsshim/inte...
/** * @Author: kiosk * @Mail: <EMAIL> * @Date: 2020/12/27 **/ package packet import ( "bufio" "bytes" "compress/gzip" "encoding/hex" "fmt" "github.com/google/gopacket" "io" "io/ioutil" "net/http" "net/url" "os" "path" "sync" "tls_decript/utils" ) /* * HTTP part */ type HttpReader struct { ident s...
package resources import ( "errors" "fmt" "strings" call "github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/call-log" "github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/cloudit/client" "github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/...
package RealmeGOSDK import ( "fmt" "encoding/base64" "encoding/xml" "encoding/pem" "crypto/x509" "crypto/rsa" "strings" "crypto/aes" "crypto/cipher" ) type ResponseContent struct { responseStatusCode string responsePrivateKey string AESEncryptedContent string AESKey string iv string } type DecryptedRes...
// Copyright 2019 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...
package engine import ( "encoding/json" "fmt" "regexp" "strconv" "strings" "sync" "time" "github.com/mijia/adoc" "github.com/mijia/sweb/log" "github.com/laincloud/deployd/cluster" ) type RuntimeEaglePod struct { ContainerLabel Container adoc.Container ParseSource string } func (pod RuntimeEaglePod) S...
package core // FlagResult represent calculated flag result type FlagResult struct { Hashkey string Entity *Entity Enabled bool Sampled bool Variation *FlagVariation Payload Payload IsNew bool Reason Reason } // Reason represent type of flag reason type Reason string const ( // NoEntityPro...
package main import ( "bytes" "fmt" "github.com/gin-gonic/gin" "github.com/lestrrat-go/jwx/jwa" "github.com/lestrrat-go/jwx/jwt" log "github.com/sirupsen/logrus" "golang.org/x/net/http2" "golang.org/x/net/http2/h2c" "net/http" "time" ) // OAuthServer authorization server. // The authorization server will ac...
// Copyright 2017 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...
package ccv3 import ( "encoding/json" "code.cloudfoundry.org/cli/api/cloudcontroller" "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "github.com/realorko/cli/api/cloudcontroller/ccv3/public" ) // Application represents a Cloud Controller V3 ...
// Copyright 2019 The Kubernetes Authors. // SPDX-License-Identifier: Apache-2.0 package apply import ( "fmt" "strings" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/cli-runtime/pkg/genericclioptions" cmdutil "k8s.io/kubectl/pkg/cmd/util"...
package explorer import ( "context" "encoding/json" "fmt" "net" "net/http" "strconv" "time" "github.com/ethereum/go-ethereum/rpc" "github.com/gorilla/mux" msg_pb "github.com/harmony-one/harmony/api/proto/message" "github.com/harmony-one/harmony/consensus/reward" "github.com/harmony-one/harmony/internal/u...
package api import ( "context" "encoding/json" "fmt" "net/http" "sync" "time" "github.com/go-gorp/gorp" "github.com/ovh/cds/engine/api/cache" "github.com/ovh/cds/engine/api/sessionstore" "github.com/ovh/cds/sdk" "github.com/ovh/cds/sdk/log" ) // lastUpdateBrokerSubscribe is the information need to to sub...
// Copyright (c) 2021 Red Hat, Inc. // Copyright Contributors to the Open Cluster Management project package dbsyncers import ( "context" "fmt" "time" "github.com/go-logr/logr" "github.com/jackc/pgx/v4/pgxpool" policiesv1 "github.com/open-cluster-management/governance-policy-propagator/pkg/apis/policy/v1" "k8...
package odoo import ( "fmt" ) // ReportPosOrder represents report.pos.order model. type ReportPosOrder struct { LastUpdate *Time `xmlrpc:"__last_update,omptempty"` AveragePrice *Float `xmlrpc:"average_price,omptempty"` CompanyId *Many2One `xmlrpc:"company_id,omptempty"` ConfigId *M...
package pedigree import ( "fmt" "strings" "github.com/awalterschulze/gographviz" mapset "github.com/deckarep/golang-set" "github.com/rhagenson/relped/internal/graph" "github.com/rhagenson/relped/internal/io/demographics" ) // "Constant" maps for attributes var ( knownIndvAttrs = map[string]string{ "fontname...
package ash import ( "regexp" "strings" "github.com/256dpi/fire" "github.com/256dpi/fire/coal" "github.com/256dpi/fire/stick" ) var validFieldTags = regexp.MustCompile(`^[RCUW\s]+$`).MatchString // Matrix is used declaratively to specify field and property access of multiple // candidates. type Matrix struct {...
package main import ( "image" "log" "time" ) /* * Facebook Graph API structs for retrieving page photos */ //https://developers.facebook.com/docs/graph-api/reference/page/photos/ //?type=uploaded type PhotosEdge struct { Data []PhotosEdgePhoto `json:"data"` Error GraphErrorResponse `json:"error"` } type Ph...
/* @Time : 2019/8/19 14:17 @Author : louis @File : phoneBinarySearch @Software: GoLand */ package search import ( "bytes" "errors" "fmt" "io/ioutil" "os" "path" "runtime" ) const ( CMCC byte = iota + 0x01 //中国移动 CUCC //中国联通 CTCC //中国...
// Copyright © 2022 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // // 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 // // Unle...
package tel import ( "context" "encoding/json" "fmt" "runtime/debug" "time" "github.com/d7561985/tel/monitoring/metrics" grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware" "github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc" "github.com/opentracing/opentracing-go" "go.uber.org/zap" "go.uber.o...
package main import ( "flag" "fmt" "gopkg.in/yaml.v2" "io/ioutil" "log" "net/http" "path/filepath" "strconv" "github.com/vapourismo/knx-go/knx" "github.com/vapourismo/knx-go/knx/cemi" "github.com/vapourismo/knx-go/knx/dpt" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_go...
package termboxUtil import ( "github.com/nsf/termbox-go" "github.com/mattn/go-runewidth" ) func (win *Window) Init() { win.cursor.SetPoint(0, 0) win.strings = []string{""} win.PosInit() } func (win *Window) GetPos() (int, int) { return win.posx, win.posy } func (win *Window) SetPos(x, y int) { win.posx = x ...
// Package enum contains enumerations and strongly typed names. // // These enums should be treated as enumerables, and MUST NOT be cast as anything else (integer, strings, etc). Enums MUST NOT be compared to strings or integers via casting. Enumerable data SHOULD be stored as the enumeration, not as a string or number...
package client import ( "errors" "io" "net" "time" onet "github.com/Jigsaw-Code/outline-ss-server/net" ss "github.com/Jigsaw-Code/outline-ss-server/shadowsocks" "github.com/Jigsaw-Code/outline-ss-server/slicepool" "github.com/shadowsocks/go-shadowsocks2/socks" ) // clientUDPBufferSize is the maximum supporte...
package dashboard import ( "sync" "github.com/cockroachdb/errors" "github.com/gorilla/websocket" "github.com/iotaledger/goshimmer/packages/mana" ) const ( // the age of the oldest event depends on number of utxo inputs spent recently // note, that this is aggregate for both access and consensus events. maxMa...
// Code generated by entc, DO NOT EDIT. package ent import ( "fmt" "strings" "time" "entgo.io/ent/dialect/sql" "github.com/long2ice/longurl/ent/url" ) // Url is the model entity for the Url schema. type Url struct { config `json:"-"` // ID of the ent. ID int `json:"id,omitempty"` // URL holds the value of ...
package profitcalculator import ( "log" "github.com/marianogappa/signal-checker/common" ) type ProfitCalculator struct { input common.SignalCheckInput tpCumRatios []float64 // 0-based entryCumRatios []float64 // 0-based appliedEventCount int highestEntered int // 1-based lastEventType...
package recaptcha import ( "bytes" "encoding/json" "fmt" "io" "io/ioutil" "net/http" "os" "strings" "time" "github.com/sirupsen/logrus" ) func init() { logrus.SetLevel(logrus.DebugLevel) } const ( // recaptcha API to ensure the token is valid reCAPTCHALink = "https://www.google.com/recaptcha/api/siteve...
package screens import ( "fmt" "fyne.io/fyne" "fyne.io/fyne/canvas" "fyne.io/fyne/layout" "fyne.io/fyne/widget" "github.com/blockpane/prettyfyne" "image" "image/color" "sort" "strconv" "sync" "time" ) func ColorSlider(label string, rgba *color.RGBA, newColor chan *color.RGBA) *fyne.Container { // closure...
// Copyright 2019 Keybase, Inc. All rights reserved. Use of // this source code is governed by the included BSD license. package contacts import ( "errors" "strings" "github.com/keybase/client/go/externals" "github.com/keybase/client/go/libkb" "github.com/keybase/client/go/protocol/keybase1" ) func AssertionFr...
package mgr import ( "context" "fmt" "io/ioutil" "os" "strings" "github.com/alibaba/pouch/apis/types" "github.com/alibaba/pouch/pkg/user" "github.com/docker/docker/daemon/caps" specs "github.com/opencontainers/runtime-spec/specs-go" ) // setupProcess setups spec process. func setupProcess(ctx context.Conte...
package helpers import ( "strings" "fmt" "github.com/pkg/errors" "github.com/sirupsen/logrus" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" ) // NOT TO BE UPDATED at runtime var meshesMeta = map[string][]string{ "Istio": { "istio", }, "Linkerd...
package operation import ( "bufio" "errors" "net" "reflect" "strconv" "github.com/op/go-logging" "github.com/beanstalkg/beanstalkg/architecture" ) var log = logging.MustGetLogger("BEANSTALKG") type clientHandler struct { conn net.Conn registerConnection chan architectu...
/** * Copyright 2022 Comcast Cable Communications Management, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requir...
package server import ( "context" "fmt" "net" "net/http" "time" log "github.com/Sirupsen/logrus" cfg "github.com/danielkrainas/gobag/configuration" "github.com/danielkrainas/gobag/context" "github.com/danielkrainas/gobag/decouple/cqrs" "github.com/rs/cors" "github.com/urfave/negroni" "github.com/danielkr...
package cmd import ( "fmt" "log" "math/rand" "os" "runtime" "runtime/pprof" "sync" "time" "github.com/couchbase/go-blip" "github.com/spf13/cobra" ) // This program acts as a sender equivalent to the Objective-C one in MYNetwork's // BLIPWebSocketTest.m. const kMessageInterval float64 = 0.000 // Seconds to...
package composeutil import ( "fmt" "math" "net" "sort" "strconv" "strings" "github.com/compose-spec/compose-go/cli" "github.com/compose-spec/compose-go/types" "github.com/docker/compose/v2/pkg/api" "github.com/benchkram/bob/pkg/usererror" ) type PortConfigs []PortConfig func (c PortConfigs) String() stri...
// SPDX-FileCopyrightText: 2021 The Go-SSB Authors // // SPDX-License-Identifier: MIT package sbot import ( "context" "errors" "fmt" "sync" "time" "go.cryptoscope.co/luigi" "go.cryptoscope.co/margaret" "go.mindeco.de/log" "go.mindeco.de/log/level" "go.cryptoscope.co/ssb" "go.cryptoscope.co/ssb/internal/s...
package runner import ( "bytes" "context" "encoding/json" "fmt" "io/ioutil" "os" "path/filepath" "time" "github.com/max-bytes/omnikeeper-deploy-agent/pkg/ansible" "github.com/max-bytes/omnikeeper-deploy-agent/pkg/config" "github.com/max-bytes/omnikeeper-deploy-agent/pkg/omnikeeper" "github.com/sirupsen/l...
package metrics_test import ( "context" "encoding/json" "fmt" "mime" "net/http" "sync" "testing" "time" "github.com/jitsucom/jitsu/server/safego" "github.com/jitsucom/jitsu/server/metrics" "github.com/jitsucom/jitsu/server/resources" "github.com/jitsucom/jitsu/server/timestamp" "github.com/phayes/freepo...
package loopbackfs import ( "fmt" "io/ioutil" "os" "path/filepath" "sync" "sync/atomic" "syscall" "time" "github.com/jacobsa/fuse" "github.com/jacobsa/fuse/fuseops" "github.com/jacobsa/fuse/fuseutil" ) // Tracking for current node id var allocatedInodeId uint64 = fuseops.RootInodeID // Atomically gets th...
package main import ( "net/url" "regexp" "strings" "sync" "time" ) var regexFormat = regexp.MustCompile("(?i)format\\s\\S+(\\s+)") var regexValues = regexp.MustCompile("(?i)\\svalues\\s") // Table - store query table info type Table struct { Name string Rows []string Count int Flus...
// Code generated by go-swagger; DO NOT EDIT. package authorization // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "githu...
package algod import ( "bytes" "encoding/json" "fmt" "io" "io/ioutil" "net/http" "net/url" "strings" "github.com/google/go-querystring/query" ) const ( authHeader = "X-Algo-API-Token" healthCheckEndpoint = "/health" apiVersionPathPrefix = "/v1" ) // unversionedPaths ais a set of paths that sh...
package main import ( "fmt"; "os"; "strconv"; "time" ) var repeat = 10 var size = 4194304 var cutOff = 32 func copy(a []float64, b int, e int, d []float64, j int) { for { if e < b { break } d[j] = a[b] j++ b++ } } func search(a []float64, b int, e int, k float64) int { for { if e < b { retu...
/********************************************************** * Author : Michael * Email : <EMAIL> * Last modified : 2016-01-23 10:07 * Filename : user.go * Description : 单个玩家的数据 * *******************************************************/ package desk import ( //"algorithm" "data" "interfacer...
// Code generated by Pulumi SDK Generator DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package apigateway import ( "context" "reflect" "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/apigateway" "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/s3" "github.com/pu...
package realm import ( "sync/atomic" "github.com/gojisvm/gojis/internal/runtime/binding" "github.com/gojisvm/gojis/internal/runtime/errors" "github.com/gojisvm/gojis/internal/runtime/lang" ) // Intrinsic names used by the specification. The specification denotes the // usage of these names as e.g. %ThrowTypeErro...
package reversehttp import ( "bufio" "bytes" "errors" "fmt" "io" "io/ioutil" "net" "net/http" "sync" ) // NewRequest creates an http.Request that will upgrade the connections to // Reverse HTTP. func NewRequest(url string) (*http.Request, error) { req, err := http.NewRequest("POST", url, nil) if err != nil...
package actions import ( "encoding/json" "fmt" "io/ioutil" "net/http" "time" "github.com/mitchellh/mapstructure" "gopkg.in/getlantern/deepcopy.v1" "sort" ) // resourceAnswer contains resource name and its configuration so // file writer can compose json with name as a key and complete resource configuration ...
package CoapPubsub import ( "log" "net" "github.com/dustin/go-coap" ) type chanMapStringList map[*net.UDPAddr][]string type stringMapChanList map[string][]*net.UDPAddr type CoapPubsubServer struct { capacity int msgIndex uint16 //for increase and sync message ID //map to store "chan -> Topic List" for find ...
package deb import ( "fmt" "path/filepath" "regexp" "strings" ) // PackageCatalog is abstraction on top of PackageCollection and PackageList type PackageCatalog interface { Scan(q PackageQuery) (result *PackageList) Search(dep Dependency, allMatches bool) (searchResults []*Package) SearchSupported() bool Sear...
package scheduler import ( "fmt" "time" "github.com/spinnaker/rotation-scheduler/schedule" "github.com/spinnaker/rotation-scheduler/users" ) const ( DateFormat = "Mon 02 Jan 2006" ) var ( today = func() time.Time { return time.Now().Truncate(24 * time.Hour) } ) // Scheduler creates or extends a new rotation ...
package ipset import ( "strconv" "syscall" ) const ( IPSET_ERR_PRIVATE = 4096 + iota IPSET_ERR_PROTOCOL IPSET_ERR_FIND_TYPE IPSET_ERR_MAX_SETS IPSET_ERR_BUSY IPSET_ERR_EXIST_SETNAME2 IPSET_ERR_TYPE_MISMATCH IPSET_ERR_EXIST IPSET_ERR_INVALID_CIDR IPSET_ERR_INVALID_NETMASK IPSET_ERR_INVALID_FAMILY IPSET_E...
package socks5 import ( "bytes" "fmt" "io" "log" "net" "strings" "time" ) //AssembleHeader assemble data with header /* +----+------+------+----------+----------+----------+ |RSV | FRAG | ATYP | DST.ADDR | DST.PORT | DATA | +----+------+------+----------+----------+----------+ | 2 | 1 | 1 | Variable | 2...
// Copyright 2018 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 ...
package logging import ( "bytes" "io" "io/ioutil" "net/http" "os" "strings" "sync" "time" "github.com/btm6084/gojson" "github.com/spf13/cast" ) var ( // ScalyrClient is the http.Client used to communicate with scalyr. ScalyrClient = &http.Client{ Timeout: 2 * time.Second, } scalyrBufferLimit = 50000...
// 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 lzw implements the Lempel-Ziv-Welch compressed data format, // described in <NAME>, ``A Technique for High-Performance Data // Compression'', Compute...
/* * Copyright (c) 2020 PANTHEON.tech s.r.o. 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 requir...
/* Copyright (C) 2017 Verizon. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
package utils import ( "encoding/json" "errors" "fmt" "regexp" "strings" ) var playbackURIRetryCount = 0 //ACTOR a metadata constant for actor entry const ACTOR = "actor" //GENRE a metadata constant for genre entry const GENRE = "genre" //CONTENTID a metadata constant for content id entry const CONTENTID = "c...
package provider import ( "context" "fmt" "net" "os" "strings" "sync" "time" "github.com/coreos/go-systemd/activation" "github.com/miekg/dns" log "github.com/sirupsen/logrus" "github.com/chrisruffalo/gudgeon/config" "github.com/chrisruffalo/gudgeon/engine" ) type provider struct { engine engine.Engine...
package service import ( "bytes" "encoding/base64" "errors" "net/http" "strconv" "strings" "time" "github.com/gorilla/mux" "github.com/rancher/catalog-service/model" "github.com/rancher/catalog-service/parse" "github.com/rancher/go-rancher/api" ) // Removes template that belongs to a duplicate catalog fun...
package atlasmap import ( "context" "reflect" routev1 "github.com/openshift/api/route/v1" "github.com/atlasmap/atlasmap-operator/pkg/apis/atlasmap/v1alpha1" "github.com/atlasmap/atlasmap-operator/pkg/util" appsv1 "k8s.io/api/apps/v1" "k8s.io/api/extensions/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s....
/* 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, ...
/* * @Author: yangdihang * @Date: 2020/11/19 */ package smartlimiter import ( "context" "fmt" "reflect" "strings" config "yun.netease.com/slime/pkg/apis/config/v1alpha1" microservicev1alpha1 "yun.netease.com/slime/pkg/apis/microservice/v1alpha1" "yun.netease.com/slime/pkg/apis/networking/v1alpha3" "yun.nete...
package htcat import ( "io" "sync/atomic" ) type writerToCloser interface { io.WriterTo io.Closer } type fragment struct { ord int64 contents writerToCloser } // The Defragmenter is an implementer of the WriterTo interface that // operates on the principle of handing out fragments, each with an // ordina...
package resolvers import ( "fantom-api-graphql/internal/repository" "fantom-api-graphql/internal/types" "fmt" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "math/big" ) // constants used in reward calculations const ( erwSecondsInDay uint64 = 86400 erwSecondsInWee...
/* * This file is part of the libvirt-kube project * * 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 sse import ( "bufio" "bytes" "context" "fmt" "io" "net/http" "net/http/httptest" "reflect" "strings" "sync" "sync/atomic" "testing" "time" ) func TestScanLines(t *testing.T) { inputs := []string{"event:foo", "data:bar", ":", "", "id:1234"} input := fmt.Sprintf("%s\r%s\r\n%s\n%s\n%s", inputs[0],...
package nvidia import ( "bytes" "context" "fmt" "os" "os/exec" "strings" "sync" "time" "github.com/Netflix/titus-executor/executor/runtime/types" "github.com/Netflix/titus-executor/fslocker" "github.com/Netflix/titus-executor/logger" log "github.com/sirupsen/logrus" ) const ( nvidiaDev = "/dev/nv...
/* Copyright 2022 The KubeVela 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, softw...
// Copyright 2017 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 main import ( "context" "flag" "os" "path/filepath" "strings" "time" "github.com/google/subcommands" "chromiumos/tast/cmd/tast/inter...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.24.0 // protoc v3.11.2 // source: module.proto package protobuf import ( proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/p...
package peermanager import ( "context" bsmsg "gx/ipfs/QmYJ48z7NEzo3u2yCvUvNtBQ7wJWd5dX2nxxc7FeA6nHq1/go-bitswap/message" wantlist "<KEY>" logging "<KEY>" peer "<KEY>" ) var log = logging.Logger("bitswap") var ( metricsBuckets = []float64{1 << 6, 1 << 10, 1 << 14, 1 << 18, 1<<18 + 15, 1 << 22} ) // PeerQueue...
package main import ( "github.com/gorilla/websocket" "github.com/paked/configure" "os" "log" "net/http" "html/template" "github.com/nu7hatch/gouuid" "io" "github.com/lustyn/librespot-golang/src/librespot/core" "strings" "github.com/lustyn/librespot-golang/src/librespot" "io/ioutil" "github.com/lustyn/libr...
package options import "github.com/tableauio/tableau/format" // Options is the wrapper of tableau params. // Options follow the design of Functional Options (https://github.com/tmrts/go-patterns/blob/master/idiom/functional-options.md). type Options struct { // Location represents the collection of time offsets in u...
// (c) 2021, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. package platformvm import ( "fmt" "time" "github.com/ava-labs/avalanchego/database" "github.com/ava-labs/avalanchego/database/manager" "github.com/ava-labs/avalanchego/database/prefixdb" "github.com/ava-labs/avalancheg...
// Copyright 2015 The Vanadium Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "fmt" "os" "os/signal" "sync" "time" "v.io/v23" "v.io/v23/context" "v.io/x/ref/lib/stats/histogram" ) // params encapsul...
package sqlite import ( "context" "database/sql" "fmt" "github.com/pkg/errors" schemasv1alpha4 "github.com/schemahero/schemahero/pkg/apis/schemas/v1alpha4" "github.com/schemahero/schemahero/pkg/database/types" ) func PlanSqliteTable(dsn string, tableName string, sqliteTableSchema *schemasv1alpha4.SqliteTableSc...
package test import ( "encoding/json" "fmt" "testing" res "github.com/jirenius/go-res" "github.com/jirenius/go-res/restest" ) var resourceRequestTestTbl = []struct { Pattern string ResourceName string Query string }{ // Simple RID {"model", "test.model", ""}, {"model.foo", "test.model.foo", ""...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/config/accesslog/v2/file.proto package v2 import ( fmt "fmt" proto "github.com/golang/protobuf/proto" _ "github.com/lyft/protoc-gen-validate/validate" math "math" ) // Reference imports to suppress errors if they are not otherwise used. var _ = pr...
package unitygen import ( "bytes" "fmt" "strings" "github.com/gamewheels/cfgwheel/cfgdef" ) var namespace = "GameConfig" // UnityGen Unity CS胶水代码生成器 type UnityGen struct { cfgMap *cfgdef.CfgMap } // NewUnityGen 构建Unity CS胶水代码生成器 func NewUnityGen(cfgMap *cfgdef.CfgMap) *UnityGen { return &UnityGen{ cfgMap: ...
package edit import ( "bufio" "encoding/json" "fmt" "io" "os" "os/exec" "strings" "github.com/GGP1/kure/auth" cmdutil "github.com/GGP1/kure/commands" "github.com/GGP1/kure/db/card" "github.com/GGP1/kure/pb" "github.com/GGP1/kure/sig" "github.com/pkg/errors" "github.com/spf13/cobra" bolt "go.etcd.io/bb...
package core import ( "errors" "fmt" "html/template" "mime/multipart" "strings" ) type InlineType string var TabularInline InlineType var StackedInline InlineType func init() { TabularInline = "tabular" StackedInline = "stacked" } type AdminPageInline struct { Ordering int GenerateModelI func(...
/* Copyright 2021 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, ...