Documentation
¶
Index ¶
- func AdjustLang(lang string) string
- func AdjustPaging(pageSize, pageNo int32) (int, int)
- func ComposeListOpusResp(ctx context.Context, total int64, opuses []*model.Opus, trans i18n.Translator) *pb.ListOpusResp
- func ComposeListOpusVersionRespWithOpus(lang string, resp *pb.ListOpusVersionsResp, opus *model.Opus)
- func ComposeListOpusVersionRespWithPresentations(lang string, resp *pb.ListOpusVersionsResp, ...)
- func ComposeListOpusVersionRespWithReadmes(resp *pb.ListOpusVersionsResp, lang string, readmes []*model.OpusReadme)
- func ComposeListOpusVersionRespWithVersions(lang string, resp *pb.ListOpusVersionsResp, versions []*model.OpusVersion) error
- func ConvertContentToExtension(content *structpb.Value) (*pb.PutOnExtensionsReq, error)
- func GenOpusUpdates(...) map[string]interface{}
- func GenPresentationFromReq(opusID, versionID string, common model.Common, req *pb.PutOnExtensionsReq) model.OpusPresentation
- func ListOpusTypes(ctx context.Context, tran i18n.Translator) *pb.ListOpusTypesRespData
- func PrepareListOpusesKeywordFilterOption(keyword string, versions []*model.OpusVersion) dao.Option
- func PrepareListOpusesOptions(orgID int64, type_, name, keyword string, pageSize, pageNo int) []dao.Option
- func PrepareListVersionsInOpusesIDsOption(opuses []*model.Opus) dao.Option
- func RenderI18n(value *string, values, lang string) error
- type GalleryHandler
- func (p *GalleryHandler) ExtensionHook(ctx context.Context, req *commonPb.EventCreateRequest) (*commonPb.EventCreateResponse, error)
- func (p *GalleryHandler) ListOpus(ctx context.Context, req *pb.ListOpusReq) (*pb.ListOpusResp, error)
- func (p *GalleryHandler) ListOpusTypes(ctx context.Context, _ *commonPb.VoidRequest) (*pb.ListOpusTypesRespData, error)
- func (p *GalleryHandler) ListOpusVersions(ctx context.Context, req *pb.ListOpusVersionsReq) (*pb.ListOpusVersionsResp, error)
- func (p *GalleryHandler) PutOffArtifacts(ctx context.Context, req *pb.PutOffArtifactsReq) (*commonPb.VoidResponse, error)
- func (p *GalleryHandler) PutOnArtifacts(ctx context.Context, req *pb.PutOnArtifactsReq) (*pb.PutOnOpusResp, error)
- func (p *GalleryHandler) PutOnExtensions(ctx context.Context, req *pb.PutOnExtensionsReq) (*pb.PutOnOpusResp, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdjustLang ¶
func AdjustPaging ¶
func ComposeListOpusResp ¶
func ComposeListOpusResp(ctx context.Context, total int64, opuses []*model.Opus, trans i18n.Translator) *pb.ListOpusResp
func ComposeListOpusVersionRespWithOpus ¶
func ComposeListOpusVersionRespWithOpus(lang string, resp *pb.ListOpusVersionsResp, opus *model.Opus)
func ComposeListOpusVersionRespWithPresentations ¶
func ComposeListOpusVersionRespWithPresentations(lang string, resp *pb.ListOpusVersionsResp, presentations []*model.OpusPresentation)
func ComposeListOpusVersionRespWithReadmes ¶
func ComposeListOpusVersionRespWithReadmes(resp *pb.ListOpusVersionsResp, lang string, readmes []*model.OpusReadme)
func ComposeListOpusVersionRespWithVersions ¶
func ComposeListOpusVersionRespWithVersions(lang string, resp *pb.ListOpusVersionsResp, versions []*model.OpusVersion) error
func ConvertContentToExtension ¶
func ConvertContentToExtension(content *structpb.Value) (*pb.PutOnExtensionsReq, error)
func GenOpusUpdates ¶
func GenPresentationFromReq ¶
func GenPresentationFromReq(opusID, versionID string, common model.Common, req *pb.PutOnExtensionsReq) model.OpusPresentation
func ListOpusTypes ¶
func ListOpusTypes(ctx context.Context, tran i18n.Translator) *pb.ListOpusTypesRespData
func PrepareListOpusesKeywordFilterOption ¶
func PrepareListOpusesKeywordFilterOption(keyword string, versions []*model.OpusVersion) dao.Option
func RenderI18n ¶
Types ¶
type GalleryHandler ¶
func (*GalleryHandler) ExtensionHook ¶
func (p *GalleryHandler) ExtensionHook(ctx context.Context, req *commonPb.EventCreateRequest) (*commonPb.EventCreateResponse, error)
func (*GalleryHandler) ListOpus ¶
func (p *GalleryHandler) ListOpus(ctx context.Context, req *pb.ListOpusReq) (*pb.ListOpusResp, error)
func (*GalleryHandler) ListOpusTypes ¶
func (p *GalleryHandler) ListOpusTypes(ctx context.Context, _ *commonPb.VoidRequest) (*pb.ListOpusTypesRespData, error)
func (*GalleryHandler) ListOpusVersions ¶
func (p *GalleryHandler) ListOpusVersions(ctx context.Context, req *pb.ListOpusVersionsReq) (*pb.ListOpusVersionsResp, error)
func (*GalleryHandler) PutOffArtifacts ¶
func (p *GalleryHandler) PutOffArtifacts(ctx context.Context, req *pb.PutOffArtifactsReq) (*commonPb.VoidResponse, error)
func (*GalleryHandler) PutOnArtifacts ¶
func (p *GalleryHandler) PutOnArtifacts(ctx context.Context, req *pb.PutOnArtifactsReq) (*pb.PutOnOpusResp, error)
func (*GalleryHandler) PutOnExtensions ¶
func (p *GalleryHandler) PutOnExtensions(ctx context.Context, req *pb.PutOnExtensionsReq) (*pb.PutOnOpusResp, error)
Click to show internal directories.
Click to hide internal directories.