// Code generated by protoc-gen-micro. DO NOT EDIT. // source: proto/clusterrole.proto package kubernetes_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 ClusterRoleService service func NewClusterRoleServiceEndpoints() []*api.Endpoint { return []*api.Endpoint{} } // Client API for ClusterRoleService service type ClusterRoleService interface { GetClusterRoleList(ctx context.Context, in *GetClusterRoleListRequest, opts ...client.CallOption) (*GetClusterRoleListResponse, error) GetClusterRole(ctx context.Context, in *GetClusterRoleRequest, opts ...client.CallOption) (*GetClusterRoleResponse, error) UpdateClusterRole(ctx context.Context, in *UpdateClusterRoleRequest, opts ...client.CallOption) (*UpdateClusterRoleResponse, error) CreateClusterRole(ctx context.Context, in *CreateClusterRoleRequest, opts ...client.CallOption) (*CreateClusterRoleResponse, error) DeleteClusterRole(ctx context.Context, in *DeleteClusterRoleRequest, opts ...client.CallOption) (*DeleteClusterRoleResponse, error) } type clusterRoleService struct { c client.Client name string } func NewClusterRoleService(name string, c client.Client) ClusterRoleService { return &clusterRoleService{ c: c, name: name, } } func (c *clusterRoleService) GetClusterRoleList(ctx context.Context, in *GetClusterRoleListRequest, opts ...client.CallOption) (*GetClusterRoleListResponse, error) { req := c.c.NewRequest(c.name, "ClusterRoleService.GetClusterRoleList", in) out := new(GetClusterRoleListResponse) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } func (c *clusterRoleService) GetClusterRole(ctx context.Context, in *GetClusterRoleRequest, opts ...client.CallOption) (*GetClusterRoleResponse, error) { req := c.c.NewRequest(c.name, "ClusterRoleService.GetClusterRole", in) out := new(GetClusterRoleResponse) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } func (c *clusterRoleService) UpdateClusterRole(ctx context.Context, in *UpdateClusterRoleRequest, opts ...client.CallOption) (*UpdateClusterRoleResponse, error) { req := c.c.NewRequest(c.name, "ClusterRoleService.UpdateClusterRole", in) out := new(UpdateClusterRoleResponse) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } func (c *clusterRoleService) CreateClusterRole(ctx context.Context, in *CreateClusterRoleRequest, opts ...client.CallOption) (*CreateClusterRoleResponse, error) { req := c.c.NewRequest(c.name, "ClusterRoleService.CreateClusterRole", in) out := new(CreateClusterRoleResponse) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } func (c *clusterRoleService) DeleteClusterRole(ctx context.Context, in *DeleteClusterRoleRequest, opts ...client.CallOption) (*DeleteClusterRoleResponse, error) { req := c.c.NewRequest(c.name, "ClusterRoleService.DeleteClusterRole", in) out := new(DeleteClusterRoleResponse) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } // Server API for ClusterRoleService service type ClusterRoleServiceHandler interface { GetClusterRoleList(context.Context, *GetClusterRoleListRequest, *GetClusterRoleListResponse) error GetClusterRole(context.Context, *GetClusterRoleRequest, *GetClusterRoleResponse) error UpdateClusterRole(context.Context, *UpdateClusterRoleRequest, *UpdateClusterRoleResponse) error CreateClusterRole(context.Context, *CreateClusterRoleRequest, *CreateClusterRoleResponse) error DeleteClusterRole(context.Context, *DeleteClusterRoleRequest, *DeleteClusterRoleResponse) error } func RegisterClusterRoleServiceHandler(s server.Server, hdlr ClusterRoleServiceHandler, opts ...server.HandlerOption) error { type clusterRoleService interface { GetClusterRoleList(ctx context.Context, in *GetClusterRoleListRequest, out *GetClusterRoleListResponse) error GetClusterRole(ctx context.Context, in *GetClusterRoleRequest, out *GetClusterRoleResponse) error UpdateClusterRole(ctx context.Context, in *UpdateClusterRoleRequest, out *UpdateClusterRoleResponse) error CreateClusterRole(ctx context.Context, in *CreateClusterRoleRequest, out *CreateClusterRoleResponse) error DeleteClusterRole(ctx context.Context, in *DeleteClusterRoleRequest, out *DeleteClusterRoleResponse) error } type ClusterRoleService struct { clusterRoleService } h := &clusterRoleServiceHandler{hdlr} return s.Handle(s.NewHandler(&ClusterRoleService{h}, opts...)) } type clusterRoleServiceHandler struct { ClusterRoleServiceHandler } func (h *clusterRoleServiceHandler) GetClusterRoleList(ctx context.Context, in *GetClusterRoleListRequest, out *GetClusterRoleListResponse) error { return h.ClusterRoleServiceHandler.GetClusterRoleList(ctx, in, out) } func (h *clusterRoleServiceHandler) GetClusterRole(ctx context.Context, in *GetClusterRoleRequest, out *GetClusterRoleResponse) error { return h.ClusterRoleServiceHandler.GetClusterRole(ctx, in, out) } func (h *clusterRoleServiceHandler) UpdateClusterRole(ctx context.Context, in *UpdateClusterRoleRequest, out *UpdateClusterRoleResponse) error { return h.ClusterRoleServiceHandler.UpdateClusterRole(ctx, in, out) } func (h *clusterRoleServiceHandler) CreateClusterRole(ctx context.Context, in *CreateClusterRoleRequest, out *CreateClusterRoleResponse) error { return h.ClusterRoleServiceHandler.CreateClusterRole(ctx, in, out) } func (h *clusterRoleServiceHandler) DeleteClusterRole(ctx context.Context, in *DeleteClusterRoleRequest, out *DeleteClusterRoleResponse) error { return h.ClusterRoleServiceHandler.DeleteClusterRole(ctx, in, out) }