text
stringlengths
3.08k
10.4k
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. // package aws import ( "fmt" "github.com/mattermost/mattermost-cloud/model" "github.com/pkg/errors" log "github.com/sirupsen/logrus" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/...
package encoding import ( "fmt" "strings" "unicode" "unicode/utf8" ) var replace = map[rune]string{ '\x00': "zero", '\\': "backslash", '/': "slash", ':': "colon", '*': "asterisk", '?': "questionmark", '"': "doublequote", '<': "lessthan", '>': "greaterthan", '|': "verticalbar", ...
package blackbox import ( "context" "fmt" "time" "github.com/cloudfoundry/metric-store-release/src/internal/metrics" "github.com/cloudfoundry/metric-store-release/src/pkg/logger" "github.com/cloudfoundry/metric-store-release/src/pkg/ingressclient" "github.com/cloudfoundry/metric-store-release/src/pkg/rpc" "gi...
package op_proposer import ( "context" "fmt" "os" "os/signal" "syscall" "time" "github.com/ethereum-optimism/optimism/op-proposer/drivers/l2output" "github.com/ethereum-optimism/optimism/op-proposer/rollupclient" "github.com/ethereum-optimism/optimism/op-proposer/txmgr" "github.com/ethereum/go-ethereum/acco...
package squirrel import ( "time" "github.com/lindsaygelle/nook" "github.com/lindsaygelle/nook/animal" "github.com/lindsaygelle/nook/character" "github.com/lindsaygelle/nook/gender" "github.com/lindsaygelle/nook/personality" "golang.org/x/text/language" ) var ( vicheBirthday = nook.Birthday{ Day: 7, Mon...
package commands import ( "bytes" "context" "fmt" "io/ioutil" "os" "path/filepath" "github.com/crossplane/oam-kubernetes-runtime/apis/core/v1alpha2" "github.com/ghodss/yaml" "github.com/kyokomi/emoji" "github.com/spf13/cobra" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/a...
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** package sakuracloud import ( "context" "reflect" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Get information about an existing ESME. // /...
/* (c) 2019, Blender Foundation * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * ...
// 连接器。用于发起 TCP 连接到 Server 端 // todo 此类的线程安全需要再次检查一次 package easygo import ( "fmt" "github.com/gorilla/websocket" "math" "net/url" "sync" "time" "github.com/astaxie/beego/logs" ) //var MIN_DELAY, MAX_DELAY time.Duration = 50 * time.Millisecond, 3 * time.Second type IWebConnector interface { CreateEndpoint()...
/** * Copyright 2019 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 api import ( "errors" "fmt" "policy-server/store" "sort" "strings" "code.cloudfoundry.org/cf-networking-helpers/httperror" ) //go:generate counterfeiter -o fakes/egress_destination_store.go --fake-name EgressDestinationStore . EgressDestinationStore type EgressDestinationStore interface { GetByGUID(gu...
package pircl // https://www.khronos.org/files/opencl-quick-reference-card.pdf // db: shard ([bucket0, bucket1, ...]) where each bucket is bucketSize bytes // reqs: batch of request vectors ([req0, req1, ...]) where each req is reqLength bytes // output: batch of responses ([resp0, resp1, ...]) where each resp is buc...
package main import ( "bufio" "bytes" "encoding/json" "errors" "flag" "fmt" "io" "log" "os" "os/exec" "os/signal" "strconv" "strings" "syscall" "time" "github.com/uluyol/heyp-agents/go/cmd/graceful-stop/pidfiles" "github.com/uluyol/heyp-agents/go/stats" ) func main() { var ( localAddr = flag...
package bam import ( "bytes" "log" "strconv" "strings" "github.com/edotau/goFish/code" "github.com/edotau/goFish/simpleio" ) type Sam struct { QName string Flag uint16 RName string Pos int MapQ uint8 Cigar Cigar MateRef string MatePos int TmpLen int Seq []code.Dna Qual PhredQ...
// Copyright 2020 PingCAP, Inc. // Modifications copyright (C) 2021 MatrixOrigin. // // 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 // /...
package amipublisher import ( "github.com/Cloud-Foundations/Dominator/lib/awsutil" "github.com/Cloud-Foundations/Dominator/lib/format" "github.com/Cloud-Foundations/Dominator/lib/log" libtags "github.com/Cloud-Foundations/Dominator/lib/tags" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2"...
package proxy import ( "io" "net/http" "strconv" "sync" "time" "github.com/docker/distribution" "github.com/docker/distribution/context" "github.com/docker/distribution/digest" "github.com/docker/distribution/registry/proxy/scheduler" ) // todo(richardscothern): from cache control header or config file cons...
// Copyright 2013 tsuru authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package app import ( "bytes" "crypto/rand" "fmt" "github.com/globocom/config" "io" "launchpad.net/goamz/aws" "launchpad.net/goamz/iam" "launchpad.net/go...
package record import ( "bytes" ) // archivedStatesMaxLength describes how many previous session // states we should keep track of. const archivedStatesMaxLength int = 40 // SessionSerializer is an interface for serializing and deserializing // a Signal Session into bytes. An implementation of this interface should...
package mgmt_test import ( "fmt" "net/http" "testing" "github.com/nkcraddock/webhooker/db" "github.com/nkcraddock/webhooker/mgmt" "github.com/nkcraddock/webhooker/testhelp" "github.com/nkcraddock/webhooker/webhooks" "gopkg.in/redis.v3" "github.com/gorilla/mux" . "github.com/onsi/ginkgo" . "github.com/onsi...
package primeproofs import "github.com/privacybydesign/keyproof/common" import "github.com/privacybydesign/gabi/big" import "strings" type expStepAStructure struct { bitname string prename string postname string myname string bitRep RepresentationProofStructure equalityRep RepresentationPro...
package msgplens import ( "bytes" "encoding/json" "fmt" "math" "sort" "strings" ) // UnmarshalJSON unmarshals a lossy JSON representation of a msgpack object // into a Node. func UnmarshalJSON(b []byte, extra bool) (Node, error) { var intf interface{} decoder := json.NewDecoder(bytes.NewReader(b)) decoder.Us...
package api import ( "bytes" "context" "fmt" "net/http" "sort" "strings" "github.com/ovh/cds/engine/api/event" "github.com/ovh/cds/engine/api/mail" "github.com/ovh/cds/engine/api/objectstore" "github.com/ovh/cds/engine/api/repositoriesmanager" "github.com/ovh/cds/engine/api/scheduler" "github.com/ovh/cds/...
package log import ( "strings" "time" errors "golang.org/x/xerrors" ) // Event represent a K3 runtime event. type Event struct { Category fields []string } // NewEvent parses string s and returns an event. If the string could not be // parsed sucessfully, NewEvent will return an error func NewEvent(s string) (...
// Package duration provides a partial implementation of ISO8601 durations. (no months) package duration import ( "bytes" "errors" "fmt" "math" "regexp" "strconv" "text/template" "time" ) var ( // ErrBadFormat is returned when parsing fails ErrBadFormat = errors.New("bad format string") ErrWeeksNotWithYea...
// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in wr...
package dataset_sql import ( "fmt" "github.com/qri-io/dataset/datatypes" q "github.com/qri-io/dataset_sql/vt/proto/query" ) type AggFunc interface { Eval() (q.Type, []byte, error) Value() []byte } // AggregateFuncs extracts a slice of any aggregate functions from an AST, while also writing // pointers to newly...
/* Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Copyright 2014 <NAME> <<EMAIL>> // 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 // // Unles...
/* * Copyright (C) 2018 Dolan and Contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law...
/* // Copyright 2015 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library 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 L...
// 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. // +build tamago,arm package runtime import ( "unsafe" ) const _PAGESIZE uintptr = 0x1000 // the following variables must be provided externally var ramSta...
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package stack import ( "fmt" "github.com/oam-dev/oam-go-sdk/apis/core.oam.dev/v1alpha1" ) var templateFunctions = map[string]interface{}{ "ResolveParameterValue": resolveOAMParameterValue, "ResolveT...
// Copyright © 2018 <NAME> <<EMAIL>> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish...
package utils import ( "bytes" "strings" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/tendermint/tendermint/libs/log" ) const defaultDelimiter = "_" // Key represents a store key to interact with the KVStore typ...
package main import ( "fmt" "io" "net/http" "os" "github.com/cfunkhouser/pijector" "github.com/cfunkhouser/pijector/admin" "github.com/cfunkhouser/pijector/api" "github.com/gorilla/mux" "github.com/sirupsen/logrus" "github.com/urfave/cli/v2" ) var ( commonFlags = []cli.Flag{ &cli.StringSliceFlag{ Nam...
package base import ( "fmt" "sync/atomic" "time" log "github.com/sirupsen/logrus" "github.com/skeletongo/cube/container/queue" "github.com/skeletongo/cube/tools" ) // Object 基础节点,单线程模型 // 包含一个消息队列及定时器,在单线程中串行处理消息队列中的所有消息及定时任务 // 优先处理队列消息,队列消息处理后查看定时任务是否需要执行 // 注意此线程中执行的方法不应该是耗时操作,否则整个线程会被阻塞 type Object struct...
package compiler import ( "fmt" "sort" "github.com/gomponents/gontainer-helpers/container" "github.com/gomponents/gontainer/internal/pkg/arguments" "github.com/gomponents/gontainer/internal/pkg/dto/compiled" "github.com/gomponents/gontainer/internal/pkg/dto/input" "github.com/gomponents/gontainer/internal/pkg/...
/* Copyright 2021 The Stroppy Authors. All rights reserved * * Use of this source code is governed by the 2-Clause BSD License * * that can be found in the LICENSE file. */ package deployment import ( "bufio" "os" engineSsh "gitlab.com/picodata/stroppy/pkg/engine/ssh" "gitlab....
package main import ( "context" "encoding/json" "flag" "fmt" "math" "multipull/internal" "strings" "sync" "github.com/docker/docker/api/types" "github.com/docker/docker/client" "github.com/neflyte/configmap" "github.com/neflyte/uiprogress" "github.com/panjf2000/ants/v2" ) const ( oneHundred = 10...
/* Copyright © 2020-2021 <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 writing, software d...
//go:generate mockgen -destination=mocks/mocks.go -package=mocks . FactoryImageFlasher,PlatformToolsFlasher,ADBFlasher,FastbootFlasher package flash import ( "errors" "fmt" "github.com/sirupsen/logrus" "github.com/aospalliance/device-flasher/internal/color" "github.com/aospalliance/device-flasher/internal/device"...
package erpc import ( "errors" "fmt" "io" "io/ioutil" "net/http" "net/url" "sync" "time" "github.com/EAHITechnology/raptor/balancer" "github.com/EAHITechnology/raptor/utils" "golang.org/x/net/context" ) var HttpManager *HttpClientManager var ( ErrBalancerNil = errors.New("balancer nil") ErrSer...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package connect import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" "github.com/aws/aws-sdk-go-v2/private/protocol" ) type UpdateContactAttributesInput struct { _ struct{} `type:"structure"` ...
/* * Copyright 2018-present Open Networking Foundation * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law ...
// // Copyright (C) 2012-2018, <NAME> <<EMAIL>>, all rights reserverd. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // package smart import ( json_enc "encoding/json" "strings" "io" ) type JSON struct { Value } func (p *JSON) Strin...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. package cmd import ( "encoding/json" "fmt" "os" "path/filepath" "strings" "github.com/Azure/azure-sdk-for-go/tools/apidiff/exports" "github.com/Azure/azu...
package job import ( "bytes" "fmt" "text/template" "github.com/bakito/batch-job-controller/pkg/config" "github.com/bakito/batch-job-controller/pkg/controller" "github.com/bakito/batch-job-controller/pkg/http" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/r...
/* Client information module. A set of functions to retrieve information about the client connecting to Kong in the context of a given request. */ package client import ( "fmt" "github.com/Kong/go-pdk/server/kong_plugin_protocol" "github.com/Kong/go-pdk/bridge" "github.com/Kong/go-pdk/entities" ) // Holds this...
package profiler import ( "fmt" "sync" "time" ) const ( defaultSinkBufferSize = 100 numCalibrationCalls = 10000000 ) var ( // A mutex for protecting access to the activeProfiles map. profileMutex sync.Mutex // A label to be applied to generated profiles. profileLabel string // We maintain a dedicated c...
package storage import ( "encoding/json" "strings" "time" ) // TODO(damnever): // - Store tunnel stats in other place const ( timeFormat = "15:04:05 01/02/2006" ) type User struct { ID int `json:"id" db:"id"` Name string `json:"name" db:"name"` Password string `json:"password" db:"...
package main import ( "bufio" "fmt" "io" "io/ioutil" "log" "os" "path/filepath" ) func main() { var dir string if len(os.Args) < 2 { td, err := os.Getwd() if err != nil { fmt.Println("Could not get current working directory") } dir = td } else { dir = os.Args[1] } searcher := NewResSearcher...
// Copyright © 2018 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/licenses/LICENSE-2.0 // // Unless required by applicable law or agree...
package storage import ( "encoding/json" "github.com/MerlinDMC/dsapid" "io/ioutil" "os" ) type UserStorage interface { Save() error Add(string, *dsapid.UserResource) Update(string, *dsapid.UserResource) Delete(string) EnsureExists(string, string) *dsapid.UserResource Get(string) *dsapid.UserResource GetOK(...
package pongo2 import ( "context" "encoding/json" "errors" "fmt" "strings" "time" "github.com/digimakergo/digimaker/core/contenttype" "github.com/digimakergo/digimaker/core/db" "github.com/digimakergo/digimaker/core/query" "github.com/digimakergo/digimaker/core/util" "github.com/digimakergo/digimaker/sitek...
package ews import ( "encoding/xml" "errors" "time" ) type AttendeeType string const ( AttendeeTypeOrganizer AttendeeType = "Organizer" AttendeeTypeRequired AttendeeType = "Required" AttendeeTypeOptional AttendeeType = "Optional" AttendeeTypeRoom AttendeeType = "Room" AttendeeTypeResource AttendeeTyp...
// Copyright 2020 Tetrate // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writ...
package expreduce import ( "math/big" "github.com/corywalker/expreduce/expreduce/atoms" "github.com/corywalker/expreduce/pkg/expreduceapi" ) // Used for the IntegerPartitions builtin func genIntegerPartitions(n int, k int, startAt int, prefix []int, parts *[][]int) { if len(prefix)+1 > k { return } prefix = ...
package proxy import ( "fmt" "net/http" "net/http/httputil" "net/url" "strings" "github.com/hellofresh/janus/pkg/router" "github.com/pkg/errors" log "github.com/sirupsen/logrus" ) const ( methodAll = "ALL" ) // Register handles the register of proxies into the chosen router. // It also handles the conversi...
/* * Copyright 2018 The Polycube 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 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 arc import ( "context" "image/color" "time" "chromiumos/tast/ctxutil" "chromiumos/tast/local/android/ui" "chromiumos/tast/local/arc" "...
package argparser import ( "fmt" "strconv" ) type Value interface { Set(...string) error Get() interface{} String() string } // NewValue checks v's type and returns a compatible type which also // implements ArgValue interface. All supported types are pointer to some type. // It returns error if v is of unknown...
package myanmartools import ( "bufio" "fmt" "math" ) const ( //ModelBinaryTag Magic number used to identify this object in byte streams. (Reads in ASCII as "UZMODEL") ModelBinaryTag = 0x555A4D4F44454C20 //StdCp0 Standard Myanmar code point range before digits StdCp0 int = '\u1000' //StdCp1 Standard Myanmar co...
package mail import ( "fmt" "html/template" "net/http" "strings" "time" ) // Attachment is attachment for message send via smtp server type Attachment struct { Name string `json:"name"` Kind string `json:"kind"` Content []byte `json:"content"` } // Message is message send via smtp server type Message s...
package main import ( "context" "flag" "log" "math/rand" "net" "os" "os/signal" "sort" "strconv" "strings" "syscall" "time" r53 "github.com/jlandowner/kubernetes-route53-sync/pkg/route53" core_v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/informers" "k8s.io/client-go/kub...
package rightsizing import ( "fmt" "io" "os" "github.com/adeturner/azureBilling/config" "github.com/adeturner/azureBilling/observability" "github.com/adeturner/azureBilling/utils" ) type vmRawOutputMap struct { vmMap map[string]*vmRawOutput } func NewVmRawOutputMap(details *vmDetails, dayResourceMap *vmDayRe...
package main import ( "bufio" "context" "encoding/json" "fmt" "io" "os" "os/signal" "time" "google.golang.org/grpc" "google.golang.org/grpc/credentials" "google.golang.org/grpc/testdata" "github.com/Arvinderpal/embd-project/common/controllerapi" "github.com/Arvinderpal/embd-project/common/message" "git...
package envdb import ( "errors" "fmt" "net/http" "strings" "sync" "github.com/elazarl/go-bindata-assetfs" "github.com/gorilla/context" "github.com/gorilla/mux" "github.com/gorilla/securecookie" "github.com/gorilla/sessions" "github.com/mephux/gotalk" ) var ( Clients = make(map[*gotalk.Sock]int) socksmu ...
// Code generated by go-swagger; DO NOT EDIT. package billing // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "net/http" "time" "golang.org/x/net/context" "github.com/go-openapi/errors" "github.com/go-openapi/runtime...
/** * Copyright 2014 @ ops Inc. * name : * author : jarryliu * date : 2013-12-09 10:12 * description : * history : */ package member import ( "errors" "go2o/src/core/domain/interface/member" "go2o/src/core/infrastructure/domain" "time" ) var _ member.IMember = new(Member) type Member struct { value *...
package components import ( "fmt" "sigs.k8s.io/yaml" "yunion.io/x/jsonutils" "yunion.io/x/log" "yunion.io/x/onecloud/pkg/httperrors" "yunion.io/x/kubecomps/pkg/kubeserver/api" ) type Image struct { Repository string `json:"repository"` Tag string `json:"tag"` } type PromTLSProxy struct { Enabled b...
/* Copyright 2016 Padduck, 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 required by applicable law or agreed to in writing, software...
package nzgo import ( "fmt" "io" "io/ioutil" "log" "os" "runtime" "strings" "time" ) var ( Debug *log.Logger Info *log.Logger Fatal *log.Logger ) /*Valid log levels : DEBUG, INFO, FATAL, OFF*/ type NZLogger struct { LogLevel string LogPath string AdditionalLogFile string } var elog...
package processors import ( "fmt" "github.com/emqx/kuiper/common" "github.com/emqx/kuiper/xstream/api" "testing" "time" ) type ruleCheckpointTest struct { ruleTest pauseSize int // Stop stream after sending pauseSize source to test checkpoint resume cc int // c...
package config import ( "bytes" "encoding/json" "fmt" "github.com/9seconds/mtg/v2/mtglib" "github.com/pelletier/go-toml" ) type Config struct { Debug bool `json:"debug"` Secret mtglib.Secret `json:"secret"` BindTo TypeHostPort `json:"bindTo"` TCPBuffer ...
package cmd import ( "fmt" "os" "strings" "github.com/mitchellh/cli" ) const HookbookScript = ` # Hookbook (https://github.com/Shopify/hookbook) # # Copyright 2019 Shopify Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (...
// Package arping is a native go library to ping a host per arp datagram, or query a host mac address // // The currently supported platforms are: Linux and BSD. // // // The library requires raw socket access. So it must run as root, or with appropriate capabilities under linux: // `sudo setcap cap_net_raw+ep <BIN>`. ...
// Copyright 2016 The Cockroach 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...
// Code generated by go-swagger; DO NOT EDIT. package subtenant_custom_groups // 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" ...
// Copyright 2021 <NAME> <<EMAIL>> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed t...
package commands import ( "fmt" "sort" "strconv" "strings" "time" "github.com/andersfylling/disgord" "github.com/pazuzu156/atlas" "github.com/pazuzu156/lastfm-go" "github.com/pazuzu156/persephone/lib" ) // Whoknows command. type Whoknows struct{ Command } // InitWhoknows initialized the whoknows command. f...
// Copyright 2013-Present Couchbase, Inc. // // Use of this software is governed by the Business Source License included in // the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that // file, in accordance with the Business Source License, use of this software // will be governed by the Apache Lic...
// 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 ...
package main import ( "bufio" "fmt" "math" "os" ) func readInt(bytes []byte, from int, val *int) int { i := from sign := 1 if bytes[i] == '-' { sign = -1 i++ } tmp := 0 for i < len(bytes) && bytes[i] != ' ' { tmp = tmp*10 + int(bytes[i]-'0') i++ } *val = tmp * sign return i } func readNum(scanne...
// DNS proxy server. package daprdockr import ( "errors" "github.com/miekg/dns" "log" "net" "strconv" "strings" "time" ) const ( debugDnsServer = false compressDnsResponses = false ContainerDomainSuffix = "container" ContainerDomainSuffixLen = len(ContainerDomainSuffix) + 2 ) // Start a D...
package script import ( "io/ioutil" "path/filepath" "strings" "github.com/sirupsen/logrus" "gopkg.in/yaml.v3" "github.com/Foxcapades/Go-ChainRequest/simple" "github.com/Foxcapades/lib-go-raml/v0/pkg/raml" "github.com/Foxcapades/lib-go-raml/v0/pkg/raml/rbuild" ) const ( headerPrefix = "#%RAML 1.0 " ) const...
package main import ( "math/rand" "regexp" "time" "github.com/gorilla/mux" "github.com/mattermost/mattermost-server/model" "github.com/mattermost/mattermost-server/plugin" ) // RollyPlugin instance. type RollyPlugin struct { plugin.MattermostPlugin // URL router/dispatcher. router *mux.Router // Is this ...
// Copyright (c) 2017 Couchbase, 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...
package receiver import ( "bufio" "encoding/binary" "fmt" "io" "net" "strings" "sync/atomic" "time" "github.com/lomik/go-carbon/points" "github.com/Sirupsen/logrus" ) // TCP receive metrics from TCP connections type TCP struct { out chan *points.Points exit chan bool graphPrefix ...
package clog import ( "bytes" "encoding/json" "errors" "fmt" "io" "io/ioutil" "net/http" "strings" "time" ) type ( discordEmbed struct { Title string `json:"title"` Description string `json:"description"` Timestamp string `json:"timestamp"` Color int `json:"color"` } discordPaylo...
package main import ( "errors" "fmt" "io/ioutil" "log" "net/http" "os" "sort" "strings" "time" "gopkg.in/jcmturner/gokrb5.v7/client" "gopkg.in/jcmturner/gokrb5.v7/config" "gopkg.in/jcmturner/gokrb5.v7/credentials" ) // helper functions for handlers module // // Copyright (c) 2019 - <NAME> <<EMAIL>> // /...
package timetype import ( "database/sql/driver" "encoding/json" "errors" "fmt" "time" ) // Parsing errors var ( ErrInvalidClock = errors.New("timetype: invalid clock") ErrInvalidDuration = errors.New("timetype: invalid duration") ) // Templates to parse clocks const ( ISO8601Clock = "15:04:05" ISO86...
/* 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, ...
package ota import ( "encoding/json" "fmt" bugsnagErrors "github.com/bugsnag/bugsnag-go/errors" "github.com/superscale/spire/devices" "github.com/superscale/spire/mqtt" ) type states int const ( // Default ... Default states = iota // Downloading ... Downloading // Upgrading ... Upgrading // Error ... ...
// Copyright (c) 2018 The MATRIX Authors // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php package vm import ( "math/big" "github.com/MatrixAINetwork/go-matrix/common" "github.com/MatrixAINetwork/go-matrix/core/types" ) //Sta...
package join import ( "bufio" "bytes" _ "fmt" "github.com/guonaihong/coreutils/utils" "github.com/guonaihong/flag" "io" ) var lineDelim byte = '\n' func delEndLineDelim(l *[]byte) { if len(*l) > 0 && (*l)[len(*l)-1] == lineDelim { *l = (*l)[:len(*l)-1] } } type joinCmd struct { key1 *int key2...
package scheduler import ( "fmt" "sync" "time" "lua_helper" log "github.com/cihub/seelog" ) type scheduler struct { name string tableScheduler string // Scheduler 配置表名 columnId string // ScheduleID 列 columnJobName string // Job名称列 columnPattern string // 时间模式...
// *** 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 v20161001 import ( "context" "reflect" "github.com/pkg/errors" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) type FileShare struct { pulumi.CustomRe...
// Code generated by "enumer -type=ACL -json -transform=snake"; DO NOT EDIT. package acl import ( "encoding/json" "fmt" ) const _ACLName = "catbulkclustersearchremotecreatecountscriptsdeletedocsourcefield_capscloseanalyzeexistsgettemplateexplainindicesaliasaliasesdelete_by_querycacheindexmappingflushforcemergeupgr...
/* 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...