terms

package
v0.1.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

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

func NewHandler(service *Service) *Handler

func (*Handler) Delete

func (h *Handler) Delete(c *gin.Context)

Delete handles the term delete request

func (*Handler) List

func (h *Handler) List(c *gin.Context)

List handles the terms list request

func (*Handler) Upsert

func (h *Handler) Upsert(c *gin.Context)

Upsert handles the term create/update request

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(svcCtx *svc.ServiceContext) *Service

func (*Service) Delete

Delete removes a term by domain and alias

func (*Service) List

List retrieves terms for a given domain

func (*Service) Upsert

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL