Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
perxis-go
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Package registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
perxis
perxis-go
Commits
e848b956
Commit
e848b956
authored
1 year ago
by
ko_oler
Browse files
Options
Downloads
Patches
Plain Diff
правки по ПР:
- переименован ExtensionID -> Extension - правки в конструктор
parent
dae5af79
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
pkg/extension/action_url.go
+6
-10
6 additions, 10 deletions
pkg/extension/action_url.go
pkg/extension/service/extension.go
+1
-1
1 addition, 1 deletion
pkg/extension/service/extension.go
with
7 additions
and
11 deletions
pkg/extension/action_url.go
+
6
−
10
View file @
e848b956
...
@@ -19,14 +19,7 @@ type ActionURL struct {
...
@@ -19,14 +19,7 @@ type ActionURL struct {
// NewActionURL возвращает пустую структуру ActionURL, если передано пустое действие
// NewActionURL возвращает пустую структуру ActionURL, если передано пустое действие
// при передаче в функцию действия - заполняет структуру
// при передаче в функцию действия - заполняет структуру
func
NewActionURL
(
action
string
)
(
*
ActionURL
,
error
)
{
func
NewActionURL
(
action
string
)
(
*
ActionURL
,
error
)
{
if
action
!=
""
{
return
parseActionURL
(
action
)
parsedURL
,
err
:=
parseActionURL
(
action
)
if
err
!=
nil
{
return
nil
,
err
}
return
parsedURL
,
nil
}
return
&
ActionURL
{},
nil
}
}
// ID возвращает сохраненный в ActionURL id действия
// ID возвращает сохраненный в ActionURL id действия
...
@@ -34,8 +27,8 @@ func (p *ActionURL) ID() string {
...
@@ -34,8 +27,8 @@ func (p *ActionURL) ID() string {
return
p
.
actionID
return
p
.
actionID
}
}
// Extension
ID
возвращает сохраненный в ActionURL id расширения
// Extension возвращает сохраненный в ActionURL id расширения
func
(
p
*
ActionURL
)
Extension
ID
()
string
{
func
(
p
*
ActionURL
)
Extension
()
string
{
return
p
.
extensionID
return
p
.
extensionID
}
}
...
@@ -46,6 +39,9 @@ func (p *ActionURL) Scheme() string {
...
@@ -46,6 +39,9 @@ func (p *ActionURL) Scheme() string {
// parseActionURL функция для заполнения структуры ActionURL из переданного действия
// parseActionURL функция для заполнения структуры ActionURL из переданного действия
func
parseActionURL
(
action
string
)
(
*
ActionURL
,
error
)
{
func
parseActionURL
(
action
string
)
(
*
ActionURL
,
error
)
{
if
action
==
""
{
return
&
ActionURL
{},
nil
}
u
,
err
:=
url
.
Parse
(
action
)
u
,
err
:=
url
.
Parse
(
action
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
...
...
This diff is collapsed.
Click to expand it.
pkg/extension/service/extension.go
+
1
−
1
View file @
e848b956
...
@@ -161,7 +161,7 @@ func (s *Extension) Action(ctx context.Context, in *extension.ActionRequest) (*e
...
@@ -161,7 +161,7 @@ func (s *Extension) Action(ctx context.Context, in *extension.ActionRequest) (*e
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
extensionID
=
actionURL
.
Extension
ID
()
extensionID
=
actionURL
.
Extension
()
}
}
ok
,
err
:=
extension
.
CheckInstalled
(
ctx
,
s
.
Content
,
in
.
SpaceId
,
in
.
EnvId
,
extensionID
)
ok
,
err
:=
extension
.
CheckInstalled
(
ctx
,
s
.
Content
,
in
.
SpaceId
,
in
.
EnvId
,
extensionID
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment