Documentation ¶
Index ¶
Constants ¶
View Source
const ( BroadcastWaitAsync = BroadcastWait(txpb.BroadcastSync_async) BroadcastWaitSync = BroadcastWait(txpb.BroadcastSync_sync) BroadcastWaitCommit = BroadcastWait(txpb.BroadcastSync_commit) )
Variables ¶
View Source
var ( ErrInvalidSignature = errors.New("invalid signature") // ErrUnauthorized is returned when the client is not authenticated // It is the equivalent of http status code 401 ErrNotFound = errors.New("not found") )
The following errors may be detected by consumers using errors.Is.
Functions ¶
func ConvertGRPCErr ¶
ConvertGRPCErr will convert the error to a known type, if possible. It is expected that the error is from a gRPC call.
func DefaultGRPCOpts ¶
func DefaultGRPCOpts() []grpc.DialOption
DefaultGRPCOpts returns the default grpc options for the client.
Types ¶
type ActionCallOption ¶
type ActionCallOption func(*ActionCallOpts)
func WithAuthCookie ¶
func WithAuthCookie(cookie *http.Cookie) ActionCallOption
type ActionCallOpts ¶
type ActionCallOpts struct { // authn cookie, for provider that supports cookie authn, now only for KGW // Call action(view action) is read oriented; for data privacy, a network needs // extra infra to protect the data. KGW is such infra using cookie authn. // NOTE: setting cookie this way means the cookie policy is not applied. // AuthCookies is a general way to use cookie in SDK when calling action. AuthCookies []*http.Cookie }
ActionCallOpts is the options for action call. Currently only HTTP RPCClient supports this option.
type BroadcastWait ¶
type BroadcastWait uint8
BroadcastWait is an argument type that indicates how long to wait when broadcasting a transaction. The levels are async (do not wait for mempool acceptance), sync (wait for mempool acceptance), and commit (wait for it to be included in a block).
Directories ¶
Path | Synopsis |
---|---|
package admin specifies the interface for the admin service client.
|
package admin specifies the interface for the admin service client. |
grpc
package grpc implements a grpc client for the Kwil admin client.
|
package grpc implements a grpc client for the Kwil admin client. |
package function specifies the client interface for Kwil's function service.
|
package function specifies the client interface for Kwil's function service. |
package user defines the interface for a user client transport.
|
package user defines the interface for a user client transport. |
grpc
package grpc implements a gRPC client for the Kwil txsvc client.
|
package grpc implements a gRPC client for the Kwil txsvc client. |
http
package http implements an http transport for the Kwil txsvc client.
|
package http implements an http transport for the Kwil txsvc client. |
Click to show internal directories.
Click to hide internal directories.