Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
doc-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eifel邓鹏飞
doc-service
Commits
8af0becd
Commit
8af0becd
authored
Sep 26, 2024
by
Bess严根旺
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
必传字段
parent
bb793871
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
convert_reposity.go
domain/repository/convert_reposity.go
+13
-2
convert_service.go
domain/service/convert_service.go
+1
-0
No files found.
domain/repository/convert_reposity.go
View file @
8af0becd
...
@@ -45,10 +45,21 @@ type Conversion struct {
...
@@ -45,10 +45,21 @@ type Conversion struct {
// GetBucket 获取bucket信息
// GetBucket 获取bucket信息
func
(
o
*
Conversion
)
GetBucket
(
isPrivate
bool
)
string
{
func
(
o
*
Conversion
)
GetBucket
(
isPrivate
bool
)
string
{
config
,
iniErr
:=
ini
.
Load
(
"domain/conf/app.ini"
)
if
iniErr
!=
nil
{
fmt
.
Println
(
"Fail to read file"
)
log
.
Error
(
"Fail to read file: %v"
)
os
.
Exit
(
1
)
}
bucketPrivate
:=
config
.
Section
(
"AliYun"
)
.
Key
(
"bucketPrivate"
)
.
String
()
bucketPub
:=
config
.
Section
(
"AliYun"
)
.
Key
(
"bucketPub"
)
.
String
()
fmt
.
Println
(
bucketPub
)
if
isPrivate
{
if
isPrivate
{
return
"oss://"
+
"test-bucket-v1"
return
"oss://"
+
bucketPrivate
}
}
return
"oss://"
+
"test-bucket-v1-pub"
return
"oss://"
+
bucketPub
}
}
type
DoConversionRequest
struct
{
type
DoConversionRequest
struct
{
...
...
domain/service/convert_service.go
View file @
8af0becd
...
@@ -106,6 +106,7 @@ func (doc *DocServiceService) DoConversion(c context.Context, req *pb.DoConversi
...
@@ -106,6 +106,7 @@ func (doc *DocServiceService) DoConversion(c context.Context, req *pb.DoConversi
SetTargetType
(
req
.
TargetType
)
.
SetTargetType
(
req
.
TargetType
)
.
SetIsPrivate
(
int8
(
isPri
))
.
SetIsPrivate
(
int8
(
isPri
))
.
SetTargetURL
(
request
.
TargetURI
)
.
SetTargetURL
(
request
.
TargetURI
)
.
SetCallbackRes
(
""
)
.
Save
(
c
)
Save
(
c
)
if
errsInfo
!=
nil
{
if
errsInfo
!=
nil
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment