2026-08-09 10:43:45 +08:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
2026-08-09 15:10:19 +08:00
// - protoc-gen-go-grpc v1.6.2
2026-08-09 18:40:36 +08:00
// - protoc v7.35.1
2026-08-09 15:10:19 +08:00
// source: module/base/cms/proto/pages.proto
2026-08-09 10:43:45 +08:00
package cms
import (
2026-08-09 15:10:19 +08:00
protobuf "bsm/full/protobuf"
2026-08-09 10:43:45 +08:00
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc . SupportPackageIsVersion9
const (
Pages_Fetch_FullMethodName = "/cms.Pages/Fetch"
Pages_GetByIdentity_FullMethodName = "/cms.Pages/GetByIdentity"
Pages_GetByKey_FullMethodName = "/cms.Pages/GetByKey"
Pages_Create_FullMethodName = "/cms.Pages/Create"
Pages_Modify_FullMethodName = "/cms.Pages/Modify"
Pages_Delete_FullMethodName = "/cms.Pages/Delete"
)
// PagesClient is the client API for Pages service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// 单页管理
type PagesClient interface {
// 单页列表
Fetch ( ctx context . Context , in * PagesListRequest , opts ... grpc . CallOption ) ( * PagesListReply , error )
// 获取单页详情 By Identity
GetByIdentity ( ctx context . Context , in * GetPagesRequest , opts ... grpc . CallOption ) ( * PagesItem , error )
// 获取单页详情 By Key
GetByKey ( ctx context . Context , in * GetPagesByKeyRequest , opts ... grpc . CallOption ) ( * PagesItem , error )
// 发布单页
2026-08-09 15:10:19 +08:00
Create ( ctx context . Context , in * PagesItem , opts ... grpc . CallOption ) ( * protobuf . StatusReply , error )
2026-08-09 10:43:45 +08:00
// 修改单页
2026-08-09 15:10:19 +08:00
Modify ( ctx context . Context , in * PagesItem , opts ... grpc . CallOption ) ( * protobuf . StatusReply , error )
2026-08-09 10:43:45 +08:00
// 删除单页
2026-08-09 15:10:19 +08:00
Delete ( ctx context . Context , in * protobuf . IdentRequest , opts ... grpc . CallOption ) ( * protobuf . StatusReply , error )
2026-08-09 10:43:45 +08:00
}
type pagesClient struct {
cc grpc . ClientConnInterface
}
func NewPagesClient ( cc grpc . ClientConnInterface ) PagesClient {
return & pagesClient { cc }
}
func ( c * pagesClient ) Fetch ( ctx context . Context , in * PagesListRequest , opts ... grpc . CallOption ) ( * PagesListReply , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( PagesListReply )
err := c . cc . Invoke ( ctx , Pages_Fetch_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * pagesClient ) GetByIdentity ( ctx context . Context , in * GetPagesRequest , opts ... grpc . CallOption ) ( * PagesItem , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( PagesItem )
err := c . cc . Invoke ( ctx , Pages_GetByIdentity_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * pagesClient ) GetByKey ( ctx context . Context , in * GetPagesByKeyRequest , opts ... grpc . CallOption ) ( * PagesItem , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( PagesItem )
err := c . cc . Invoke ( ctx , Pages_GetByKey_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
2026-08-09 15:10:19 +08:00
func ( c * pagesClient ) Create ( ctx context . Context , in * PagesItem , opts ... grpc . CallOption ) ( * protobuf . StatusReply , error ) {
2026-08-09 10:43:45 +08:00
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
2026-08-09 15:10:19 +08:00
out := new ( protobuf . StatusReply )
2026-08-09 10:43:45 +08:00
err := c . cc . Invoke ( ctx , Pages_Create_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
2026-08-09 15:10:19 +08:00
func ( c * pagesClient ) Modify ( ctx context . Context , in * PagesItem , opts ... grpc . CallOption ) ( * protobuf . StatusReply , error ) {
2026-08-09 10:43:45 +08:00
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
2026-08-09 15:10:19 +08:00
out := new ( protobuf . StatusReply )
2026-08-09 10:43:45 +08:00
err := c . cc . Invoke ( ctx , Pages_Modify_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
2026-08-09 15:10:19 +08:00
func ( c * pagesClient ) Delete ( ctx context . Context , in * protobuf . IdentRequest , opts ... grpc . CallOption ) ( * protobuf . StatusReply , error ) {
2026-08-09 10:43:45 +08:00
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
2026-08-09 15:10:19 +08:00
out := new ( protobuf . StatusReply )
2026-08-09 10:43:45 +08:00
err := c . cc . Invoke ( ctx , Pages_Delete_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
// PagesServer is the server API for Pages service.
2026-08-09 15:10:19 +08:00
// All implementations should embed UnimplementedPagesServer
2026-08-09 10:43:45 +08:00
// for forward compatibility.
//
// 单页管理
type PagesServer interface {
// 单页列表
Fetch ( context . Context , * PagesListRequest ) ( * PagesListReply , error )
// 获取单页详情 By Identity
GetByIdentity ( context . Context , * GetPagesRequest ) ( * PagesItem , error )
// 获取单页详情 By Key
GetByKey ( context . Context , * GetPagesByKeyRequest ) ( * PagesItem , error )
// 发布单页
2026-08-09 15:10:19 +08:00
Create ( context . Context , * PagesItem ) ( * protobuf . StatusReply , error )
2026-08-09 10:43:45 +08:00
// 修改单页
2026-08-09 15:10:19 +08:00
Modify ( context . Context , * PagesItem ) ( * protobuf . StatusReply , error )
2026-08-09 10:43:45 +08:00
// 删除单页
2026-08-09 15:10:19 +08:00
Delete ( context . Context , * protobuf . IdentRequest ) ( * protobuf . StatusReply , error )
2026-08-09 10:43:45 +08:00
}
2026-08-09 15:10:19 +08:00
// UnimplementedPagesServer should be embedded to have
2026-08-09 10:43:45 +08:00
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedPagesServer struct { }
func ( UnimplementedPagesServer ) Fetch ( context . Context , * PagesListRequest ) ( * PagesListReply , error ) {
return nil , status . Error ( codes . Unimplemented , "method Fetch not implemented" )
}
func ( UnimplementedPagesServer ) GetByIdentity ( context . Context , * GetPagesRequest ) ( * PagesItem , error ) {
return nil , status . Error ( codes . Unimplemented , "method GetByIdentity not implemented" )
}
func ( UnimplementedPagesServer ) GetByKey ( context . Context , * GetPagesByKeyRequest ) ( * PagesItem , error ) {
return nil , status . Error ( codes . Unimplemented , "method GetByKey not implemented" )
}
2026-08-09 15:10:19 +08:00
func ( UnimplementedPagesServer ) Create ( context . Context , * PagesItem ) ( * protobuf . StatusReply , error ) {
2026-08-09 10:43:45 +08:00
return nil , status . Error ( codes . Unimplemented , "method Create not implemented" )
}
2026-08-09 15:10:19 +08:00
func ( UnimplementedPagesServer ) Modify ( context . Context , * PagesItem ) ( * protobuf . StatusReply , error ) {
2026-08-09 10:43:45 +08:00
return nil , status . Error ( codes . Unimplemented , "method Modify not implemented" )
}
2026-08-09 15:10:19 +08:00
func ( UnimplementedPagesServer ) Delete ( context . Context , * protobuf . IdentRequest ) ( * protobuf . StatusReply , error ) {
2026-08-09 10:43:45 +08:00
return nil , status . Error ( codes . Unimplemented , "method Delete not implemented" )
}
2026-08-09 15:10:19 +08:00
func ( UnimplementedPagesServer ) testEmbeddedByValue ( ) { }
2026-08-09 10:43:45 +08:00
// UnsafePagesServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PagesServer will
// result in compilation errors.
type UnsafePagesServer interface {
mustEmbedUnimplementedPagesServer ( )
}
func RegisterPagesServer ( s grpc . ServiceRegistrar , srv PagesServer ) {
// If the following call panics, it indicates UnimplementedPagesServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t , ok := srv . ( interface { testEmbeddedByValue ( ) } ) ; ok {
t . testEmbeddedByValue ( )
}
s . RegisterService ( & Pages_ServiceDesc , srv )
}
func _Pages_Fetch_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( PagesListRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( PagesServer ) . Fetch ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Pages_Fetch_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( PagesServer ) . Fetch ( ctx , req . ( * PagesListRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _Pages_GetByIdentity_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( GetPagesRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( PagesServer ) . GetByIdentity ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Pages_GetByIdentity_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( PagesServer ) . GetByIdentity ( ctx , req . ( * GetPagesRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _Pages_GetByKey_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( GetPagesByKeyRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( PagesServer ) . GetByKey ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Pages_GetByKey_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( PagesServer ) . GetByKey ( ctx , req . ( * GetPagesByKeyRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _Pages_Create_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( PagesItem )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( PagesServer ) . Create ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Pages_Create_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( PagesServer ) . Create ( ctx , req . ( * PagesItem ) )
}
return interceptor ( ctx , in , info , handler )
}
func _Pages_Modify_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( PagesItem )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( PagesServer ) . Modify ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Pages_Modify_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( PagesServer ) . Modify ( ctx , req . ( * PagesItem ) )
}
return interceptor ( ctx , in , info , handler )
}
func _Pages_Delete_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2026-08-09 15:10:19 +08:00
in := new ( protobuf . IdentRequest )
2026-08-09 10:43:45 +08:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( PagesServer ) . Delete ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Pages_Delete_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2026-08-09 15:10:19 +08:00
return srv . ( PagesServer ) . Delete ( ctx , req . ( * protobuf . IdentRequest ) )
2026-08-09 10:43:45 +08:00
}
return interceptor ( ctx , in , info , handler )
}
// Pages_ServiceDesc is the grpc.ServiceDesc for Pages service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Pages_ServiceDesc = grpc . ServiceDesc {
ServiceName : "cms.Pages" ,
HandlerType : ( * PagesServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "Fetch" ,
Handler : _Pages_Fetch_Handler ,
} ,
{
MethodName : "GetByIdentity" ,
Handler : _Pages_GetByIdentity_Handler ,
} ,
{
MethodName : "GetByKey" ,
Handler : _Pages_GetByKey_Handler ,
} ,
{
MethodName : "Create" ,
Handler : _Pages_Create_Handler ,
} ,
{
MethodName : "Modify" ,
Handler : _Pages_Modify_Handler ,
} ,
{
MethodName : "Delete" ,
Handler : _Pages_Delete_Handler ,
} ,
} ,
Streams : [ ] grpc . StreamDesc { } ,
2026-08-09 15:10:19 +08:00
Metadata : "module/base/cms/proto/pages.proto" ,
2026-08-09 10:43:45 +08:00
}