MCPcopy Create free account
hub / github.com/GoSimplicity/LinkMe / apiToDAO

Method apiToDAO

internal/repository/api.go:82–99  ·  view source on GitHub ↗

apiToDAO 将domain层的API对象转换为DAO层对象

(api *domain.Api)

Source from the content-addressed store, hash-verified

80
81// apiToDAO 将domain层的API对象转换为DAO层对象
82func (a *apiRepository) apiToDAO(api *domain.Api) *dao.Api {
83 if api == nil {
84 return nil
85 }
86 return &dao.Api{
87 ID: api.ID,
88 Name: api.Name,
89 Path: api.Path,
90 Method: api.Method,
91 Description: api.Description,
92 Version: api.Version,
93 Category: api.Category,
94 IsPublic: api.IsPublic,
95 CreateTime: api.CreateTime,
96 UpdateTime: api.UpdateTime,
97 IsDeleted: api.IsDeleted,
98 }
99}
100
101// apiFromDAO 将DAO层的API对象转换为domain层对象
102func (a *apiRepository) apiFromDAO(api *dao.Api) *domain.Api {

Callers 2

CreateApiMethod · 0.95
UpdateApiMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected