mirror of
https://github.com/samuelncui/yatm.git
synced 2026-01-05 04:55:23 +00:00
17 lines
340 B
Go
17 lines
340 B
Go
package apis
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/samuelncui/tapewriter/entity"
|
|
)
|
|
|
|
func (api *API) LibraryExport(ctx context.Context, req *entity.LibraryExportRequest) (*entity.LibraryExportReply, error) {
|
|
buf, err := api.lib.Export(ctx, req.Types)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return &entity.LibraryExportReply{Json: buf}, nil
|
|
}
|