invoice

package
v0.69.92 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package invoice is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_invoice_v1_invoice_proto protoreflect.FileDescriptor
View Source
var Invoice_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "blueapi.invoice.v1.Invoice",
	HandlerType: (*InvoiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetInvoice",
			Handler:    _Invoice_GetInvoice_Handler,
		},
		{
			MethodName: "ExportInvoiceFile",
			Handler:    _Invoice_ExportInvoiceFile_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "invoice/v1/invoice.proto",
}

Invoice_ServiceDesc is the grpc.ServiceDesc for Invoice service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterInvoiceHandler

func RegisterInvoiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterInvoiceHandler registers the http handlers for service Invoice to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterInvoiceHandlerClient

func RegisterInvoiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client InvoiceClient) error

RegisterInvoiceHandlerClient registers the http handlers for service Invoice to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "InvoiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "InvoiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "InvoiceClient" to call the correct interceptors.

func RegisterInvoiceHandlerFromEndpoint

func RegisterInvoiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterInvoiceHandlerFromEndpoint is same as RegisterInvoiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterInvoiceHandlerServer

func RegisterInvoiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server InvoiceServer) error

RegisterInvoiceHandlerServer registers the http handlers for service Invoice to "mux". UnaryRPC :call InvoiceServer 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 RegisterInvoiceHandlerFromEndpoint instead.

func RegisterInvoiceServer

func RegisterInvoiceServer(s grpc.ServiceRegistrar, srv InvoiceServer)

Types

type ExportInvoiceFileRequest

type ExportInvoiceFileRequest struct {

	// Required. Month to get invoice. Format: `yyyymm`.
	Date string `protobuf:"bytes,1,opt,name=date,proto3" json:"date,omitempty"`
	// Optional.
	//
	// For Ripple, only billing internal ids are supported at the moment. You can set it to a single group or a comma-separated list of groups. ex) `group1,group2`. if want to set all group, set `*`.
	//
	// Implied as the parent billing group for Wave(Pro) users.
	GroupId string `protobuf:"bytes,2,opt,name=groupId,proto3" json:"groupId,omitempty"`
	// contains filtered or unexported fields
}

Response message for the ExportCostFiltersFile rpc.

func (*ExportInvoiceFileRequest) Descriptor deprecated

func (*ExportInvoiceFileRequest) Descriptor() ([]byte, []int)

Deprecated: Use ExportInvoiceFileRequest.ProtoReflect.Descriptor instead.

func (*ExportInvoiceFileRequest) GetDate

func (x *ExportInvoiceFileRequest) GetDate() string

func (*ExportInvoiceFileRequest) GetGroupId

func (x *ExportInvoiceFileRequest) GetGroupId() string

func (*ExportInvoiceFileRequest) ProtoMessage

func (*ExportInvoiceFileRequest) ProtoMessage()

func (*ExportInvoiceFileRequest) ProtoReflect

func (x *ExportInvoiceFileRequest) ProtoReflect() protoreflect.Message

func (*ExportInvoiceFileRequest) Reset

func (x *ExportInvoiceFileRequest) Reset()

func (*ExportInvoiceFileRequest) String

func (x *ExportInvoiceFileRequest) String() string

type ExportInvoiceFileResponse

type ExportInvoiceFileResponse struct {

	// Required. URL of exported file.
	//
	// csv columns set `group vendor resourceId resourceName type serviceName currency cost`
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	// contains filtered or unexported fields
}

Response message for the ExportInvoiceFile rpc.

func (*ExportInvoiceFileResponse) Descriptor deprecated

func (*ExportInvoiceFileResponse) Descriptor() ([]byte, []int)

Deprecated: Use ExportInvoiceFileResponse.ProtoReflect.Descriptor instead.

func (*ExportInvoiceFileResponse) GetUrl

func (x *ExportInvoiceFileResponse) GetUrl() string

func (*ExportInvoiceFileResponse) ProtoMessage

func (*ExportInvoiceFileResponse) ProtoMessage()

func (*ExportInvoiceFileResponse) ProtoReflect

func (*ExportInvoiceFileResponse) Reset

func (x *ExportInvoiceFileResponse) Reset()

func (*ExportInvoiceFileResponse) String

func (x *ExportInvoiceFileResponse) String() string

type GetInvoiceRequest

type GetInvoiceRequest struct {

	// Required. Month to get invoice. Format: `yyyymm`.
	Date string `protobuf:"bytes,1,opt,name=date,proto3" json:"date,omitempty"`
	// Required.
	//
	// For Ripple, only billing internal ids are supported at the moment. You can set it to a single group
	//
	// Implied as the parent billing group for Wave(Pro) users.
	GroupId string `protobuf:"bytes,2,opt,name=groupId,proto3" json:"groupId,omitempty"`
	// contains filtered or unexported fields
}

Request message for the Cost.GetInvoiceRequest rpc.

func (*GetInvoiceRequest) Descriptor deprecated

func (*GetInvoiceRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetInvoiceRequest.ProtoReflect.Descriptor instead.

func (*GetInvoiceRequest) GetDate

func (x *GetInvoiceRequest) GetDate() string

func (*GetInvoiceRequest) GetGroupId

func (x *GetInvoiceRequest) GetGroupId() string

func (*GetInvoiceRequest) ProtoMessage

func (*GetInvoiceRequest) ProtoMessage()

func (*GetInvoiceRequest) ProtoReflect

func (x *GetInvoiceRequest) ProtoReflect() protoreflect.Message

func (*GetInvoiceRequest) Reset

func (x *GetInvoiceRequest) Reset()

func (*GetInvoiceRequest) String

func (x *GetInvoiceRequest) String() string

type InvoiceClient

type InvoiceClient interface {
	// Gets a invoice.
	GetInvoice(ctx context.Context, in *GetInvoiceRequest, opts ...grpc.CallOption) (*api.Invoice, error)
	// Exports a invoice.
	ExportInvoiceFile(ctx context.Context, in *ExportInvoiceFileRequest, opts ...grpc.CallOption) (*ExportInvoiceFileResponse, error)
}

InvoiceClient is the client API for Invoice 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 NewInvoiceClient

func NewInvoiceClient(cc grpc.ClientConnInterface) InvoiceClient

type InvoiceServer

type InvoiceServer interface {
	// Gets a invoice.
	GetInvoice(context.Context, *GetInvoiceRequest) (*api.Invoice, error)
	// Exports a invoice.
	ExportInvoiceFile(context.Context, *ExportInvoiceFileRequest) (*ExportInvoiceFileResponse, error)
	// contains filtered or unexported methods
}

InvoiceServer is the server API for Invoice service. All implementations must embed UnimplementedInvoiceServer for forward compatibility

type UnimplementedInvoiceServer

type UnimplementedInvoiceServer struct {
}

UnimplementedInvoiceServer must be embedded to have forward compatible implementations.

func (UnimplementedInvoiceServer) GetInvoice

type UnsafeInvoiceServer

type UnsafeInvoiceServer interface {
	// contains filtered or unexported methods
}

UnsafeInvoiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to InvoiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL