123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- // Code generated by protoc-gen-micro. DO NOT EDIT.
- // source: proto/authentication.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 AuthenticationService service
- func NewAuthenticationServiceEndpoints() []*api.Endpoint {
- return []*api.Endpoint{}
- }
- // Client API for AuthenticationService service
- type AuthenticationService interface {
- GetAuthentication(ctx context.Context, in *AuthenticationRequest, opts ...client.CallOption) (*AuthenticationResponse, error)
- }
- type authenticationService struct {
- c client.Client
- name string
- }
- func NewAuthenticationService(name string, c client.Client) AuthenticationService {
- return &authenticationService{
- c: c,
- name: name,
- }
- }
- func (c *authenticationService) GetAuthentication(ctx context.Context, in *AuthenticationRequest, opts ...client.CallOption) (*AuthenticationResponse, error) {
- req := c.c.NewRequest(c.name, "AuthenticationService.GetAuthentication", in)
- out := new(AuthenticationResponse)
- err := c.c.Call(ctx, req, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- // Server API for AuthenticationService service
- type AuthenticationServiceHandler interface {
- GetAuthentication(context.Context, *AuthenticationRequest, *AuthenticationResponse) error
- }
- func RegisterAuthenticationServiceHandler(s server.Server, hdlr AuthenticationServiceHandler, opts ...server.HandlerOption) error {
- type authenticationService interface {
- GetAuthentication(ctx context.Context, in *AuthenticationRequest, out *AuthenticationResponse) error
- }
- type AuthenticationService struct {
- authenticationService
- }
- h := &authenticationServiceHandler{hdlr}
- return s.Handle(s.NewHandler(&AuthenticationService{h}, opts...))
- }
- type authenticationServiceHandler struct {
- AuthenticationServiceHandler
- }
- func (h *authenticationServiceHandler) GetAuthentication(ctx context.Context, in *AuthenticationRequest, out *AuthenticationResponse) error {
- return h.AuthenticationServiceHandler.GetAuthentication(ctx, in, out)
- }
|