Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterPoolServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterPoolServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PoolServiceClient) error
- func RegisterPoolServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterPoolServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PoolServiceServer) error
- func RegisterPoolServiceServer(s grpc.ServiceRegistrar, srv PoolServiceServer)
- type CreatePoolRequest
- func (*CreatePoolRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreatePoolRequest) GetPool() *Pool
- func (x *CreatePoolRequest) GetPoolId() string
- func (*CreatePoolRequest) ProtoMessage()
- func (x *CreatePoolRequest) ProtoReflect() protoreflect.Message
- func (x *CreatePoolRequest) Reset()
- func (x *CreatePoolRequest) String() string
- type GetPoolRequest
- type ListPoolsRequest
- func (*ListPoolsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListPoolsRequest) GetPageSize() int32
- func (x *ListPoolsRequest) GetPageToken() string
- func (*ListPoolsRequest) ProtoMessage()
- func (x *ListPoolsRequest) ProtoReflect() protoreflect.Message
- func (x *ListPoolsRequest) Reset()
- func (x *ListPoolsRequest) String() string
- type ListPoolsResponse
- func (*ListPoolsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListPoolsResponse) GetNextPageToken() string
- func (x *ListPoolsResponse) GetPools() []*Pool
- func (*ListPoolsResponse) ProtoMessage()
- func (x *ListPoolsResponse) ProtoReflect() protoreflect.Message
- func (x *ListPoolsResponse) Reset()
- func (x *ListPoolsResponse) String() string
- type Pool
- type PoolResourceName
- type PoolServiceClient
- type PoolServiceServer
- type UnimplementedPoolServiceServer
- func (UnimplementedPoolServiceServer) CreatePool(context.Context, *CreatePoolRequest) (*Pool, error)
- func (UnimplementedPoolServiceServer) GetPool(context.Context, *GetPoolRequest) (*Pool, error)
- func (UnimplementedPoolServiceServer) ListPools(context.Context, *ListPoolsRequest) (*ListPoolsResponse, error)
- type UnsafePoolServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_coinbase_cloud_pools_v1_pools_proto protoreflect.FileDescriptor
var PoolService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "coinbase.cloud.pools.v1.PoolService", HandlerType: (*PoolServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreatePool", Handler: _PoolService_CreatePool_Handler, }, { MethodName: "GetPool", Handler: _PoolService_GetPool_Handler, }, { MethodName: "ListPools", Handler: _PoolService_ListPools_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "coinbase/cloud/pools/v1/pools.proto", }
PoolService_ServiceDesc is the grpc.ServiceDesc for PoolService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPoolServiceHandler ¶
func RegisterPoolServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterPoolServiceHandler registers the http handlers for service PoolService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterPoolServiceHandlerClient ¶
func RegisterPoolServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PoolServiceClient) error
RegisterPoolServiceHandlerClient registers the http handlers for service PoolService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PoolServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PoolServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "PoolServiceClient" to call the correct interceptors.
func RegisterPoolServiceHandlerFromEndpoint ¶
func RegisterPoolServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterPoolServiceHandlerFromEndpoint is same as RegisterPoolServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterPoolServiceHandlerServer ¶
func RegisterPoolServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PoolServiceServer) error
RegisterPoolServiceHandlerServer registers the http handlers for service PoolService to "mux". UnaryRPC :call PoolServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPoolServiceHandlerFromEndpoint instead.
func RegisterPoolServiceServer ¶
func RegisterPoolServiceServer(s grpc.ServiceRegistrar, srv PoolServiceServer)
Types ¶
type CreatePoolRequest ¶
type CreatePoolRequest struct { // The Pool to create. Pool *Pool `protobuf:"bytes,1,opt,name=pool,proto3" json:"pool,omitempty"` // Optional: the ID to use for the Pool, which will become the final component // of the Pool's resource name. If not provided, the server will assign a Pool ID // automatically. PoolId string `protobuf:"bytes,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` // contains filtered or unexported fields }
The request message for CreatePool.
func (*CreatePoolRequest) Descriptor
deprecated
func (*CreatePoolRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreatePoolRequest.ProtoReflect.Descriptor instead.
func (*CreatePoolRequest) GetPool ¶
func (x *CreatePoolRequest) GetPool() *Pool
func (*CreatePoolRequest) GetPoolId ¶
func (x *CreatePoolRequest) GetPoolId() string
func (*CreatePoolRequest) ProtoMessage ¶
func (*CreatePoolRequest) ProtoMessage()
func (*CreatePoolRequest) ProtoReflect ¶
func (x *CreatePoolRequest) ProtoReflect() protoreflect.Message
func (*CreatePoolRequest) Reset ¶
func (x *CreatePoolRequest) Reset()
func (*CreatePoolRequest) String ¶
func (x *CreatePoolRequest) String() string
type GetPoolRequest ¶
type GetPoolRequest struct { // The resource name of the Pool. // Format: pools/{pool_id} Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
The request message for GetPool.
func (*GetPoolRequest) Descriptor
deprecated
func (*GetPoolRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetPoolRequest.ProtoReflect.Descriptor instead.
func (*GetPoolRequest) GetName ¶
func (x *GetPoolRequest) GetName() string
func (*GetPoolRequest) ProtoMessage ¶
func (*GetPoolRequest) ProtoMessage()
func (*GetPoolRequest) ProtoReflect ¶
func (x *GetPoolRequest) ProtoReflect() protoreflect.Message
func (*GetPoolRequest) Reset ¶
func (x *GetPoolRequest) Reset()
func (*GetPoolRequest) String ¶
func (x *GetPoolRequest) String() string
type ListPoolsRequest ¶
type ListPoolsRequest struct { // The maximum number of Pools to return. The default is 50. PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // A page token, received from a previous ListPools call. // Provide this to retrieve the subsequent page. PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` // contains filtered or unexported fields }
The request message for ListPools.
func (*ListPoolsRequest) Descriptor
deprecated
func (*ListPoolsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListPoolsRequest.ProtoReflect.Descriptor instead.
func (*ListPoolsRequest) GetPageSize ¶
func (x *ListPoolsRequest) GetPageSize() int32
func (*ListPoolsRequest) GetPageToken ¶
func (x *ListPoolsRequest) GetPageToken() string
func (*ListPoolsRequest) ProtoMessage ¶
func (*ListPoolsRequest) ProtoMessage()
func (*ListPoolsRequest) ProtoReflect ¶
func (x *ListPoolsRequest) ProtoReflect() protoreflect.Message
func (*ListPoolsRequest) Reset ¶
func (x *ListPoolsRequest) Reset()
func (*ListPoolsRequest) String ¶
func (x *ListPoolsRequest) String() string
type ListPoolsResponse ¶
type ListPoolsResponse struct { // The list of Pools. Pools []*Pool `protobuf:"bytes,1,rep,name=pools,proto3" json:"pools,omitempty"` // A token, which can be sent as page_token to retrieve the next page. // If this field is omitted, there are no subsequent pages. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // contains filtered or unexported fields }
The response message for ListPools.
func (*ListPoolsResponse) Descriptor
deprecated
func (*ListPoolsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListPoolsResponse.ProtoReflect.Descriptor instead.
func (*ListPoolsResponse) GetNextPageToken ¶
func (x *ListPoolsResponse) GetNextPageToken() string
func (*ListPoolsResponse) GetPools ¶
func (x *ListPoolsResponse) GetPools() []*Pool
func (*ListPoolsResponse) ProtoMessage ¶
func (*ListPoolsResponse) ProtoMessage()
func (*ListPoolsResponse) ProtoReflect ¶
func (x *ListPoolsResponse) ProtoReflect() protoreflect.Message
func (*ListPoolsResponse) Reset ¶
func (x *ListPoolsResponse) Reset()
func (*ListPoolsResponse) String ¶
func (x *ListPoolsResponse) String() string
type Pool ¶
type Pool struct { // The resource name of the Pool. // Format: pools/{pool_id} Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // A user-readable name for the Pool. // Example: 'Acme Co. Retail Trading' DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` // contains filtered or unexported fields }
The Pool resource, which is a top-level container for segregating the resources under it via authorization checks.
func (*Pool) Descriptor
deprecated
func (*Pool) GetDisplayName ¶
func (*Pool) ProtoMessage ¶
func (*Pool) ProtoMessage()
func (*Pool) ProtoReflect ¶
func (x *Pool) ProtoReflect() protoreflect.Message
type PoolResourceName ¶
type PoolResourceName struct {
PoolId string
}
func (PoolResourceName) ContainsWildcard ¶
func (n PoolResourceName) ContainsWildcard() bool
func (PoolResourceName) MarshalString ¶
func (n PoolResourceName) MarshalString() (string, error)
func (PoolResourceName) String ¶
func (n PoolResourceName) String() string
func (*PoolResourceName) UnmarshalString ¶
func (n *PoolResourceName) UnmarshalString(name string) error
func (PoolResourceName) Validate ¶
func (n PoolResourceName) Validate() error
type PoolServiceClient ¶
type PoolServiceClient interface { // Creates a Pool. Invoke CreatePool before creating a Pool-scoped resource so that you can specify the Pool as the parent of the new resource. CreatePool(ctx context.Context, in *CreatePoolRequest, opts ...grpc.CallOption) (*Pool, error) // Retrieves a Pool by resource name. GetPool(ctx context.Context, in *GetPoolRequest, opts ...grpc.CallOption) (*Pool, error) // Returns a list of Pools. ListPools(ctx context.Context, in *ListPoolsRequest, opts ...grpc.CallOption) (*ListPoolsResponse, error) }
PoolServiceClient is the client API for PoolService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewPoolServiceClient ¶
func NewPoolServiceClient(cc grpc.ClientConnInterface) PoolServiceClient
type PoolServiceServer ¶
type PoolServiceServer interface { // Creates a Pool. Invoke CreatePool before creating a Pool-scoped resource so that you can specify the Pool as the parent of the new resource. CreatePool(context.Context, *CreatePoolRequest) (*Pool, error) // Retrieves a Pool by resource name. GetPool(context.Context, *GetPoolRequest) (*Pool, error) // Returns a list of Pools. ListPools(context.Context, *ListPoolsRequest) (*ListPoolsResponse, error) // contains filtered or unexported methods }
PoolServiceServer is the server API for PoolService service. All implementations must embed UnimplementedPoolServiceServer for forward compatibility
type UnimplementedPoolServiceServer ¶
type UnimplementedPoolServiceServer struct { }
UnimplementedPoolServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedPoolServiceServer) CreatePool ¶
func (UnimplementedPoolServiceServer) CreatePool(context.Context, *CreatePoolRequest) (*Pool, error)
func (UnimplementedPoolServiceServer) GetPool ¶
func (UnimplementedPoolServiceServer) GetPool(context.Context, *GetPoolRequest) (*Pool, error)
func (UnimplementedPoolServiceServer) ListPools ¶
func (UnimplementedPoolServiceServer) ListPools(context.Context, *ListPoolsRequest) (*ListPoolsResponse, error)
type UnsafePoolServiceServer ¶
type UnsafePoolServiceServer interface {
// contains filtered or unexported methods
}
UnsafePoolServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PoolServiceServer will result in compilation errors.