Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(svcCtx *svc.ServiceContext) *Service
func (*Service) Delete ¶
func (s *Service) Delete(ctx context.Context, req *TermDeleteRequest) (*TermDeleteResponse, error)
Delete removes a term by domain and alias
func (*Service) List ¶
func (s *Service) List(ctx context.Context, req *TermsListRequest) (*TermsListResponse, error)
List retrieves terms for a given domain
func (*Service) Upsert ¶
func (s *Service) Upsert(ctx context.Context, req *TermUpsertRequest) (*TermUpsertResponse, error)
Upsert creates or updates a term
type TermDeleteRequest ¶
type TermDeleteRequest struct {
Domain string `json:"domain"` // entity | operation
Alias string `json:"alias"` // 要删除的别名
}
TermDeleteRequest represents the request to delete a term
type TermDeleteResponse ¶
type TermDeleteResponse struct {
Ok bool `json:"ok"`
}
TermDeleteResponse represents the response for term delete
type TermItem ¶
type TermItem struct {
Id int64 `json:"id"`
Domain string `json:"domain"` // entity | operation
TermKey string `json:"term_key"` // 原始术语键
Alias string `json:"alias"` // 别名
DisplayZh string `json:"display_zh"` // 中文显示
DisplayEn string `json:"display_en"` // 英文显示
Order int64 `json:"order"` // 排序
}
TermItem represents a single term dictionary item
type TermUpsertRequest ¶
type TermUpsertRequest struct {
Domain string `json:"domain"` // entity | operation
TermKey string `json:"term_key"` // 原始术语键
Alias string `json:"alias"` // 别名
DisplayZh string `json:"display_zh"` // 中文显示
DisplayEn string `json:"display_en"` // 英文显示
Order int64 `json:"order"` // 排序
}
TermUpsertRequest represents the request to create or update a term
type TermUpsertResponse ¶
type TermUpsertResponse struct {
Ok bool `json:"ok"`
}
TermUpsertResponse represents the response for term upsert
type TermsListRequest ¶
type TermsListRequest struct {
Domain string `json:"domain"` // entity | operation
}
TermsListRequest represents the request to list terms
type TermsListResponse ¶
type TermsListResponse struct {
Items []TermItem `json:"items"`
}
TermsListResponse represents the response with terms list
Click to show internal directories.
Click to hide internal directories.