// Code generated by protoc-gen-micro. DO NOT EDIT.
// source: proto/strategy.proto

/*
Package bitesla_srv_strategy is a generated protocol buffer package.

It is generated from these files:
	proto/strategy.proto

It has these top-level messages:
	StrategyInfo
	StrategyInfos
*/
package bitesla_srv_strategy

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"

import (
	context "context"
	client "github.com/micro/go-micro/client"
	server "github.com/micro/go-micro/server"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package

// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ client.Option
var _ server.Option

// Client API for Strategy service

type StrategyService interface {
	ListStrategy(ctx context.Context, in *StrategyInfo, opts ...client.CallOption) (*StrategyInfos, error)
	PutStrategy(ctx context.Context, in *StrategyInfo, opts ...client.CallOption) (*StrategyInfo, error)
	GetStrategyDetail(ctx context.Context, in *StrategyInfo, opts ...client.CallOption) (*StrategyInfo, error)
	DeleteStrategy(ctx context.Context, in *StrategyInfo, opts ...client.CallOption) (*StrategyInfo, error)
}

type strategyService struct {
	c    client.Client
	name string
}

func NewStrategyService(name string, c client.Client) StrategyService {
	if c == nil {
		c = client.NewClient()
	}
	if len(name) == 0 {
		name = "bitesla.srv.strategy"
	}
	return &strategyService{
		c:    c,
		name: name,
	}
}

func (c *strategyService) ListStrategy(ctx context.Context, in *StrategyInfo, opts ...client.CallOption) (*StrategyInfos, error) {
	req := c.c.NewRequest(c.name, "Strategy.ListStrategy", in)
	out := new(StrategyInfos)
	err := c.c.Call(ctx, req, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *strategyService) PutStrategy(ctx context.Context, in *StrategyInfo, opts ...client.CallOption) (*StrategyInfo, error) {
	req := c.c.NewRequest(c.name, "Strategy.PutStrategy", in)
	out := new(StrategyInfo)
	err := c.c.Call(ctx, req, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *strategyService) GetStrategyDetail(ctx context.Context, in *StrategyInfo, opts ...client.CallOption) (*StrategyInfo, error) {
	req := c.c.NewRequest(c.name, "Strategy.GetStrategyDetail", in)
	out := new(StrategyInfo)
	err := c.c.Call(ctx, req, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *strategyService) DeleteStrategy(ctx context.Context, in *StrategyInfo, opts ...client.CallOption) (*StrategyInfo, error) {
	req := c.c.NewRequest(c.name, "Strategy.DeleteStrategy", in)
	out := new(StrategyInfo)
	err := c.c.Call(ctx, req, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// Server API for Strategy service

type StrategyHandler interface {
	ListStrategy(context.Context, *StrategyInfo, *StrategyInfos) error
	PutStrategy(context.Context, *StrategyInfo, *StrategyInfo) error
	GetStrategyDetail(context.Context, *StrategyInfo, *StrategyInfo) error
	DeleteStrategy(context.Context, *StrategyInfo, *StrategyInfo) error
}

func RegisterStrategyHandler(s server.Server, hdlr StrategyHandler, opts ...server.HandlerOption) error {
	type strategy interface {
		ListStrategy(ctx context.Context, in *StrategyInfo, out *StrategyInfos) error
		PutStrategy(ctx context.Context, in *StrategyInfo, out *StrategyInfo) error
		GetStrategyDetail(ctx context.Context, in *StrategyInfo, out *StrategyInfo) error
		DeleteStrategy(ctx context.Context, in *StrategyInfo, out *StrategyInfo) error
	}
	type Strategy struct {
		strategy
	}
	h := &strategyHandler{hdlr}
	return s.Handle(s.NewHandler(&Strategy{h}, opts...))
}

type strategyHandler struct {
	StrategyHandler
}

func (h *strategyHandler) ListStrategy(ctx context.Context, in *StrategyInfo, out *StrategyInfos) error {
	return h.StrategyHandler.ListStrategy(ctx, in, out)
}

func (h *strategyHandler) PutStrategy(ctx context.Context, in *StrategyInfo, out *StrategyInfo) error {
	return h.StrategyHandler.PutStrategy(ctx, in, out)
}

func (h *strategyHandler) GetStrategyDetail(ctx context.Context, in *StrategyInfo, out *StrategyInfo) error {
	return h.StrategyHandler.GetStrategyDetail(ctx, in, out)
}

func (h *strategyHandler) DeleteStrategy(ctx context.Context, in *StrategyInfo, out *StrategyInfo) error {
	return h.StrategyHandler.DeleteStrategy(ctx, in, out)
}
