123 lines
5.0 KiB
Go
123 lines
5.0 KiB
Go
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.3.0
|
|
// - protoc (unknown)
|
|
// source: controller/api/services/v1/billing_service.proto
|
|
|
|
package services
|
|
|
|
import (
|
|
context "context"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
)
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
// Requires gRPC-Go v1.32.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion7
|
|
|
|
const (
|
|
BillingService_MonthlyActiveUsers_FullMethodName = "/controller.api.services.v1.BillingService/MonthlyActiveUsers"
|
|
)
|
|
|
|
// BillingServiceClient is the client API for BillingService 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.
|
|
type BillingServiceClient interface {
|
|
// MonthlyActiveUsers returns the monthly active users for the given time period.
|
|
// If no time period is provided, the current and previous months are returned.
|
|
// If the provided request contains a start time but no end time, it will return
|
|
// up to the current month. If the provided request contains an end time and no start time,
|
|
// or if the end time is prior to the start time, an error will be returned.
|
|
MonthlyActiveUsers(ctx context.Context, in *MonthlyActiveUsersRequest, opts ...grpc.CallOption) (*MonthlyActiveUsersResponse, error)
|
|
}
|
|
|
|
type billingServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewBillingServiceClient(cc grpc.ClientConnInterface) BillingServiceClient {
|
|
return &billingServiceClient{cc}
|
|
}
|
|
|
|
func (c *billingServiceClient) MonthlyActiveUsers(ctx context.Context, in *MonthlyActiveUsersRequest, opts ...grpc.CallOption) (*MonthlyActiveUsersResponse, error) {
|
|
out := new(MonthlyActiveUsersResponse)
|
|
err := c.cc.Invoke(ctx, BillingService_MonthlyActiveUsers_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// BillingServiceServer is the server API for BillingService service.
|
|
// All implementations must embed UnimplementedBillingServiceServer
|
|
// for forward compatibility
|
|
type BillingServiceServer interface {
|
|
// MonthlyActiveUsers returns the monthly active users for the given time period.
|
|
// If no time period is provided, the current and previous months are returned.
|
|
// If the provided request contains a start time but no end time, it will return
|
|
// up to the current month. If the provided request contains an end time and no start time,
|
|
// or if the end time is prior to the start time, an error will be returned.
|
|
MonthlyActiveUsers(context.Context, *MonthlyActiveUsersRequest) (*MonthlyActiveUsersResponse, error)
|
|
mustEmbedUnimplementedBillingServiceServer()
|
|
}
|
|
|
|
// UnimplementedBillingServiceServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedBillingServiceServer struct {
|
|
}
|
|
|
|
func (UnimplementedBillingServiceServer) MonthlyActiveUsers(context.Context, *MonthlyActiveUsersRequest) (*MonthlyActiveUsersResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method MonthlyActiveUsers not implemented")
|
|
}
|
|
func (UnimplementedBillingServiceServer) mustEmbedUnimplementedBillingServiceServer() {}
|
|
|
|
// UnsafeBillingServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to BillingServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeBillingServiceServer interface {
|
|
mustEmbedUnimplementedBillingServiceServer()
|
|
}
|
|
|
|
func RegisterBillingServiceServer(s grpc.ServiceRegistrar, srv BillingServiceServer) {
|
|
s.RegisterService(&BillingService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _BillingService_MonthlyActiveUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(MonthlyActiveUsersRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(BillingServiceServer).MonthlyActiveUsers(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: BillingService_MonthlyActiveUsers_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(BillingServiceServer).MonthlyActiveUsers(ctx, req.(*MonthlyActiveUsersRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// BillingService_ServiceDesc is the grpc.ServiceDesc for BillingService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var BillingService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "controller.api.services.v1.BillingService",
|
|
HandlerType: (*BillingServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "MonthlyActiveUsers",
|
|
Handler: _BillingService_MonthlyActiveUsers_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "controller/api/services/v1/billing_service.proto",
|
|
}
|