Documentation ¶
Overview ¶
Package pricing is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterPricingHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterPricingHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PricingClient) error
- func RegisterPricingHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterPricingHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PricingServer) error
- func RegisterPricingServer(s grpc.ServiceRegistrar, srv PricingServer)
- type ClientOptions
- type GetInfoRequest
- type GetInfoResponse
- type GetPricingInfoRequest
- func (*GetPricingInfoRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetPricingInfoRequest) GetCloud() string
- func (x *GetPricingInfoRequest) GetRegion() string
- func (x *GetPricingInfoRequest) GetService() string
- func (x *GetPricingInfoRequest) GetToken() string
- func (*GetPricingInfoRequest) ProtoMessage()
- func (x *GetPricingInfoRequest) ProtoReflect() protoreflect.Message
- func (x *GetPricingInfoRequest) Reset()
- func (x *GetPricingInfoRequest) String() string
- type GetPricingInfoResponse
- func (*GetPricingInfoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetPricingInfoResponse) GetCloud() string
- func (x *GetPricingInfoResponse) GetPriceperunit() float64
- func (x *GetPricingInfoResponse) GetRegionCode() string
- func (x *GetPricingInfoResponse) GetService() string
- func (x *GetPricingInfoResponse) GetServiceDetails() *pricing.ServiceDetails
- func (x *GetPricingInfoResponse) GetSku() string
- func (x *GetPricingInfoResponse) GetToken() string
- func (x *GetPricingInfoResponse) GetUnit() string
- func (*GetPricingInfoResponse) ProtoMessage()
- func (x *GetPricingInfoResponse) ProtoReflect() protoreflect.Message
- func (x *GetPricingInfoResponse) Reset()
- func (x *GetPricingInfoResponse) String() string
- type GrpcClient
- type PricingClient
- type PricingServer
- type Pricing_GetPricingInfoClient
- type Pricing_GetPricingInfoServer
- type UnimplementedPricingServer
- type UnsafePricingServer
Constants ¶
const ( Pricing_GetInfo_FullMethodName = "/blueapi.pricing.v1.Pricing/GetInfo" Pricing_GetPricingInfo_FullMethodName = "/blueapi.pricing.v1.Pricing/GetPricingInfo" )
Variables ¶
var File_pricing_v1_pricing_proto protoreflect.FileDescriptor
var Pricing_ServiceDesc = grpc.ServiceDesc{ ServiceName: "blueapi.pricing.v1.Pricing", HandlerType: (*PricingServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetInfo", Handler: _Pricing_GetInfo_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "GetPricingInfo", Handler: _Pricing_GetPricingInfo_Handler, ServerStreams: true, }, }, Metadata: "pricing/v1/pricing.proto", }
Pricing_ServiceDesc is the grpc.ServiceDesc for Pricing service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPricingHandler ¶
func RegisterPricingHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterPricingHandler registers the http handlers for service Pricing to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterPricingHandlerClient ¶
func RegisterPricingHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PricingClient) error
RegisterPricingHandlerClient registers the http handlers for service Pricing to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PricingClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PricingClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "PricingClient" to call the correct interceptors.
func RegisterPricingHandlerFromEndpoint ¶
func RegisterPricingHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterPricingHandlerFromEndpoint is same as RegisterPricingHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterPricingHandlerServer ¶
func RegisterPricingHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PricingServer) error
RegisterPricingHandlerServer registers the http handlers for service Pricing to "mux". UnaryRPC :call PricingServer 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 RegisterPricingHandlerFromEndpoint instead.
func RegisterPricingServer ¶
func RegisterPricingServer(s grpc.ServiceRegistrar, srv PricingServer)
Types ¶
type ClientOptions ¶ added in v0.71.1
type ClientOptions struct {
Conn *conn.GrpcClientConn
}
ClientOptions represents the optional options to NewClient.
type GetInfoRequest ¶
type GetInfoRequest struct {
// contains filtered or unexported fields
}
Request message for the Pricing.GetInfo rpc.
func (*GetInfoRequest) Descriptor
deprecated
func (*GetInfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetInfoRequest.ProtoReflect.Descriptor instead.
func (*GetInfoRequest) ProtoMessage ¶
func (*GetInfoRequest) ProtoMessage()
func (*GetInfoRequest) ProtoReflect ¶
func (x *GetInfoRequest) ProtoReflect() protoreflect.Message
func (*GetInfoRequest) Reset ¶
func (x *GetInfoRequest) Reset()
func (*GetInfoRequest) String ¶
func (x *GetInfoRequest) String() string
type GetInfoResponse ¶
type GetInfoResponse struct { Response string `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` // contains filtered or unexported fields }
Response message for the Pricing.GetInfo rpc.
func (*GetInfoResponse) Descriptor
deprecated
func (*GetInfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetInfoResponse.ProtoReflect.Descriptor instead.
func (*GetInfoResponse) GetResponse ¶
func (x *GetInfoResponse) GetResponse() string
func (*GetInfoResponse) ProtoMessage ¶
func (*GetInfoResponse) ProtoMessage()
func (*GetInfoResponse) ProtoReflect ¶
func (x *GetInfoResponse) ProtoReflect() protoreflect.Message
func (*GetInfoResponse) Reset ¶
func (x *GetInfoResponse) Reset()
func (*GetInfoResponse) String ¶
func (x *GetInfoResponse) String() string
type GetPricingInfoRequest ¶ added in v0.71.12
type GetPricingInfoRequest struct { Cloud string `protobuf:"bytes,1,opt,name=cloud,proto3" json:"cloud,omitempty"` Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` Region string `protobuf:"bytes,3,opt,name=region,proto3" json:"region,omitempty"` Token string `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
Request message for GetPricingInfo
func (*GetPricingInfoRequest) Descriptor
deprecated
added in
v0.71.12
func (*GetPricingInfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetPricingInfoRequest.ProtoReflect.Descriptor instead.
func (*GetPricingInfoRequest) GetCloud ¶ added in v0.71.12
func (x *GetPricingInfoRequest) GetCloud() string
func (*GetPricingInfoRequest) GetRegion ¶ added in v0.71.12
func (x *GetPricingInfoRequest) GetRegion() string
func (*GetPricingInfoRequest) GetService ¶ added in v0.71.12
func (x *GetPricingInfoRequest) GetService() string
func (*GetPricingInfoRequest) GetToken ¶ added in v0.71.12
func (x *GetPricingInfoRequest) GetToken() string
func (*GetPricingInfoRequest) ProtoMessage ¶ added in v0.71.12
func (*GetPricingInfoRequest) ProtoMessage()
func (*GetPricingInfoRequest) ProtoReflect ¶ added in v0.71.12
func (x *GetPricingInfoRequest) ProtoReflect() protoreflect.Message
func (*GetPricingInfoRequest) Reset ¶ added in v0.71.12
func (x *GetPricingInfoRequest) Reset()
func (*GetPricingInfoRequest) String ¶ added in v0.71.12
func (x *GetPricingInfoRequest) String() string
type GetPricingInfoResponse ¶ added in v0.71.12
type GetPricingInfoResponse struct { Cloud string `protobuf:"bytes,1,opt,name=cloud,proto3" json:"cloud,omitempty"` Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` RegionCode string `protobuf:"bytes,3,opt,name=region_code,json=regionCode,proto3" json:"region_code,omitempty"` Token string `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"` Sku string `protobuf:"bytes,5,opt,name=sku,proto3" json:"sku,omitempty"` Unit string `protobuf:"bytes,6,opt,name=unit,proto3" json:"unit,omitempty"` Priceperunit float64 `protobuf:"fixed64,7,opt,name=priceperunit,proto3" json:"priceperunit,omitempty"` ServiceDetails *pricing.ServiceDetails `protobuf:"bytes,8,opt,name=serviceDetails,proto3" json:"serviceDetails,omitempty"` // contains filtered or unexported fields }
Response message for GetPricingInfo
func (*GetPricingInfoResponse) Descriptor
deprecated
added in
v0.71.12
func (*GetPricingInfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetPricingInfoResponse.ProtoReflect.Descriptor instead.
func (*GetPricingInfoResponse) GetCloud ¶ added in v0.71.12
func (x *GetPricingInfoResponse) GetCloud() string
func (*GetPricingInfoResponse) GetPriceperunit ¶ added in v0.71.12
func (x *GetPricingInfoResponse) GetPriceperunit() float64
func (*GetPricingInfoResponse) GetRegionCode ¶ added in v0.71.12
func (x *GetPricingInfoResponse) GetRegionCode() string
func (*GetPricingInfoResponse) GetService ¶ added in v0.71.12
func (x *GetPricingInfoResponse) GetService() string
func (*GetPricingInfoResponse) GetServiceDetails ¶ added in v0.71.12
func (x *GetPricingInfoResponse) GetServiceDetails() *pricing.ServiceDetails
func (*GetPricingInfoResponse) GetSku ¶ added in v0.71.12
func (x *GetPricingInfoResponse) GetSku() string
func (*GetPricingInfoResponse) GetToken ¶ added in v0.71.12
func (x *GetPricingInfoResponse) GetToken() string
func (*GetPricingInfoResponse) GetUnit ¶ added in v0.71.12
func (x *GetPricingInfoResponse) GetUnit() string
func (*GetPricingInfoResponse) ProtoMessage ¶ added in v0.71.12
func (*GetPricingInfoResponse) ProtoMessage()
func (*GetPricingInfoResponse) ProtoReflect ¶ added in v0.71.12
func (x *GetPricingInfoResponse) ProtoReflect() protoreflect.Message
func (*GetPricingInfoResponse) Reset ¶ added in v0.71.12
func (x *GetPricingInfoResponse) Reset()
func (*GetPricingInfoResponse) String ¶ added in v0.71.12
func (x *GetPricingInfoResponse) String() string
type GrpcClient ¶ added in v0.71.1
type GrpcClient struct { PricingClient // contains filtered or unexported fields }
func NewClient ¶ added in v0.71.1
func NewClient(ctx context.Context, opts ...*ClientOptions) (*GrpcClient, error)
NewClient returns a client connection to the 'pricing' service.
func (*GrpcClient) Close ¶ added in v0.71.1
func (c *GrpcClient) Close()
type PricingClient ¶
type PricingClient interface { // Test endpoint only. GetInfo(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*GetInfoResponse, error) // Get pricing info GetPricingInfo(ctx context.Context, in *GetPricingInfoRequest, opts ...grpc.CallOption) (Pricing_GetPricingInfoClient, error) }
PricingClient is the client API for Pricing 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.
Pricing service definition.
func NewPricingClient ¶
func NewPricingClient(cc grpc.ClientConnInterface) PricingClient
type PricingServer ¶
type PricingServer interface { // Test endpoint only. GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error) // Get pricing info GetPricingInfo(*GetPricingInfoRequest, Pricing_GetPricingInfoServer) error // contains filtered or unexported methods }
PricingServer is the server API for Pricing service. All implementations must embed UnimplementedPricingServer for forward compatibility
Pricing service definition.
type Pricing_GetPricingInfoClient ¶ added in v0.71.12
type Pricing_GetPricingInfoClient interface { Recv() (*GetPricingInfoResponse, error) grpc.ClientStream }
type Pricing_GetPricingInfoServer ¶ added in v0.71.12
type Pricing_GetPricingInfoServer interface { Send(*GetPricingInfoResponse) error grpc.ServerStream }
type UnimplementedPricingServer ¶
type UnimplementedPricingServer struct { }
UnimplementedPricingServer must be embedded to have forward compatible implementations.
func (UnimplementedPricingServer) GetInfo ¶
func (UnimplementedPricingServer) GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error)
func (UnimplementedPricingServer) GetPricingInfo ¶ added in v0.71.12
func (UnimplementedPricingServer) GetPricingInfo(*GetPricingInfoRequest, Pricing_GetPricingInfoServer) error
type UnsafePricingServer ¶
type UnsafePricingServer interface {
// contains filtered or unexported methods
}
UnsafePricingServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PricingServer will result in compilation errors.