2026-08-09 10:43:45 +08:00
|
|
|
// Code generated by protoc-gen-slc. DO NOT EDIT.
|
|
|
|
|
package server
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"context"
|
2026-08-09 12:41:08 +08:00
|
|
|
"bsm/full/module/ec/address/internal/logic/library"
|
|
|
|
|
pb "bsm/full/module/ec/address/pb"
|
2026-08-09 10:43:45 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type LibraryServer struct {
|
|
|
|
|
pb.UnimplementedLibraryServer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func NewLibraryServer() *LibraryServer {
|
|
|
|
|
return &LibraryServer{}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 新增地址
|
|
|
|
|
func (s *LibraryServer) Create(ctx context.Context, in *pb.AddressCreateRequest) (*pb.StatusReply, error) {
|
|
|
|
|
return library.Create(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 修改地址
|
|
|
|
|
func (s *LibraryServer) Modify(ctx context.Context, in *pb.AddressItem) (*pb.StatusReply, error) {
|
|
|
|
|
return library.Modify(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取一条地址
|
|
|
|
|
func (s *LibraryServer) Get(ctx context.Context, in *pb.IdentRequest) (*pb.AddressItem, error) {
|
|
|
|
|
return library.Get(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取地址列表
|
|
|
|
|
func (s *LibraryServer) Fetch(ctx context.Context, in *pb.IdentRequest) (*pb.AddressListReply, error) {
|
|
|
|
|
return library.Fetch(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 删除一个地址
|
|
|
|
|
func (s *LibraryServer) Delete(ctx context.Context, in *pb.AddressDeleteRequest) (*pb.StatusReply, error) {
|
|
|
|
|
return library.Delete(ctx, in)
|
|
|
|
|
}
|