// Code generated by goctl. DO NOT EDIT.
// goctl 1.9.2
// Source: snowflake.proto

package snowflakeservice

import (
	"context"

	"juwan-backend/app/snowflake/rpc/snowflake"

	"github.com/zeromicro/go-zero/zrpc"
	"google.golang.org/grpc"
)

type (
	NextIdReq   = snowflake.NextIdReq
	NextIdResp  = snowflake.NextIdResp
	NextIdsReq  = snowflake.NextIdsReq
	NextIdsResp = snowflake.NextIdsResp

	SnowflakeService interface {
		NextId(ctx context.Context, in *NextIdReq, opts ...grpc.CallOption) (*NextIdResp, error)
		NextIds(ctx context.Context, in *NextIdsReq, opts ...grpc.CallOption) (*NextIdsResp, error)
	}

	defaultSnowflakeService struct {
		cli zrpc.Client
	}
)

func NewSnowflakeService(cli zrpc.Client) SnowflakeService {
	return &defaultSnowflakeService{
		cli: cli,
	}
}

func (m *defaultSnowflakeService) NextId(ctx context.Context, in *NextIdReq, opts ...grpc.CallOption) (*NextIdResp, error) {
	client := snowflake.NewSnowflakeServiceClient(m.cli.Conn())
	return client.NextId(ctx, in, opts...)
}

func (m *defaultSnowflakeService) NextIds(ctx context.Context, in *NextIdsReq, opts ...grpc.CallOption) (*NextIdsResp, error) {
	client := snowflake.NewSnowflakeServiceClient(m.cli.Conn())
	return client.NextIds(ctx, in, opts...)
}
