authentication.pb.micro.go 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. // Code generated by protoc-gen-micro. DO NOT EDIT.
  2. // source: proto/authentication.proto
  3. package authorization_service
  4. import (
  5. fmt "fmt"
  6. proto "google.golang.org/protobuf/proto"
  7. math "math"
  8. )
  9. import (
  10. context "context"
  11. api "go-micro.dev/v4/api"
  12. client "go-micro.dev/v4/client"
  13. server "go-micro.dev/v4/server"
  14. )
  15. // Reference imports to suppress errors if they are not otherwise used.
  16. var _ = proto.Marshal
  17. var _ = fmt.Errorf
  18. var _ = math.Inf
  19. // Reference imports to suppress errors if they are not otherwise used.
  20. var _ api.Endpoint
  21. var _ context.Context
  22. var _ client.Option
  23. var _ server.Option
  24. // Api Endpoints for AuthenticationService service
  25. func NewAuthenticationServiceEndpoints() []*api.Endpoint {
  26. return []*api.Endpoint{}
  27. }
  28. // Client API for AuthenticationService service
  29. type AuthenticationService interface {
  30. GetAuthentication(ctx context.Context, in *AuthenticationRequest, opts ...client.CallOption) (*AuthenticationResponse, error)
  31. }
  32. type authenticationService struct {
  33. c client.Client
  34. name string
  35. }
  36. func NewAuthenticationService(name string, c client.Client) AuthenticationService {
  37. return &authenticationService{
  38. c: c,
  39. name: name,
  40. }
  41. }
  42. func (c *authenticationService) GetAuthentication(ctx context.Context, in *AuthenticationRequest, opts ...client.CallOption) (*AuthenticationResponse, error) {
  43. req := c.c.NewRequest(c.name, "AuthenticationService.GetAuthentication", in)
  44. out := new(AuthenticationResponse)
  45. err := c.c.Call(ctx, req, out, opts...)
  46. if err != nil {
  47. return nil, err
  48. }
  49. return out, nil
  50. }
  51. // Server API for AuthenticationService service
  52. type AuthenticationServiceHandler interface {
  53. GetAuthentication(context.Context, *AuthenticationRequest, *AuthenticationResponse) error
  54. }
  55. func RegisterAuthenticationServiceHandler(s server.Server, hdlr AuthenticationServiceHandler, opts ...server.HandlerOption) error {
  56. type authenticationService interface {
  57. GetAuthentication(ctx context.Context, in *AuthenticationRequest, out *AuthenticationResponse) error
  58. }
  59. type AuthenticationService struct {
  60. authenticationService
  61. }
  62. h := &authenticationServiceHandler{hdlr}
  63. return s.Handle(s.NewHandler(&AuthenticationService{h}, opts...))
  64. }
  65. type authenticationServiceHandler struct {
  66. AuthenticationServiceHandler
  67. }
  68. func (h *authenticationServiceHandler) GetAuthentication(ctx context.Context, in *AuthenticationRequest, out *AuthenticationResponse) error {
  69. return h.AuthenticationServiceHandler.GetAuthentication(ctx, in, out)
  70. }