text
stringlengths
3.08k
10.4k
/* * Tencent is pleased to support the open source community by making Blueking Container Service available. * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. * Licensed under the MIT License (the "License"); you may not use this file except * in compliance with the License. You may obta...
package p2p import ( "fmt" "net" "strconv" "time" . "github.com/tendermint/go-common" "github.com/tendermint/go-p2p/upnp" ) type Listener interface { Connections() <-chan net.Conn InternalAddress() *NetAddress ExternalAddress() *NetAddress String() string Stop() bool } // Implements Listener type Default...
package sshcrypt import ( "bytes" "encoding/base64" "encoding/binary" "encoding/pem" "errors" "fmt" "golang.org/x/crypto/ssh" ) type PrivateKey interface { Type() string DecryptBytes(ciphertext []byte) ([]byte, error) } type PublicKey interface { Type() string EncryptBytes(ciphertext []byte) ([]byte, err...
/* * * Copyright 2017 gRPC 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 core import ( "context" "strings" "github.com/spf13/cobra" ) func init() { // we disable cobra command sorting to position important commands at the top when looking at the usage. cobra.EnableCommandSorting = false } // cobraBuilder will transform a []*Command to a valid Cobra root command. // Cobra ro...
package handler import ( "bufio" "context" "encoding/json" "os/exec" "os/user" "runtime" "strconv" "strings" "sync" "time" "github.com/Donders-Institute/filer-gateway/internal/api-server/config" "github.com/Donders-Institute/filer-gateway/internal/task" "github.com/Donders-Institute/filer-gateway/pkg/swa...
package main import ( "bufio" "fmt" "os" "time" ) type packet struct { Version int Id int Num int } type BitStream struct { shift int buffer []byte } func (bs *BitStream) Skip() int { if bs.shift > 0 { fmt.Println("skip", 4-bs.shift) bs.shift = 0 bs.buffer = bs.buffer[1:] return 4 - bs.s...
package main import ( "flag" "fmt" "html/template" "io" "net/http" "net/url" "path/filepath" log "github.com/sirupsen/logrus" ) func main() { cFilePtr := flag.String("conf", "config.json", "Seadistusfaili asukoht") flag.Parse() // Loe seadistus sisse. conf = loadConf(*cFilePtr) log.Infoln("* Klientrak...
package atsserver /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the ...
package schema import ( "strings" "time" ) // Menu 菜单对象 type Menu struct { RecordID string `json:"record_id" swaggo:"false,记录ID"` Name string `json:"name" binding:"required" swaggo:"true,菜单名称"` Sequence int `json:"sequence" swaggo:"false,排序值"` Icon string `json:"ic...
package main import ( "bytes" "log" "net" "time" ) type requestConn struct { conn net.PacketConn addr net.Addr } func (conn *requestConn) Close() error { return conn.conn.Close() } func (conn *requestConn) sendReadRequest(filename, mode string, options map[string]string) { conn.sendRWRequest(opRead, filenam...
// Copyright 2019 The Kubernetes Authors. // SPDX-License-Identifier: Apache-2.0 package build import ( "io" "log" "path/filepath" "strings" "github.com/pkg/errors" "github.com/spf13/cobra" "sigs.k8s.io/kustomize/api/filesys" "sigs.k8s.io/kustomize/api/konfig" "sigs.k8s.io/kustomize/api/krusty" "sigs.k8s.i...
/* * Copyright 2018 <NAME>, 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...
package main import ( "context" "encoding/json" "fmt" "io/ioutil" "net/http" "strings" "time" "github.com/google/go-github/v32/github" "github.com/palantir/go-githubapp/githubapp" "github.com/pkg/errors" "github.com/rs/zerolog" ) // Structs type PRCreateHandler struct { githubapp.ClientCreator preamble ...
/* * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) 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 * * ...
package grpcapi import ( "github.com/golang/protobuf/ptypes/empty" "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/codes" app "github.com/LeKovr/metricinc/counter" "github.com/LeKovr/metricinc/counter/setup" "github.com/LeKovr/metricinc/lib/iface/kvstore" "github.com/LeKovr/metrici...
package sql_job_dispatcher import ( "encoding/json" "errors" "github.com/SbstnErhrdt/go-job-dispatcher/connections" "github.com/SbstnErhrdt/go-job-dispatcher/pkg/job_dispatcher" "github.com/google/uuid" "gorm.io/gorm" "os" ) type SqlService struct{} func (m *SqlService) New(job *job_dispatcher.Job) (err error...
/* * @file * @copyright defined in aergo/LICENSE.txt */ package client import ( "github.com/aergoio/aergo/polaris/common" "testing" "github.com/aergoio/aergo/config" "github.com/aergoio/aergo/p2p/p2pcommon" "github.com/aergoio/aergo/p2p/p2pmock" "github.com/aergoio/aergo/pkg/component" "github.com/aergoio/...
// CookieJar - A contestant's algorithm toolbox // Copyright 2014 <NAME>. All rights reserved. // // CookieJar is dual licensed: use of this source code is governed by a BSD // license that can be found in the LICENSE file. Alternatively, the CookieJar // toolbox may be used in accordance with the terms and conditions ...
package blog import ( "encoding/json" "strings" "github.com/btnguyen2k/consu/reddo" "github.com/btnguyen2k/henge" "main/src/gvabe/bov2/user" "main/src/utils" ) // NewBlogVote is helper function to create new BlogVote bo. // // Available since template-v0.2.0 func NewBlogVote(appVersion uint64, owner *user.Use...
package portier import ( "fmt" "net/http" "net/url" "time" "github.com/lestrrat-go/jwx/jwk" "github.com/lestrrat-go/jwx/jwt" ) // Valid Config.ResponseMode values. const ( ResponseModeFormPost = "form_post" ResponseModeFragment = "fragment" ) // Defaults for Config fields. const ( DefaultBroker = "ht...
package publisher import ( "compress/gzip" "encoding/json" "fmt" "io" "math/rand" "os" "time" "github.com/Sirupsen/logrus" dynsampler "github.com/honeycombio/dynsampler-go" "github.com/honeycombio/honeyaws/options" "github.com/honeycombio/honeyaws/sampler" "github.com/honeycombio/honeyaws/state" "github....
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package cli import ( "fmt" "io" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ssm" "github.com/aws/copilot-cli/internal/pkg/aws/identity" "github.com/aws/copilot-cli/internal/pkg/aw...
package main import ( "fmt" "github.com/tidwall/gjson" ffmpeg "github.com/u2takey/ffmpeg-go" "log" "math/rand" "net" "os" "path" "regexp" "strconv" "strings" "sync" "time" ) // ExampleShowProgress is an example of using the ffmpeg `-progress` option with a // unix-domain socket to report progress func...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: greeter.proto /* Package greeter is a generated protocol buffer package. It is generated from these files: greeter.proto It has these top-level messages: Request Response */ package greeter import proto "github.com/golang/protobuf/proto" import fmt "fmt...
/*---------------------------------------------------------------- * Copyright (c) ThoughtWorks, Inc. * Licensed under the Apache License, Version 2.0 * See LICENSE in the project root for license information. *----------------------------------------------------------------*/ package parser import ( "fmt" ...
package checker func Mp4(file string) (bool, error) { buf, err := getBytes(file, 0, 12) if err != nil { return false, err } return len(buf) > 11 && (buf[4] == 'f' && buf[5] == 't' && buf[6] == 'y' && buf[7] == 'p') && ((buf[8] == 'a' && buf[9] == 'v' && buf[10] == 'c' && buf[11] == '1') || (buf[8] == 'd' ...
package main import ( "fmt" "go/token" "strconv" "github.com/Deiz/tracegen" "github.com/dave/dst" "github.com/dave/dst/decorator" "github.com/dave/dst/decorator/resolver" ) var ( hints = map[string]string{ "github.com/opentracing/opentracing-go": "opentracing", } ) func getResolver(pkg *decorator.Package...
// Copyright 2021 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...
// Copyright 2018 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 License...
package requests import ( "net/http" "strconv" "strings" "time" "golang.org/x/net/http/httpguts" ) // Response is a return carry information for HTTP requests. type Response struct { stdResponse *http.Response Error error HTTP11 bool ContentType string Status string // e.g. "200 O...
package ipfs_core import ( "context" "sort" "github.com/ipfs/go-ipfs/commands" "github.com/ipfs/go-ipfs/core" "github.com/ipfs/go-ipfs/namesys" "github.com/ipfs/go-ipfs/repo/config" "github.com/ipfs/go-ipfs/repo/fsrepo" "github.com/ipfs/go-ipfs/thirdparty/ds-help" "github.com/op/go-logging" namepb "github....
package anomalyfinder // Copyright (c) Microsoft and contributors. 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 // ...
// Code generated by go-swagger; DO NOT EDIT. package manifests // 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 "github.co...
// Copyright 2016 Google, 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 i...
// Code generated by go-swagger; DO NOT EDIT. package models // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "encoding/json" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-opena...
// Copyright (c) 2015-2021 MinIO, Inc. // // This file is part of MinIO Object Storage stack // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (...
package main import ( "context" "github.com/go-redis/redis/v8" neoRpc "github.com/joeqian10/neo3-gogogo/rpc" "github.com/robfig/cron" "github.com/rs/cors" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/options" "gopkg.in/yaml.v2" "neo3fura_http/biz/api" "neo3fura_http/biz/job" "neo3f...
package helpers import ( "encoding/json" "fmt" "html/template" "strings" "time" "github.com/APTrust/registry/common" "github.com/APTrust/registry/constants" "github.com/APTrust/registry/pgmodels" ) // https://curtisvermeeren.github.io/2017/09/14/Golang-Templates-Cheatsheet // -------------------------------...
// Code generated by go-swagger; DO NOT EDIT. package operations // 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 "github.c...
/* Copyright hechain. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package tests import ( "fmt" "testing" "github.com/hechain20/hechain/common/ledger/testutil" "github.com/hechain20/hechain/core/chaincode/implicitcollection" "github.com/hechain20/hechain/core/ledger/kvledger" "github.com/stretc...
package errorpages import ( "bufio" "bytes" "errors" "fmt" "net" "net/http" "net/url" "strconv" "strings" "github.com/containous/traefik/log" "github.com/containous/traefik/middlewares" "github.com/containous/traefik/types" "github.com/vulcand/oxy/forward" "github.com/vulcand/oxy/utils" ) // Compile ti...
/** * Copyright 2016 IBM Corp. * * 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 command import ( "encoding/hex" "encoding/json" "fmt" "os" "runtime" "time" "github.com/pbergman/app" "github.com/pbergman/graylog-proxy/net" "github.com/spf13/pflag" ) func NewDebugClientCommand() app.CommandInterface { return &DebugClientCommand{ create: create{ app.Command{ Flags: new(p...
// Code generated by azure-service-operator-codegen. DO NOT EDIT. // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. package v1beta20210601 import ( "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" ) type Profiles_SpecARM ...
package main import ( "encoding/json" "fmt" "io" "net/http" "os" "path" ) type githubReleaseAsset struct { URL string `json:"url"` ID int `json:"id"` Name string `json:"name"` Label string `json:"label"` ContentType string `json:"content_t...
/** * Created by GoLand. * User: <EMAIL> * Date: 2018-12-20 * Time: 23:24 */ package router import ( "github.com/gin-gonic/gin" "github.com/izghua/go-blog/common" "github.com/izghua/go-blog/conf" m2 "github.com/izghua/go-blog/middleware" "github.com/izghua/go-blog/router/auth" "github.com/izghua/go-blog/rou...
package job_controller import ( "strings" "github.com/alibaba/kubedl/pkg/gang_schedule" apiv1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" "github.com/alibaba/kubedl/pkg/metrics" log "github.com/sirupsen/logrus" k8serrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v...
// Copyright (C) 2017 NTT Innovation Institute, 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 applicabl...
package state import ( "bytes" "crypto/sha256" "encoding/binary" "encoding/json" "fmt" "strings" "github.com/AccumulateNetwork/accumulate/types" ) type KeyType byte const ( KeyTypeUnknown KeyType = iota KeyTypeSha256 KeyTypePublic KeyTypeSha256d KeyTypeChain ) func (kt KeyType) String() string { switc...
// Copyright 2020 IBM Corp. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in w...
package concept import ( "bytes" "context" "errors" "io/ioutil" "net/http" "net/http/httptest" "sync" "testing" "time" fthealth "github.com/Financial-Times/go-fthealth/v1_1" "github.com/stretchr/testify/assert" "github.com/Financial-Times/aggregate-concept-transformer/ontology" "github.com/Financial-Tim...
package proc_test import ( "context" "math/rand" "testing" "time" "github.com/ThreeDotsLabs/watermill/message" "github.com/gojuno/minimock" "github.com/insolar/insolar/insolar" "github.com/insolar/insolar/insolar/bus" "github.com/insolar/insolar/insolar/gen" "github.com/insolar/insolar/insolar/payload" "gi...
// Package yyflag implement flag.Getter interface for time.Time values, // allowing date/time to be entered as flags at command line. // yyflag allow all incomplete formats of package djadala/yy to be used. // // yyflag recognize following formats: // ['date'][#'time'][@'zone'] or ['date'][T'time'][@'zone'] // // 'da...
package types import "math" const ( CBNCXSingle byte = 15 // 0x0F CBNCXParent byte = 111 // 0x6F CBNCXChild byte = 31 // 0x1F CBSkeleton byte = 10 // 0x0A ) const INDXHeaderLength = 192 // 0xC0 type INDXHeader struct { INDX [4]byte HeaderLength uint32 Unknown1 [4]byte HeaderType...
/* Copyright (c) 2020 GMO GlobalSign, Inc. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://opensource.org/licenses/MIT Unless required by applicable law or agreed to in writing, software distributed under...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.23.0 // protoc v3.14.0 // source: size.proto package proto import ( proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoi...
package edward_test import ( "fmt" "io/ioutil" "log" "os" "os/exec" "path" "path/filepath" "strings" "testing" "github.com/theothertomelliott/gopsutil-nocgo/process" "github.com/yext/edward/edward" "github.com/yext/edward/home" "github.com/yext/edward/services" "github.com/yext/edward/services/backends/...
package boilingcore import ( "fmt" "github.com/R0bson/sqlboiler/drivers" "github.com/R0bson/sqlboiler/strmangle" ) // Aliases defines aliases for the generation run type Aliases struct { Tables map[string]TableAlias `toml:"tables,omitempty" json:"tables,omitempty"` } // TableAlias defines the spellings for a ta...
// Copyright (C) The Arvados Authors. All rights reserved. // // SPDX-License-Identifier: Apache-2.0 // To enable, add an entry in /etc/pam.d/common-auth where pam_unix.so // would normally be. Examples: // // auth [success=1 default=ignore] /usr/lib/pam_arvados.so zzzzz.arvadosapi.com vmhostname.example // auth [succ...
/* Copyright IBM Corp. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package csp import ( "crypto" "crypto/ecdsa" // "crypto/x509" "encoding/asn1" "encoding/pem" "io" "io/ioutil" "math/big" "os" "path/filepath" "strings" "github.com/pkg/errors" //todo:国密:sm2 "github.com/hyperledger/fabri...
// Copyright (C) 2019-2020 Zilliz. 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 l...
//go:generate mockgen -source handler.go -destination handler_mock_test.go -package email_test package email import ( "encoding/json" "fmt" "io/ioutil" "net/http" "os" "strconv" "strings" "time" "github.com/volam1999/gomail/internal/app/types" mail "github.com/volam1999/gomail/internal/pkg/email" "github....
package auth import ( "fmt" "strings" "github.com/jenkins-x/jx/pkg/util" "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" ) const ( // labelKind inidicates the kind of auth such as git labelKind = "jenkins.io/kind" // labelServi...
package api import ( "context" "encoding/json" "github.com/virtual-vgo/vvgo/pkg/discord" "github.com/virtual-vgo/vvgo/pkg/redis" "net/http" "sort" "strings" ) const season = "season2" var VotingView = ServeTemplate("voting.gohtml") var ArrangementsBallotApi = http.HandlerFunc(func(w http.ResponseWriter, r *h...
package main import ( "net/http" _ "net/http/pprof" "runtime" "io/ioutil" "fmt" "time" "os" "strings" vault_api "github.com/hashicorp/vault/api" "github.com/rs/zerolog" "github.com/rs/zerolog/log" kingpin "gopkg.in/alecthomas/kingpin.v2" ) var ( listenAddress = kingpin.Flag("web.listen-address", "Addr...
// Copyright 2020 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 // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in wr...
package web import ( "net/http" "net/http/pprof" "github.com/gorilla/mux" ) type route struct { path string methods string handler http.HandlerFunc needAuth bool // true by default shareable bool // false by default // openGraphSupported bool // false by default openGraphTitle string } func newR...
// Package snakecase - Super-Fast snake-case implementation. package snakecase const underscoreByte = '_' // Snakecase the given string. func Snakecase(s string) string { idx := 0 hasLower := false hasUnderscore := false lowercaseSinceUnderscore := false // loop through all good characters: // - lowercase // ...
// Copyright 2019 The LUCI Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
/* * Tencent is pleased to support the open source community by making TKEStack available. * * Copyright (C) 2012-2019 Tencent. 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 ...
package pig 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 ( trufflesBirthday = nook.Birthday{ Day: 28, Mont...
// 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 docen import ( "bufio" "fmt" "io" "io/fs" "io/ioutil" "os" "path/filepath" "regexp" "runtime" "strings" ) const ( defaultAppName = "app" defaultTagVersion = "alpine" ) var ( goModFile = "go.mod" vendorFolderName = "vendor" additionalFolders = map[string]bool{ "static": true, ...
package helputils import ( "fmt" "os" "os/signal" "path/filepath" "reflect" "runtime" "strings" "time" "encoding/json" "github.com/fatih/structs" "github.com/go-errors/errors" "github.com/kardianos/osext" ) func init() { StartupFolder() } // RangeInt returns slice of integers initialized with a range o...
package server import ( "bytes" "fmt" "regexp" "strconv" "time" "github.com/cnosdb/cnosdb/vend/common/pkg/toml" tls "github.com/cnosdb/cnosdb/pkg/tlsconfig" "github.com/pkg/errors" ) const ( // DefaultBindAddress is the default address to bind to. DefaultBindAddress = ":8086" // DefaultRealm is the defau...
// Copyright © 2018 NAME HERE <EMAIL ADDRESS> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law ...
package main import ( proto "bug-log/etcd/proto" "flag" "fmt" "math/rand" "net" "os" "os/signal" "strings" "syscall" "time" "go.etcd.io/etcd/clientv3" "golang.org/x/net/context" "google.golang.org/grpc" ) const schema = "ns" var ( Port = flag.Int("Port", 3000, "listening port") ...
package todoist type Store struct { CollaboratorStates []interface{} `json:"collaborator_states"` Collaborators []interface{} `json:"collaborators"` DayOrders interface{} `json:"day_orders"` DayOrdersTimestamp string `json:"day_orders_timestamp"` Filters []struct { Color in...
/* Copyright 2020 The OpenEBS Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, soft...
/** * Copyright (c) 2018, The Artemis Authors. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUT...
package agent import ( "bufio" "crypto/sha256" "encoding/base64" "encoding/json" "errors" "fmt" "io" "io/ioutil" "log" "net" "net/http" "os" "os/user" "strconv" "strings" "time" "github.com/jm33-m0/emp3r0r/core/internal/tun" "github.com/zcalusic/sysinfo" ) // is the agent alive? // connect to Socke...
package main import ( "context" "log" "net" "sort" "strconv" "strings" co "github.com/ThomasITU/MandatoryDisys01/course" "google.golang.org/grpc" ) const ( port = ":50051" ) type Course struct { ID string Workload int64 Rating int64 } var courses = []Course{ {ID: "0", Workload: 10, Rating: 80}...
package mockserver /* // Library headers #include <stdlib.h> #include <stdint.h> typedef int bool; #define true 1 #define false 0 typedef struct MessageHandle MessageHandle; struct MessageHandle { uintptr_t pact; uintptr_t message; }; /// Wraps a PactMessage model struct typedef struct MessagePactHandle MessagePa...
/* Copyright 2021 The OpenYurt Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, so...
// Code generated by smithy-go-codegen DO NOT EDIT. package types type ApplicationRestoreType string // Enum values for ApplicationRestoreType const ( ApplicationRestoreTypeSkipRestoreFromSnapshot ApplicationRestoreType = "SKIP_RESTORE_FROM_SNAPSHOT" ApplicationRestoreTypeRestoreFromLatestSnapshot ApplicationRes...
package mb_rtu_03h_decoder_resp import ( "net/source/userapi" "net/source/proto/trans/interfaces" "sync" "net/source/proto/binfiles" "net/source/proto/constant/modbus" "net/source/utils/bytes" "net/source/proto/pools" "testModbus/utils" "fmt" "net/source/proto/trans/errcode" "time" "net/source/proto/output...
package vk import ( "crypto/tls" "fmt" "net/http" "sync" "sync/atomic" "golang.org/x/crypto/acme/autocert" ) const defaultEnvPrefix = "VK" // Server represents a vektor API server type Server struct { router *Router lock sync.RWMutex started atomic.Value server *http.Server options *Options } // N...
// Copyright (c) 2019 Web 3 Foundation. All rights reserved. // Copyright (c) 2021 Oasis Labs 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: // // 1. Redistributions of source code must ...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package ecs 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/ecs-2014-11-13/DeregisterContainerInstanceRequest type DeregisterCont...
// Copyright 2020 H2O.ai, 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...
// SPDX-FileCopyrightText: Pachyderm, Inc. <<EMAIL>> // SPDX-License-Identifier: Apache-2.0 package helmtest import ( "testing" "github.com/gruntwork-io/terratest/modules/helm" appsV1 "k8s.io/api/apps/v1" v1 "k8s.io/api/core/v1" storageV1 "k8s.io/api/storage/v1" ) /* pachd: image: tag: 1.12.3 storage: ...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: port_exp.proto /* Package port_exp is a generated protocol buffer package. It is generated from these files: port_exp.proto It has these top-level messages: PortExp InterfaceExpInfos */ package port_exp import proto "github.com/golang/protobuf/proto" im...
package dialog import ( "encoding/json" "fmt" "net/http" "path" "github.com/pkg/errors" "github.com/mattermost/mattermost-server/v5/model" "github.com/mattermost/mattermost-plugin-apps/apps" "github.com/mattermost/mattermost-plugin-apps/mmclient" "github.com/mattermost/mattermost-plugin-apps/server/config"...
package h2transport import ( "crypto/tls" "errors" "net" "net/http" "time" "github.com/docker/spdystream" ic "github.com/libp2p/go-libp2p-core/crypto" "github.com/libp2p/go-libp2p-core/mux" "github.com/libp2p/go-libp2p-core/network" "github.com/libp2p/go-libp2p-core/peer" "github.com/libp2p/go-libp2p-core/...
package main // ----- ---- --- -- - // Copyright 2019 Oneiro NA, Inc. All Rights Reserved. // // Licensed under the Apache License 2.0 (the "License"). You may not use // this file except in compliance with the License. You can obtain a copy // in the file LICENSE in the source distribution or at // https://www.apac...
/* Copyright IBM Corporation 2020 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 di...
// Package context implements a simple request-aware HTTP context used by plugins // and exposed by the middleware layer, designed to share polymorfic data // types across plugins in the middleware call chain. // // Context is not thread-safe by default. // In case that you support multithread programming in plugins yo...
package main import ( "net/http" "bytes" "os" "errors" "net" "strings" "github.com/gin-gonic/gin" "github.com/gorilla/websocket" "github.com/sirupsen/logrus" ) //Message resp struct // type Message struct { // Status int `json:"status"` // Payload interface{} `json:"payload"` // } func main() {...
package ray import ( "math" "math/rand" "reflect" "testing" "time" "github.com/oakmound/oak/v4/alg" "github.com/oakmound/oak/v4/alg/floatgeom" "github.com/oakmound/oak/v4/collision" ) func TestConeCasterSettings(t *testing.T) { c1 := NewConeCaster( CenterCone(false), ConeSpread(180), ConeRays(2), ) ...