123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- // Code generated by protoc-gen-micro. DO NOT EDIT.
- // source: proto/common_service.proto
- package authorization_service
- import (
- fmt "fmt"
- proto "google.golang.org/protobuf/proto"
- math "math"
- )
- import (
- context "context"
- api "go-micro.dev/v4/api"
- client "go-micro.dev/v4/client"
- server "go-micro.dev/v4/server"
- )
- // Reference imports to suppress errors if they are not otherwise used.
- var _ = proto.Marshal
- var _ = fmt.Errorf
- var _ = math.Inf
- // Reference imports to suppress errors if they are not otherwise used.
- var _ api.Endpoint
- var _ context.Context
- var _ client.Option
- var _ server.Option
- // Api Endpoints for CommonService service
- func NewCommonServiceEndpoints() []*api.Endpoint {
- return []*api.Endpoint{}
- }
- // Client API for CommonService service
- type CommonService interface {
- AdminLogin(ctx context.Context, in *AdminLoginRequest, opts ...client.CallOption) (*AdminLoginResponse, error)
- AdminLogout(ctx context.Context, in *AdminLogoutRequest, opts ...client.CallOption) (*AdminLogoutResponse, error)
- AdminProfile(ctx context.Context, in *AdminProfileRequest, opts ...client.CallOption) (*AdminProfileResponse, error)
- }
- type commonService struct {
- c client.Client
- name string
- }
- func NewCommonService(name string, c client.Client) CommonService {
- return &commonService{
- c: c,
- name: name,
- }
- }
- func (c *commonService) AdminLogin(ctx context.Context, in *AdminLoginRequest, opts ...client.CallOption) (*AdminLoginResponse, error) {
- req := c.c.NewRequest(c.name, "CommonService.AdminLogin", in)
- out := new(AdminLoginResponse)
- err := c.c.Call(ctx, req, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *commonService) AdminLogout(ctx context.Context, in *AdminLogoutRequest, opts ...client.CallOption) (*AdminLogoutResponse, error) {
- req := c.c.NewRequest(c.name, "CommonService.AdminLogout", in)
- out := new(AdminLogoutResponse)
- err := c.c.Call(ctx, req, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *commonService) AdminProfile(ctx context.Context, in *AdminProfileRequest, opts ...client.CallOption) (*AdminProfileResponse, error) {
- req := c.c.NewRequest(c.name, "CommonService.AdminProfile", in)
- out := new(AdminProfileResponse)
- err := c.c.Call(ctx, req, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- // Server API for CommonService service
- type CommonServiceHandler interface {
- AdminLogin(context.Context, *AdminLoginRequest, *AdminLoginResponse) error
- AdminLogout(context.Context, *AdminLogoutRequest, *AdminLogoutResponse) error
- AdminProfile(context.Context, *AdminProfileRequest, *AdminProfileResponse) error
- }
- func RegisterCommonServiceHandler(s server.Server, hdlr CommonServiceHandler, opts ...server.HandlerOption) error {
- type commonService interface {
- AdminLogin(ctx context.Context, in *AdminLoginRequest, out *AdminLoginResponse) error
- AdminLogout(ctx context.Context, in *AdminLogoutRequest, out *AdminLogoutResponse) error
- AdminProfile(ctx context.Context, in *AdminProfileRequest, out *AdminProfileResponse) error
- }
- type CommonService struct {
- commonService
- }
- h := &commonServiceHandler{hdlr}
- return s.Handle(s.NewHandler(&CommonService{h}, opts...))
- }
- type commonServiceHandler struct {
- CommonServiceHandler
- }
- func (h *commonServiceHandler) AdminLogin(ctx context.Context, in *AdminLoginRequest, out *AdminLoginResponse) error {
- return h.CommonServiceHandler.AdminLogin(ctx, in, out)
- }
- func (h *commonServiceHandler) AdminLogout(ctx context.Context, in *AdminLogoutRequest, out *AdminLogoutResponse) error {
- return h.CommonServiceHandler.AdminLogout(ctx, in, out)
- }
- func (h *commonServiceHandler) AdminProfile(ctx context.Context, in *AdminProfileRequest, out *AdminProfileResponse) error {
- return h.CommonServiceHandler.AdminProfile(ctx, in, out)
- }
|