Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PacktPublishing/Go-Programming-Cookbook-Second-Edition
/ functions
Functions
795 in github.com/PacktPublishing/Go-Programming-Cookbook-Second-Edition
⨍
Functions
795
◇
Types & classes
269
↓ 1 callers
Method
example3
()
chapter9/tools/struct.go:12
↓ 1 callers
Function
getCustomHTTPReqHeaders
getCustomHTTPReqHeaders retrieves a copy of any headers that are set in a context through the twirp.WithHTTPRequestHeaders function. If there are no h
chapter7/twirp/rpc/greeter/greeter.twirp.go:428
↓ 1 callers
Function
getRaftSet
generate n raft sets to bootstrap the raft cluster
chapter11/consensus/raftset.go:27
↓ 1 callers
Method
handle
(w http.ResponseWriter, r *http.Request)
chapter13/appengine/controller.go:18
↓ 1 callers
Function
marshalErrorToJSON
marshalErrorToJSON returns JSON from a twirp.Error, that can be used as HTTP error response body. If serialization fails, it will use a descriptive In
chapter7/twirp/rpc/greeter/greeter.twirp.go:470
↓ 1 callers
Function
printHeaderInfo
extract header info and print it nicely
chapter5/mail/header.go:10
↓ 1 callers
Function
process
(c *websocket.Conn)
chapter5/websocket/client/process.go:13
↓ 1 callers
Function
sendMessage
(producer sarama.SyncProducer, value string)
chapter12/kafkaflow/producer/main.go:10
↓ 1 callers
Function
sendMessage
(producer sarama.SyncProducer, value string)
chapter12/synckafka/producer/main.go:10
↓ 1 callers
Method
serveGreet
(ctx context.Context, resp http.ResponseWriter, req *http.Request)
chapter7/twirp/rpc/greeter/greeter.twirp.go:178
↓ 1 callers
Method
serveGreetJSON
(ctx context.Context, resp http.ResponseWriter, req *http.Request)
chapter7/twirp/rpc/greeter/greeter.twirp.go:196
↓ 1 callers
Method
serveGreetProtobuf
(ctx context.Context, resp http.ResponseWriter, req *http.Request)
chapter7/twirp/rpc/greeter/greeter.twirp.go:258
Method
AsyncClose
()
chapter12/asynckafka/producer/mocks_test.go:36
Function
BenchmarkAtomicCounterAdd
(b *testing.B)
chapter14/bench/atomic_test.go:53
Function
BenchmarkAtomicCounterAddRead
(b *testing.B)
chapter14/bench/atomic_test.go:67
Function
BenchmarkAtomicCounterRead
(b *testing.B)
chapter14/bench/atomic_test.go:60
Function
BenchmarkCounterAdd
(b *testing.B)
chapter14/bench/lock_test.go:60
Function
BenchmarkCounterAddRead
(b *testing.B)
chapter14/bench/lock_test.go:74
Function
BenchmarkCounterRead
(b *testing.B)
chapter14/bench/lock_test.go:67
Function
Benchmark_concat
(b *testing.B)
chapter14/tuning/concat_test.go:25
Function
Benchmark_join
(b *testing.B)
chapter14/tuning/join_test.go:25
Function
Catcher
Catcher calls Panic
chapter4/panic/panic.go:20
Method
Close
()
chapter12/asynckafka/producer/mocks_test.go:40
Method
Close
()
chapter12/asynckafka/producer/mocks_test.go:46
Method
Commit
()
chapter6/dbinterface/mocks_test.go:112
Method
Commit
()
chapter6/dbinterface/mocks_test.go:118
Method
Descriptor
()
chapter7/twirp/rpc/greeter/greeter.pb.go:32
Method
Descriptor
()
chapter7/twirp/rpc/greeter/greeter.pb.go:77
Method
Descriptor
()
chapter7/grpc/greeter/greeter.pb.go:45
Method
Descriptor
()
chapter7/grpc/greeter/greeter.pb.go:68
Method
Descriptor
()
chapter8/grpcjson/keyvalue/keyvalue.pb.go:46
Method
Descriptor
()
chapter8/grpcjson/keyvalue/keyvalue.pb.go:69
Method
Descriptor
()
chapter8/grpcjson/keyvalue/keyvalue.pb.go:86
Method
DoStuff
(input string)
chapter9/mocking/mock_test.go:8
Method
EXPECT
()
chapter6/dbinterface/mocks_test.go:108
Method
Errors
()
chapter12/asynckafka/producer/mocks_test.go:56
Function
Exec
Exec initializes storage, then performs operations using the storage interface
chapter6/storage/exec.go:10
Method
Exec
(_param0 string, _param1 ...interface{})
chapter6/dbinterface/mocks_test.go:33
Method
Exec
(arg0 interface{}, arg1 ...interface{})
chapter6/dbinterface/mocks_test.go:44
Method
Exec
(_param0 string, _param1 ...interface{})
chapter6/dbinterface/mocks_test.go:122
Method
Exec
(arg0 interface{}, arg1 ...interface{})
chapter6/dbinterface/mocks_test.go:133
Function
FeatureContext
(s *godog.Suite)
chapter9/bdd/handler_test.go:61
Method
Get
Get our in-memory value
chapter8/controllers/storage.go:16
Method
Get
(ctx context.Context, in *GetKeyValueRequest, opts ...grpc.CallOption)
chapter8/grpcjson/keyvalue/keyvalue.pb.go:140
Method
Get
(context.Context, *GetKeyValueRequest)
chapter8/grpcjson/keyvalue/keyvalue.pb.go:153
Method
Get
(ctx context.Context, key string)
chapter13/firebase/client.go:24
Method
Get
Get indicates an expected call of Get
chapter9/mockgen/internal/mocks.go:45
Method
GetByName
GetByName queries mongodb for an item with the correct name
chapter6/storage/mongointerface.go:11
Method
GetKey
()
chapter8/grpcjson/keyvalue/keyvalue.pb.go:71
Method
GetResponse
()
chapter7/twirp/rpc/greeter/greeter.pb.go:98
Method
GetResponse
()
chapter7/grpc/greeter/greeter.pb.go:70
Method
GetSuccess
()
chapter8/grpcjson/keyvalue/keyvalue.pb.go:88
Method
GetToken
GetToken retrieves a token from a file
chapter7/oauthstore/filestorage.go:19
Function
GetUser
GetUser uses an initialized oauth2 client to get information about a user
chapter7/oauthcli/exec.go:12
Method
GetValue
()
chapter8/grpcjson/keyvalue/keyvalue.pb.go:55
Method
Greet
(ctx context.Context, in *GreetRequest)
chapter7/twirp/rpc/greeter/greeter.twirp.go:67
Method
Greet
(ctx context.Context, in *GreetRequest)
chapter7/twirp/rpc/greeter/greeter.twirp.go:107
Method
Greet
(ctx context.Context, in *GreetRequest, opts ...grpc.CallOption)
chapter7/grpc/greeter/greeter.pb.go:104
Method
Greet
(context.Context, *GreetRequest)
chapter7/grpc/greeter/greeter.pb.go:116
Function
HandleRequest
HandleRequest will be called when the lambda function is invoked it takes an input and checks if it matches our super secret value
chapter13/logging/functions/secret/main.go:19
Function
HandleRequest
HandleRequest will be called when the lambda function is invoked it takes a Message and returns a Response that contains a greeting this greeting cont
chapter13/lambda/functions/greeter2/main.go:26
Function
HandleRequest
HandleRequest will be called when the lambda function is invoked it takes a Message and returns a Response that contains a greeting
chapter13/lambda/functions/greeter1/main.go:24
Method
Input
()
chapter12/asynckafka/producer/mocks_test.go:66
Method
MarshalJSON
()
chapter3/nulls/nullencoding.go:18
Function
NewGreeterServiceClient
(cc *grpc.ClientConn)
chapter7/grpc/greeter/greeter.pb.go:100
Function
NewGreeterServiceJSONClient
NewGreeterServiceJSONClient creates a JSON client that implements the GreeterService interface. It communicates using JSON and can be configured with
chapter7/twirp/rpc/greeter/greeter.twirp.go:90
Function
NewGreeterServiceProtobufClient
NewGreeterServiceProtobufClient creates a Protobuf client that implements the GreeterService interface. It communicates using Protobuf and can be conf
chapter7/twirp/rpc/greeter/greeter.twirp.go:50
Function
NewGreeterServiceServer
(svc GreeterService, hooks *twirp.ServerHooks)
chapter7/twirp/rpc/greeter/greeter.twirp.go:128
Function
NewKeyValueClient
(cc *grpc.ClientConn)
chapter8/grpcjson/keyvalue/keyvalue.pb.go:127
Function
NewMockGetSetter
NewMockGetSetter creates a new mock instance
chapter9/mockgen/internal/mocks.go:24
Function
NewMockTransaction
(ctrl *gomock.Controller)
chapter6/dbinterface/mocks_test.go:102
Function
NewPipeline
NewPipeline initializes the workers and connects them, it returns the input of the pipeline and the final output
chapter10/pipeline/pipeline.go:8
Method
Prepare
(_param0 string)
chapter6/dbinterface/mocks_test.go:49
Method
Prepare
(arg0 interface{})
chapter6/dbinterface/mocks_test.go:56
Method
Prepare
(_param0 string)
chapter6/dbinterface/mocks_test.go:138
Method
Prepare
(arg0 interface{})
chapter6/dbinterface/mocks_test.go:145
Method
Prepare
(query string)
chapter6/dbinterface/transaction.go:9
Method
Process
Process loops over the input values and writes the upper case string version of them to Res
chapter12/kafkaflow/components.go:19
Method
Process
Process Prints the current line received
chapter12/kafkaflow/components.go:32
Method
ProtoMessage
()
chapter7/twirp/rpc/greeter/greeter.pb.go:31
Method
ProtoMessage
()
chapter7/twirp/rpc/greeter/greeter.pb.go:76
Method
ProtoMessage
()
chapter7/grpc/greeter/greeter.pb.go:44
Method
ProtoMessage
()
chapter7/grpc/greeter/greeter.pb.go:67
Method
ProtoMessage
()
chapter8/grpcjson/keyvalue/keyvalue.pb.go:45
Method
ProtoMessage
()
chapter8/grpcjson/keyvalue/keyvalue.pb.go:68
Method
ProtoMessage
()
chapter8/grpcjson/keyvalue/keyvalue.pb.go:85
Method
ProtocGenTwirpVersion
()
chapter7/twirp/rpc/greeter/greeter.twirp.go:326
Method
ProtocGenTwirpVersion
ProtocGenTwirpVersion is the semantic version string of the version of twirp used to generate this file.
chapter7/twirp/rpc/greeter/greeter.twirp.go:363
Method
Put
(string)
chapter8/controllers/storage.go:7
Method
Put
Put our in-memory value
chapter8/controllers/storage.go:21
Method
Put
Put adds an item to our mongo instance
chapter6/storage/mongointerface.go:22
Method
Query
(_param0 string, _param1 ...interface{})
chapter6/dbinterface/mocks_test.go:60
Method
Query
(arg0 interface{}, arg1 ...interface{})
chapter6/dbinterface/mocks_test.go:71
Method
Query
(_param0 string, _param1 ...interface{})
chapter6/dbinterface/mocks_test.go:149
Method
Query
(arg0 interface{}, arg1 ...interface{})
chapter6/dbinterface/mocks_test.go:160
Method
QueryRow
(_param0 string, _param1 ...interface{})
chapter6/dbinterface/mocks_test.go:76
Method
QueryRow
(arg0 interface{}, arg1 ...interface{})
chapter6/dbinterface/mocks_test.go:86
Method
QueryRow
(_param0 string, _param1 ...interface{})
chapter6/dbinterface/mocks_test.go:165
Method
QueryRow
(arg0 interface{}, arg1 ...interface{})
chapter6/dbinterface/mocks_test.go:175
Method
QueryRow
(query string, args ...interface{})
chapter6/dbinterface/transaction.go:11
← previous
next →
301–400 of 795, ranked by callers