// Code generated by protoc-gen-micro. DO NOT EDIT. // source: auth/service/proto/accounts.proto package auth import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" ) import ( context "context" client "github.com/micro/go-micro/v2/client" server "github.com/micro/go-micro/v2/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.ProtoPackageIsVersion3 // 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 Accounts service type AccountsService interface { List(ctx context.Context, in *ListAccountsRequest, opts ...client.CallOption) (*ListAccountsResponse, error) } type accountsService struct { c client.Client name string } func NewAccountsService(name string, c client.Client) AccountsService { return &accountsService{ c: c, name: name, } } func (c *accountsService) List(ctx context.Context, in *ListAccountsRequest, opts ...client.CallOption) (*ListAccountsResponse, error) { req := c.c.NewRequest(c.name, "Accounts.List", in) out := new(ListAccountsResponse) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } // Server API for Accounts service type AccountsHandler interface { List(context.Context, *ListAccountsRequest, *ListAccountsResponse) error } func RegisterAccountsHandler(s server.Server, hdlr AccountsHandler, opts ...server.HandlerOption) error { type accounts interface { List(ctx context.Context, in *ListAccountsRequest, out *ListAccountsResponse) error } type Accounts struct { accounts } h := &accountsHandler{hdlr} return s.Handle(s.NewHandler(&Accounts{h}, opts...)) } type accountsHandler struct { AccountsHandler } func (h *accountsHandler) List(ctx context.Context, in *ListAccountsRequest, out *ListAccountsResponse) error { return h.AccountsHandler.List(ctx, in, out) }