text
stringlengths
3.08k
10.4k
package fetcher import ( "bufio" "bytes" "compress/gzip" "encoding/xml" "fmt" "net/url" "path" "github.com/inconshreveable/log15" "golang.org/x/xerrors" ) const ( amazonLinux1MirrorListURI = "http://repo.us-west-2.amazonaws.com/2018.03/updates/x86_64/mirror.list" amazonLinux2MirrorListURI = "https://cdn.a...
//Copyright 2017-2020 Baidu 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 writi...
package dockerclient import ( "fmt" "io" "log" "net/http" "net/http/httptest" "strconv" "time" "github.com/docker/docker/pkg/jsonlog" "github.com/docker/docker/pkg/stdcopy" "github.com/docker/docker/pkg/timeutils" "github.com/docker/docker/utils" "github.com/gorilla/mux" ) var ( testHTTPServer *httptest...
package ephemeral import ( "fmt" "testing" "github.com/keybase/client/go/libkb" "github.com/keybase/client/go/protocol/keybase1" "github.com/stretchr/testify/require" "golang.org/x/net/context" ) func TestTeamEKBoxStorage(t *testing.T) { tc, _ := ephemeralKeyTestSetup(t) defer tc.Cleanup() m := libkb.NewMe...
package broker import ( "encoding/json" "io/ioutil" "net/http" "net/url" "strings" "sync" "time" "github.com/gorilla/websocket" "github.com/divisionone/go-api/handler" "github.com/micro/go-log" "github.com/divisionone/go-micro/broker" ) const ( pingTime = (readDeadline * 9) / 10 readLimit = 163...
// Copyright © 2019 Binance // // This file is part of Binance. The full Binance copyright notice, including // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. package resharing import ( "fmt" "math/big" "github.com/binan...
package output import ( "encoding/csv" "fmt" "io" "math" "regexp" "sort" "strconv" "strings" "time" "github.com/lauripiispanen/most-active-github-users-counter/github" "github.com/lauripiispanen/most-active-github-users-counter/top" ) type Format func(users GithubUserList, writer io.Writer, options top.Op...
package session import ( "context" "time" "github.com/influxdata/influxdb/v2" "github.com/influxdata/influxdb/v2/kit/platform" "github.com/influxdata/influxdb/v2/kit/platform/errors" "github.com/influxdata/influxdb/v2/rand" "github.com/influxdata/influxdb/v2/snowflake" ) // Service implements the influxdb.Ses...
/* Copyright 2021 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package migrationhub import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) // Please also see https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/AssociateCreatedArtifactRequest t...
package context import "strings" func negotiationMatch(in []string, priorities []string) string { // e.g. // match json: // in: text/html, application/json // prioritities: application/json // not match: // in: text/html, application/json // prioritities: text/xml // match html: // in: text/html, applic...
// 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 yopass import ( "bytes" "crypto" "crypto/rand" "encoding/base64" "encoding/json" "errors" "fmt" "io" "io/ioutil" "net/url" "os" "strings" "golang.org/x/crypto/openpgp" "golang.org/x/crypto/openpgp/armor" "golang.org/x/crypto/openpgp/packet" ) // ErrEmptyKey is returned when no encryption key i...
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 // Package addon contains the service to manage addons. package addon import ( "fmt" "regexp" "strings" "github.com/aws/copilot-cli/internal/pkg/template" ) const ( dynamoDbAddonPath = "addons/ddb/cf.yml...
// 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 grammar import ( "errors" "fmt" ) type ruleTreeAdapter struct { repetitiveRuleNodeBuilder RepetitiveRuleNodeBuilder ruleNodeBuilder RuleNodeBuilder ruleTreeBuilder RuleTreeBuilder } func createRuleTreeAdapter( repetitiveRuleNodeBuilder RepetitiveRuleNodeBuilder, ruleNodeBuilder Rul...
// Copyright 2018 Authors of Cilium // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed ...
// Copyright 2018 The Chubao 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 2019 The Machine Controller 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 w...
// Copyright 2018 National Library of Norway // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law o...
/* Copyright 2021 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...
// Code generated by entc, DO NOT EDIT. package ent import ( "encoding/json" "fmt" "strings" "github.com/facebookincubator/ent/dialect/sql" "github.com/google/uuid" "github.com/minskylab/asclepius/ent/epidemiologicresults" "github.com/minskylab/asclepius/ent/test" ) // EpidemiologicResults is the model entit...
// Copyright (C) 2019 <NAME>, Inc. // See LICENSE for copying information. package encryption import ( "bytes" "context" "errors" "io" "io/ioutil" "github.com/spacemonkeygo/monkit/v3" "storj.io/common/ranger" "storj.io/common/readcloser" ) var mon = monkit.Package() // A Transformer is a data transformati...
// Copyright 2018 Google LLC All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable ...
package candlecache import ( "errors" "sort" "sync" "time" "github.com/sirupsen/logrus" "github.com/tagirmukail/tccbot-backend/internal/db/models" "github.com/tagirmukail/tccbot-backend/internal/types" "github.com/tagirmukail/tccbot-backend/pkg/tradeapi" "github.com/tagirmukail/tccbot-backend/pkg/tradeapi/b...
/* * Copyright (c) 2019 WSO2 Inc. (http:www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you 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/license...
package k8ssandra import ( "context" "fmt" "github.com/go-logr/logr" cassdcapi "github.com/k8ssandra/cass-operator/apis/cassandra/v1beta1" api "github.com/k8ssandra/k8ssandra-operator/apis/k8ssandra/v1alpha1" "github.com/k8ssandra/k8ssandra-operator/pkg/annotations" "github.com/k8ssandra/k8ssandra-operator/pkg/...
package main import ( "flag" cache "github.com/arazmj/gerdu/cache" "github.com/arazmj/gerdu/grpcserver" "github.com/arazmj/gerdu/httpserver" "github.com/arazmj/gerdu/lfucache" "github.com/arazmj/gerdu/lrucache" "github.com/arazmj/gerdu/memcached" "github.com/arazmj/gerdu/raftproxy" "github.com/arazmj/gerdu/re...
// Copyright 2017 Istio Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
package cookies import ( "errors" "fmt" "net/http" "time" "github.com/oauth2-proxy/oauth2-proxy/v7/pkg/apis/options" "github.com/oauth2-proxy/oauth2-proxy/v7/pkg/apis/sessions" "github.com/oauth2-proxy/oauth2-proxy/v7/pkg/clock" "github.com/oauth2-proxy/oauth2-proxy/v7/pkg/encryption" "github.com/vmihailenco...
// Copyright 2016 <NAME>) <NAME> (https://github.com/vsergeev) // Copyright 2017 The coin-network developers // License: MIT package curve import ( "golang.org/x/crypto/ripemd160" "fmt" "bytes" "crypto/sha256" "math/big" "crypto/ecdsa" ) type PublicKey ecdsa.PublicKey func isOdd(a *big.Int) bool { retur...
// *** WARNING: this file was generated by the Pulumi SDK Generator. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** package v1 import ( "context" "reflect" "github.com/pkg/errors" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Creates a firewall rule for the application....
package main import ( "os" "flag" "fmt" "log" "time" "github.com/joho/godotenv" "github.com/whitef0x0/TrendingGitlab/flags" "github.com/whitef0x0/TrendingGitlab/storage" "github.com/whitef0x0/TrendingGitlab/twitter" "github.com/whitef0x0/TrendingGitlab/expvar" "github.com/whitef0x0/TrendingGitlab/twee...
// Copyright 2019 The RPGSnack 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 agre...
/* * Copyright 2021 Layotto 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 2021 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
/* mqtt topics ica/update (Will update on whatever message) ica/availableamount ica/all type, topic, status */ package main import ( "encoding/json" "flag" "net/http" "os" "os/signal" "strconv" "time" "github.com/andersbetner/homeautomation/ica" "github.com/andersbetner/homeautomation/util" ag "github.com/...
package check_pod_exec import ( "errors" "fmt" "io" "strings" "github.com/appscode/go/flags" "github.com/appscode/kutil/tools/clientcmd" "github.com/appscode/searchlight/pkg/icinga" "github.com/appscode/searchlight/plugins" "github.com/spf13/cobra" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/clie...
package goroslib import ( "fmt" "reflect" "github.com/aler9/goroslib/api-master" "github.com/aler9/goroslib/msg-utils" "github.com/aler9/goroslib/proto-tcp" ) type serviceProviderEvent interface { isServiceProviderEvent() } type serviceProviderEventClose struct{} func (serviceProviderEventClose) isServicePro...
/* * Copyright 2019 <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 wr...
package fakeiot import ( "fmt" "strings" "time" mqtt "github.com/eclipse/paho.mqtt.golang" "github.com/rigwild/FIL-A2-infrastructures-integration/pkg/putils" "github.com/spf13/viper" ) // mqttConnect will start all mqtt clients func mqttConnect() []mqtt.Client { t := viper.GetStringSlice("fakeiot.mqtt_ids") ...
package cache import ( "context" "crypto/rand" "fmt" "math/big" goharborv1 "github.com/goharbor/harbor-operator/apis/goharbor.io/v1beta1" harbormetav1 "github.com/goharbor/harbor-operator/apis/meta/v1alpha1" "github.com/goharbor/harbor-operator/pkg/cluster/lcm" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/...
// Copyright The OpenTelemetry 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...
package model import ( "github.com/SmallTianTian/dingtalk/model/taobao" "github.com/SmallTianTian/dingtalk/utils" ) func NewOapiCalendarListRequest() *OapiCalendarListRequest { return &OapiCalendarListRequest{} } type OapiCalendarListRequest struct { taobao.SimpleTaobaoRequest taobao.SimpleResponse Resp ...
package main import ( "log" "fmt" "time" "strings" "io/ioutil" "database/sql" "database/sql/driver" _ "github.com/alexbrainman/odbc" "golang.org/x/text/transform" "golang.org/x/text/encoding/charmap" "flag" ) var ( server = flag.String("S", "127.0.0.1", "ASE Server address") port = flag.Int("P", 5000, "A...
// 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 repository import ( "context" "fmt" "net/url" "time" "code.gitea.io/gitea/models/avatars" user_model "code.gitea.io/gitea/models/user" "code...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: go.chromium.org/luci/vpython/api/vpython/pep425.proto package vpython import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Erro...
/* MIT License Copyright (c) 2020-2021 <NAME> This file is part of NGSI Go https://github.com/lets-fiware/ngsi-go 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 ...
package errors import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "testing" ) // TestClass tests creation of the `Major` subclassification. func TestClass(t *testing.T) { t.Run("Major", func(t *testing.T) { resetEmptyContainer() firstMjr, err := NewMajor() require.NoError(t...
package tester import ( "bytes" "context" "encoding/json" "fmt" "io/ioutil" "os" "path/filepath" "testing" "time" "github.com/ibuildthecloud/baaah/pkg/meta" "github.com/ibuildthecloud/baaah/pkg/router" "github.com/rancher/wrangler/pkg/yaml" "github.com/stretchr/testify/assert" "k8s.io/apimachinery/pkg/r...
// Copyright (c) 2017 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...
package restore import ( "bytes" "fmt" "io" "log" "time" "github.com/ichbinfrog/vulas-utils/pkg/connect" "github.com/ichbinfrog/vulas-utils/pkg/convert" batchv1 "k8s.io/api/batch/v1" apiv1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" ) // Context passe...
package benchmarks import ( "fmt" "github.com/willabides/rjson" ) type rjsonBencher struct { valueReader rjson.ValueReader buffer rjson.Buffer readRepoDataHandler *rjsonReadRepoDataHandler stringBuffer []byte distinctUserIDsHandler *rjsonDistinctUserIDsUserHandler } fu...
package client import ( "hash/crc32" "strconv" "os" "github.com/vsco/dcdr/cli/printer" "github.com/vsco/dcdr/client/watcher" "github.com/vsco/dcdr/config" "github.com/vsco/dcdr/models" ) // IFace interface for Decider Clients type IFace interface { IsAvailable(feature string) bool IsAvailableForID(feature ...
package handlers import ( "net/http" "regexp" "strings" "fmt" router_http "code.cloudfoundry.org/gorouter/common/http" "code.cloudfoundry.org/gorouter/logger" "code.cloudfoundry.org/gorouter/metrics" "code.cloudfoundry.org/gorouter/registry" "code.cloudfoundry.org/gorouter/route" "github.com/uber-go/zap" ...
package identity import ( "bytes" "fmt" "github.com/Oneledger/protocol/data/balance" "github.com/Oneledger/protocol/data/keys" "github.com/Oneledger/protocol/serialize" "github.com/Oneledger/protocol/storage" "github.com/pkg/errors" "github.com/tendermint/tendermint/abci/types" ) type Validator struct { Addr...
// -*- Mode: Go; indent-tabs-mode: t -*- // // Copyright (C) 2018 Canonical Ltd // Copyright (C) 2018-2019 IOTech Ltd // Copyright (C) 2019 VMware, Inc // // SPDX-License-Identifier: Apache-2.0 // This package provides a simple example implementation of // a ProtocolDriver interface. // package driver import ( "bufi...
package dtls import ( "bytes" "crypto/aes" "crypto/hmac" "crypto/sha256" "encoding/binary" "errors" "fmt" "github.com/moroen/dtls/ccm" ) const ( AadAuthLen int = 13 ) func newNonce(iv []byte, epoch uint16, seq uint64) []byte { nonce := new(bytes.Buffer) nonce.Write(iv) seq += uint64(epoch) << 48 binary...
// Unless explicitly stated otherwise all files in this repository are licensed // under the Apache License Version 2.0. // This product includes software developed at Datadog (https://www.datadoghq.com/). // Copyright 2016-present Datadog, Inc. // Package agent implements the api endpoints for the `/agent` prefix. //...
// Package value implements a simple native contract that can store, delete, and // display values. package value import ( "fmt" "io" "sort" "strings" "go.dedis.ch/dela" "go.dedis.ch/dela/core/access" "go.dedis.ch/dela/core/execution" "go.dedis.ch/dela/core/execution/native" "go.dedis.ch/dela/core/store" "g...
package app import ( "bytes" "net/http" "net/url" "strings" "time" pub "github.com/go-ap/activitypub" "github.com/go-ap/errors" "github.com/go-chi/chi/v5" ) type ItemMetadata struct { To AccountCollection `json:"to,omitempty"` CC AccountCollection `json:"to,omitempty"` Tags TagCollec...
package shell import ( "bufio" "flag" "fmt" "io" "os" "os/exec" "path/filepath" "github.com/udhos/conbox/common" ) // Run executes the applet. func Run(tab map[string]common.AppletFunc, args []string) int { var help, interactive bool flagSet := flag.NewFlagSet("shell", flag.ContinueOnError) flagSet.Bool...
package validation import ( "bufio" "fmt" "github.com/asaskevich/govalidator" "gopkg.in/yaml.v2" "os" "regexp" "strconv" "strings" "github.com/jboss-container-images/jboss-kie-modules/tools/openshift-template-validator/utils" templateapi "github.com/openshift/origin/pkg/template/apis/template" "k8s.io/apim...
package beepFade import ( "fmt" "math" "time" "github.com/faiface/beep" ) // Holds fadeItter and trackItter /* fadeItter - Is used to fade in and out trackItter - Represents the position into a song */ var itters map[int][]float64 // fader is a type so that fader.Stream() can be used with proper parameters to r...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: RFThermal.proto package proto 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 a...
// Copyright 2020 Navibyte (https://navibyte.com). All rights reserved. // Use of this source code is governed by a MIT-style license, see the LICENSE. package usgs import ( "sort" pb "github.com/navibyte/quake/api/v1" "github.com/navibyte/quake/internal/geolib" "github.com/navibyte/quake/internal/mathlib" ) fu...
//go:generate go run gen/buildnumber.go //go:generate goversioninfo package main import ( "fmt" "os" "strings" "time" "ditto.co.jp/submit/awss" "ditto.co.jp/submit/config" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/batch" "github.com/jessevdk/g...
package rfc8288 import ( "bytes" "io" "unicode" ) // token is an enum type to represent known lexer tokens for RFC8288 type token int // token types const ( INVALID token = iota // delimiters QUOTE SEMICOLON LT GT EQ // special EOF STAR // multi-character WORD WS // reserved attribute names REL...
package main import ( "encoding/json" "errors" "flag" "fmt" "os" "path/filepath" "code.cloudfoundry.org/clock" "code.cloudfoundry.org/csibroker/csibroker" "code.cloudfoundry.org/csibroker/utils" "code.cloudfoundry.org/csishim" "code.cloudfoundry.org/debugserver" "code.cloudfoundry.org/goshims/grpcshim" "...
package chunk import ( "bufio" "context" "crypto/sha256" "hash" "io" "sort" "sync" "time" ) // Reconstructor is the object that takes in chunks and streams out the // reconstructed original whole data. // It is thread safe. type Reconstructor struct { // read-only's checksumToIndexes map[Sum224][]int chunk...
package tfconf import ( "fmt" "log" "sort" "strings" "github.com/hashicorp/terraform-config-inspect/tfconfig" "github.com/segmentio/terraform-docs/internal/pkg/print" ) // Module represents a Terraform mod. It consists of // - Header ('header' json key): Module header found in shape of multi line comment...
package environment import ( "fmt" "math" "strconv" "github.com/apex/log" "github.com/docker/docker/api/types/container" "github.com/pterodactyl/wings/config" ) type Mount struct { // In Docker environments this makes no difference, however in a non-Docker environment you // should treat the "Default" mount ...
package recorder import ( "fmt" "sync" "time" "github.com/livekit/protocol/livekit" "github.com/livekit/protocol/logger" "github.com/livekit/livekit-recorder/pkg/config" "github.com/livekit/livekit-recorder/pkg/display" "github.com/livekit/livekit-recorder/pkg/pipeline" ) type Recorder struct { ID string ...
//(C) Copyright [2020] Hewlett Packard Enterprise Development LP //(C) Copyright 2020 Intel Corporation // //Licensed under the Apache License, Version 2.0 (the "License"); you may //not use this file except in compliance with the License. You may obtain //a copy of the License at // // http://www.apache.org/license...
package inputviewer import ( "image" "image/color" "log" "github.com/hajimehoshi/ebiten/v2" "github.com/hajimehoshi/ebiten/v2/ebitenutil" ) const ( btnSpriteWidth = 34 btnSpriteHeight = btnSpriteWidth ) type Config struct { Enabled bool A, B, Z, R, Start InputButton CUp, CRight,...
package cproto import ( "fmt" "io" "net" "sync" "bufio" "bytes" "github.com/restream/reindexer/cjson" ) type sig chan *NetBuffer const bufsCap = 16 * 1024 const queueSize = 40 const cprotoMagic = 0xEEDD1132 const cprotoVersion = 0x100 const cprotoHdrLen = 20 const ( cmdPing = 0 cmdLogin ...
package server import ( "errors" "net" "net/http" "os" "os/signal" "runtime" "strings" "time" "github.com/go-chi/chi" "github.com/heedy/heedy/api/golang/rest" "github.com/heedy/heedy/backend/assets" "github.com/heedy/heedy/backend/database" "github.com/heedy/heedy/backend/plugins" "github.com/heedy/hee...
/** * Copyright (C) 2015 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...
package util import ( "example-solution-operator/pkg/config" "example-solution-operator/version" "fmt" "os" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" ) // ServerKind describes the kind of `base-server` component...
package clitest import ( "fmt" "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/tests" "github.com/stretchr/testify/require" "testing" "github.com/irisnet/irishub/app" "github.com/irisnet/irishub/modules/gov" ) func init() { irisHome, iriscliHome = getTestingHomeDirs() } func TestIrisCLIS...
/* * Copyright 2019 <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 wr...
// // Copyright (c) 2015-2016, Arista Networks, Inc. // 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, // th...
package coap import ( "bytes" "context" "fmt" "io" "io/ioutil" "net/url" "github.com/lobaro/coap-go/coapmsg" ) // A Request represents a CoAP request received by a server // or to be sent by a client. // // The orientation for the structure is the http.Request to // make a conversion as easy as possible and t...
// Copyright 2018 The Go Cloud Development Kit Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by appli...
/* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package emr import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) // This input determines which steps to list. // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-0...
package queue import ( "context" "encoding/json" "errors" "sync" "sync/atomic" "time" "github.com/golang-queue/queue/core" ) // ErrQueueShutdown the queue is released and closed. var ErrQueueShutdown = errors.New("queue has been closed and released") // TaskFunc is the task function type TaskFunc func(contex...
// Copyright 2015-present, Cyrill @ <EMAIL> and the CoreStore 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 // // Unles...
package ergo import ( "net/http" "github.com/wlMalk/ergo/constants" "github.com/wlMalk/ergo/validation" ) type Wrapper interface { Match(*http.Request) http.Handler Set([]*Route) } var ( DefMimeType = constants.MIME_JSON DefSchemes = []string{constants.SCHEME_HTTP} DefConsumes = []string{DefMimeType} Def...
// Copyright 2021 // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, sof...
package main import ( "fmt" "os" "strings" "github.com/bitrise-io/envman/envman" "github.com/bitrise-io/go-utils/command" "github.com/bitrise-io/go-utils/command/git" "github.com/bitrise-io/go-utils/log" "github.com/bitrise-tools/go-steputils/stepconf" ) type config struct { RepositoryURL string `env:"repos...
package petstore import ( "context" "strconv" "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/pkg/errors" "google.golang.org/genproto/googleapis/type/date" "github.com/PacktPublishing/Go-for-DevOps/chapter/13/petstore-provide...
package gcal import ( "fmt" "regexp" "strings" "time" "github.com/olebedev/config" "github.com/senorprogrammer/wtf/wtf" "google.golang.org/api/calendar/v3" ) // Config is a pointer to the global config object var Config *config.Config type Widget struct { wtf.TextWidget } func NewWidget() *Widget { widget...
package addon import ( "context" "embed" "fmt" "os" "reflect" corev1 "k8s.io/api/core/v1" rbacv1 "k8s.io/api/rbac/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" "k8s.io/klog/v2" "open-cluster-management.io/addon...
package main import ( "bytes" "fmt" "io" "log" "os" "path/filepath" "sort" "strings" "time" "github.com/spf13/cobra" "github.com/iotexproject/iotex-core/ioctl/cmd" ) var ioctlPath string func main() { corePath, err := filepath.Abs(".") if err != nil { log.Fatal(err) } ioctlPath = filepath.Join(cor...
package token import ( "crypto/rsa" "crypto/x509" "encoding/pem" "errors" "fmt" "io/ioutil" "github.com/Azure/go-autorest/autorest/adal" "golang.org/x/crypto/pkcs12" ) //pem block types const ( certificate = "CERTIFICATE" privateKey = "PRIVATE KEY" ) const ( defaultEnvironment = "AzurePublicCloud" ) ty...
package openehr import ( "crypto/tls" "encoding/base64" "encoding/json" "fmt" "io/ioutil" "log" "net/http" "errors" "bytes" "github.com/FiviumAustralia/RNSH-Pilot-Server-Go/models" ) type OpenEHRManager struct { BaseUrl string SubjectNamespace string Username string Password ...
// Copyright 2012-present <NAME>. All rights reserved. // Use of this source code is governed by a MIT-license. // See http://olivere.mit-license.org/license.txt for details. package elastic import ( "context" "fmt" "net/http" "net/url" "strings" "github.com/olivere/elastic/uritemplates" ) // IndicesGetTempla...
// Package slowpoke implements a low-level key/value store in pure Go. // Keys stored in memory, Value stored on disk package slowpoke import ( "bytes" "encoding/binary" "encoding/gob" "reflect" "github.com/recoilme/pudge" ) // Set store val and key with sync at end // File - may be existing file or new // If p...
/* 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, ...